Setting up a CCBill account
Optional: create 2 different subaccounts if you need to split one time and recurring transactions between different subaccounts.
Configure FlexForm
Go to FlexForms Systems → FlexForms Payment Links;
Create a FlexForm with Dynamic Price. (Dynamic Price should be activated by CCBill support);
Configure Approve redirect;
Approve URL: https://your-domain/payments/ccbillflexform/thankyou.html?result=success
// Replace your-domain with your actual domain address;You need to open a FlexForm in a Sandbox, and then click “Promote to Live”
Configure Webhooks
For every subaccount configure Webhooks here: Account Info → Sub Account Admin → Webhooks;
You need to add three webhooks
Webhook URL - https://your-domain/api/payment-systems/ccbill-flexform/webhook/sale
Webhook Format - JSON;
Event types - CrossSaleSuccess, NewSaleSuccess, UpSaleSuccess;Webhook URL - https://your-domain/api/payment-systems/ccbill-flexform/webhook/rebill
Webhook Format - JSON;
Event types - RenewalSuccess;Webhook URL - https://your-domain/api/payment-systems/ccbill-flexform/webhook/cancel
Webhook Format - JSON;
Event types - Cancellation, Expiration;
// Replace your-domain with your actual domain address.
Configure DataLink user to manage subscriptions from your site
For recurring subaccount create DataLink user here: Account Info → Data Link Service Suit → Add User
Fill in Username and Password fields
Select in Subsystems two SMS Services: SMS - cancelSubscription and SMS - viewSubscriptionStatus
// If you don’t have these options please request CCBill Support to enable SMS ServicesEnter next IPs
62.138.2.147 62.138.2.185 62.138.2.189 62.138.2.191 62.138.2.50
62.138.2.51 62.138.3.14 62.138.7.186 62.138.7.67 62.138.8.201
Setting up a CCBill account in the website settings:
In the website settings your-domain/admin/settings/payments add a new Payment method CCBillFlexForm;
Fill in:
a. Account ID;
b. One time Sub Account ID;
c. Recurring Sub Account ID; (could be same as one time or separate depending on your needs)
d. FlexForm ID;
e. Salt Key (you can find it in your CCBill settings Account Info → Sub Account Admin → --Advanced → Encryption Key);
f. API user - username of Datalink user
g. API password - password of Datalink userClick “Save”;
FlexForm is configured.
Notify ccbill support to enable CORS from your website
Send them your website url and ask to enable CORS requests sent to https://api.ccbill.com/payment-tokens/merchant-only payment url