How to Create the formDigest Value

The formDigest variable is a required parameter for Dynamic Pricing requests. Merchants need to link multiple variable values in a character string and then utilize an MD5 hash generator to create an encrypted formDigest value.

The parameters necessary for creating formDigest values differ depending on the payment form system (FlexForms or JPost) and the pricing option (non-recurring or recurring) being passed.

Create formDigest Value - FlexForms


Single Billing Transactions


Use the following parameters and values, in the order they are listed, to generate a single billing formDigest for FlexForms:

VARIABLEDESCRIPTIONEXAMPLE VALUE
1.initialPriceA decimal value (two decimals) representing the initial price.10.00
2.initialPeriodAn integer representing the length, in days, of the initial billing period. By default, the value for non-recurring prices is between 2 and 365.30
3.currencyCodeAn integer representing the 3-digit currency code that will be used for the transaction.USD - 840
EUR - 978
GBP - 826
CAD - 124
AUD - 036
JPY - 392
4.Encryption Key (Salt)A unique encryption key created by the Merchant Support team. You can retrieve the Encryption/Salt Key from the CCBill Admin.7d901dad245fd0ff6bc20d06


Before being hashed, the formDigest string should have the following format:


10.00308407d901dad245fd0ff6bc20d06

The string was created using the example values from the table above.


CCBill does not provide an MD5 hash generator. Use a web-based hashing tool, like http://www.miraclesalad.com/webtools/md5.php, to create an MD5 hash of the character string.

After the hashing process is complete, the new string represents the formDigest value:


a7459445d0e5dc0963fe736dc5cf900b

Append the hashed value to the formDigest parameter:


formDigest=a7459445d0e5dc0963fe736dc5cf900b

An example of a non-recurring FlexForms Dynamic Price request includes the following variables:


https://api.ccbill.com/wap-frontflex/flexforms/687fa3e0-e60d-4466-88e2-181fa56dd6a9?clientSubacc=0000&initialPrice=10.00&initialPeriod=30&currencyCode=840&formDigest=a7459445d0e5dc0963fe736dc5cf900b


Recurring Transactions


For recurring transactions, use the following values in the order they are listed:


VARIABLEDESCRIPTIONEXAMPLE VALUE
1.initialPriceA decimal value (two decimals) representing the initial price.10.00
2.initialPeriodAn integer representing the length, in days, of the initial billing period. By default, the value for non-recurring prices is between 2 and 365.30
3.recurringPriceA decimal value (two decimals) representing the recurring price.10.00
4.recurringPeriodAn integer representing the length, in days, of the recurring billing period. The default values for recurring prices are 30, 60, and 90.30
5.numRebillsAn integer number of rebills. The default value for recurring prices is 99.99
6.currencyCodeAn integer representing the 3-digit currency code that will be used for the transaction.USD - 840
EUR - 978
GBP - 826
CAD - 124
AUD - 036
JPY - 392
7.Encryption Key (Salt)A unique encryption key created by the Merchant Support team. You can retrieve the Encryption/Salt Key from the CCBill Admin.7d901dad245fd0ff6bc20d06

Prior to being hashed, the recurring price string looks like this:


10.003010.0030998407d901dad245fd0ff6bc20d06

The string was created using the example values from the table above.


CCBill does not provide an MD5 hash generator. Use a web-based hashing tool, like http://www.miraclesalad.com/webtools/md5.php, to create an MD5 hash of the character string.


After the hashing process is complete, the new string represents the formDigest value:


48f0b12e4307e64edb781c479665c899

Append the hashed value to the formDigest parameter:


formDigest=48f0b12e4307e64edb781c479665c899

This is an example of a recurring FlexForms Dynamic Price request:


https://api.ccbill.com/wap-frontflex/flexforms/687fa3e0-e60d-4466-88e2-181fa56dd6a9?clientSubacc=0000&initialPrice=10.00&initialPeriod=30&recurringPrice=10.00&recurringPeriod=30&numRebills=99&currencyCode=840&formDigest=48f0b12e4307e64edb781c479665c899

