CCBill RESTful Transaction API


The primary function of CCBill's RESTful API is to enable merchants to create payment tokens and use them to charge customers.

CCBill's RESTful API allows you to take full advantage of CCBill's payment platform without utilizing CCBill's hosted payment forms.

With the API, you only need to ask customers for payment information once. For any subsequent transactions, you can use their tokenized data.

You can develop customer-facing and backend applications to access RESTful API resources programmatically and seamlessly integrate CCBill's payment processing solutions into payment flows.

Use the RESTful API to deliver an engaging and frictionless checkout experience regardless of the device or platform the customer is using.

Getting Started

Merchants need to build apps that capture customer payment data and send structured API calls to CCBill RESTful API endpoints. The API requests must be structured according to the CCBill RESTful API documentation.

Before proceeding with the API integration, merchants must open a payment processing account and register their apps with CCBill.

1. Open a CCBill Merchant Account

If you do not have a CCBill Merchant account, contact CCBill Sales or use the APPLY NOW button on our website.

CCBill employs a dedicated team of professionals to assist merchants and ensure that the onboarding process is completed with minimal friction.

The Merchant Support Service is available 24/7 and offers complete technical and administrative support regarding CCBill services.

2. Register App with CCBill

The CCBill RESTful Transaction API uses bearer tokens to authenticate and authorize API requests. Before accessing the API, you need to register your application.

To register your app, reach out to CCBill Merchant Support and inform them you need a RESTful API setup on your CCBill merchant account.

Once the setup and registration are complete, the Merchant Support team provides the necessary credentials, including the merchant application ID and secret key. These two parameters are required to generate the bearer token.

In addition, the support team will set up a test account that allows you to test API calls and responses and optimize the RESTful API integration before going live.

The Payment Flow

1. Generate CCBill OAuth Bearer Token

Use the merchant application ID and secret key to generate a bearer token by providing them to the authorization server.

Once you have generated an access token (not to be confused with a payment token), include it in the Authorization header of each API request.

Please note that this step cannot be done from within the browser, and you must make the call from your backend.

The acquired access token is a random data string that does not hold sensitive data or have value.

It works only as an authentication and authorization tool and grants your application access to the RESTful API.

Example Request

curl - POST '' \

--header 'Content-Type: application/x-www-form-urlencoded' \

--header 'Authorization: Basic Merchant_ApplicationID:Secret_Key ' \

--data-urlencode 'grant_type=client_credentials'

2. Capture Customer Payment Information

Merchants can design custom payment forms and apps to capture customer credit card information.

The customer payment info (such as credit card number, exp. date, name on card, etc.) needs to be submitted as an API request to the correct API endpoint.

The CCBill RESTful API uses the captured data to create a unique payment token.

API Endpoint for Creating Payment Tokens

3. Create a Payment Token

The CCBill Advanced Widget enables merchants to automate payment token requests. Merchants can design their own interface to call the widget and generate payment tokens.

The JavaScript widget is hosted in a location accessible to merchants allowing them to reference and import the widget into their websites.

To maintain PCI compliance at all times, use CCBill’s Advanced Widget and ensure that payment details are sent directly to CCBill without them being sent through your server. Always load the CCBill’s JavaScript libraries via to remain compliant. Don’t bundle or host the scripts yourself.

The Advanced Widget also allows merchants to incorporate strong customer authentication.

The token can be passed on to the system in a transaction request, enabling you to charge a customer.

CCBill Advanced Widget Preload Link

<link rel="preload" href="" as="script"/>
<script type="text/javascript" src=""></script>

4. Charge Payment Token

After you have generated a bearer token and a payment token ID, you can use these two tokens to charge the consumer’s credit card.

Sending an API request to the /transactions endpoint allows you to charge a payment token or retrieve data on a charge.

Once the payment token has been charged, a webhooks HTTP POST notification will be triggered so that you can capture the transaction information. This webhooks event will be a “UpSaleSuccess”.

API Endpoint for Charging Payment Tokens{payment_token_id}

Technical Documentation