If you encounter a generic 500 error message error when passing variables in FlexForms, read our detailed guide for troubleshooting dynamic pricing errors.



Create formDigest Value - JPost


Single Billing Transactions


Use the following values, in the order they are listed, to generate a formDigest for a non-recurring price for JPost forms:


VARIABLEDESCRIPTIONEXAMPLE VALUE
1.formPriceA decimal value (two decimals) representing the initial price.10.00
2.formPeriodAn integer representing the length, in days, of the initial billing period. By default, the value for non-recurring prices is between 2 and 365.30
3.currencyCodeAn integer representing the 3-digit currency code that will be used for the transaction.USD - 840
EUR - 978
GBP - 826
CAD - 124
AUD - 036
JPY - 392
4.Encryption Key (Salt)A unique encryption key created by the Merchant Support team. You can retrieve the Encryption/Salt Key from the CCBill Admin.7d901dad245fd0ff6bc20d06

Before being hashed, the formDigest string should have the following format:


10.00308407d901dad245fd0ff6bc20d06

The string was created using the example values from the table above.


CCBill does not provide an MD5 hash generator. Use a web-based hashing tool, like http://www.miraclesalad.com/webtools/md5.php, to create an MD5 hash of the character string.

After the hashing process is complete, the new string represents the formDigest value:


a7459445d0e5dc0963fe736dc5cf900b

Append the hashed value to the formDigest parameter:


formDigest=a7459445d0e5dc0963fe736dc5cf900b

An example of a non-recurring FlexForms Dynamic Price request includes the following variables:


https://bill.ccbill.com/jpost/signup.cgi?clientAccnum=929487&clientSubacc=1337&formName=104cc&formPrice=10.00&formPeriod=30&currencyCode=840&formDigest=a7459445d0e5dc0963fe736dc5cf900b


Recurring Transactions


For recurring transactions, use the following values in the order they are listed:


VARIABLEDESCRIPTIONEXAMPLE VALUE
1.formPriceA decimal value (two decimals) representing the initial price.10.00
2.formPeriodAn integer representing the length, in days, of the initial billing period. By default, the value for non-recurring prices is between 2 and 365.30
3.formrecurringPriceA decimal value (two decimals) representing the recurring price.10.00
4.formrecurringPeriodAn integer representing the length, in days, of the recurring billing period. The default values for recurring prices are 30, 60, and 90.30
5.formRebillsAn integer number of rebills. The default value for recurring prices is 99.99
6.currencyCodeAn integer representing the 3-digit currency code that will be used for the transaction.USD - 840
EUR - 978
GBP - 826
CAD - 124
AUD - 036
JPY - 392
7.Encryption Key (Salt)A unique encryption key created by the Merchant Support team. You can retrieve the Encryption/Salt Key from the CCBill Admin.7d901dad245fd0ff6bc20d06

Prior to being hashed, the recurring price string looks like this:


10.003010.0030998407d901dad245fd0ff6bc20d06

The string was created using the example values from the table above.


CCBill does not provide an MD5 hash generator. Use a web-based hashing tool, like http://www.miraclesalad.com/webtools/md5.php, to create an MD5 hash of the character string.


After the hashing process is complete, the new string represents the formDigest value:


48f0b12e4307e64edb781c479665c899

Append the hashed value to the formDigest parameter:


formDigest=48f0b12e4307e64edb781c479665c899

This is an example of a recurring FlexForms Dynamic Price request:


https://bill.ccbill.com/jpost/signup.cgi?clientAccnum=923130&clientSubacc=0000&formName=26cc&formPrice=10.00&formPeriod=30&formRecurringPrice=10.00&formRecurringPeriod=30&formRebills=99&currencyCode=840&formDigest=48f0b12e4307e64edb781c479665c899

If you receive an Invalid Digest error message when passing variables to your payment form, fix the issue by reading our guide for troubleshooting dynamic pricing errors.