CCBill RESTful API Resources

This document outlines the resources and endpoints of the CCBill Transaction RESTful API service. It is intended for programmers, technicians, and others with advanced coding skills.

The CCBill RESTful Transaction API allows merchants to create payment tokens and use them to charge customers.

API Resources

The API base URL is https://api.ccbill.com and it provides the endpoints listed below.

CCBill Transaction API objects are formatted to follow the JSON (JavaScript Object Notation) open-standard file format and use the application/json content-type.

HEADER NAMECONTENT-TYPE
Content-Typeapplication/json

With each POST request, please supply the media type of the body of the request as a header.

Possible API version values include:

application/vnd.mcn.transaction-service.api.v.1+json

and

application/vnd.mcn.transaction-service.api.v.2+json

Pay special attention to the version in the URI path, as the version number affects schema data types.

/payment-tokens

Use the /payment-tokens resource to create a token that identifies a user in the system. The token can be passed on to the system in a transaction request, thus enabling you to bill a customer.

SUB-RESOURCEMETHODDESCRIPTION
/merchant-onlyPOSTGenerates a payment token for a specific merchant/client.
/merchant-only-verifyPOSTGenerates a payment token for a specific merchant/client. CVV2 is required for card transactions.
/{paymentTokenId}GETRetrieves details for the specified payment token (timeToLive, creation date, etc).
/threeds-requiredGETRetrieves whether or not 3DS/SCA is required for a given credit card.
/{paymentTokenId}/threeds-requiredGETRetrieves whether or not 3DS/SCA is required for a payment token.
/program-specifiedPOSTGenerates a payment token for the specified program participant.
/target-clientPOSTGenerates a payment token for the specified merchant/client. Requires active program participation.

/payment-tokens/merchant-only

Endpoint used for creating a payment token.

HTTP Request URL
Request Schema
Header
PARAMETERTYPEDESCRIPTION
Acceptstring
(enum)
API version

Possible API version values:

  • application/vnd.mcn.transaction-service.api.v.1+json
  • application/vnd.mcn.transaction-service.api.v.2+json

Example value:

  • application/vnd.mcn.transaction.service.api.v1+json
Request Parameters
PARAMETERTYPEDESCRIPTION
clientAccnuminteger
(required)
Merchant account number.
clientSubaccinteger
(required)
Merchant subaccount number.
customerInfoobject
(array)
Customer information.
customerInfo. emailstring
(required)
Customer's email address.
customerInfo. browserHttpAcceptLanguagestring
(optional)
List of acceptable human languages for response.
customerInfo. browserHttpUserAgentstring
(optional)
The user agent string of the user agent.
customerInfo. citystring
(required)
Customer's city.
customerInfo. browserHttpAcceptstring
(optional)
Media type(s) that is(/are) acceptable for the response.
customerInfo. statestring
(required)
Customer's state.
customerInfo. zipcodestring
(required)
Customer's zip code.
customerInfo. customerFnamestring
(required)
Customer's first name.
customerInfo. address1string
(required)
Customer's address.
customerInfo. address2string
(optional)
Customer's address (additional info).
customerInfo. browserHttpAcceptEncodingstring
(optional)
List of acceptable encodings.
customerInfo. customerLnamestring
(required)
Customer's last name.
customerInfo. ipAddressstring
(required)
Customer's IP address. Add as a request parameter or through X-Origin-IP header.
customerInfo. phoneNumberstring
(optional)
Customer's phone number.
customerInfo. countrystring
(required)
Customer's country.
paymentInfoobject
(array)
Payment information.
paymentInfo. cardNumstring
(required)
Card number.
paymentInfo. expMonthstring
(required)
Card expiration month in mm format.
paymentInfo. expYearstring
(required)
Card expiration year in yyyy format.
paymentInfo. nameOnCardstring
(required)
Name as it appears on the card.
subscriptionIdinteger
(required)
Transaction subscription identification number.
timeToLiveinteger
(optional)
Time for the token to exist.
validNumberOfUseinteger
(optional)
The total number of times the Payment Token can be used for purchases.

cURL

curl -X POST \
  https://api.ccbill.com/payment-tokens/merchant-only \
  -H 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOlsibWNuLXRyYW5zYWN0aW9uLXNlcnZpY2UiLCJtY24tYWRtaW4tc2VydmljZSJdLCJzY29wZSI6WyJjcmVhdGVfdG9rZW4iLCJyZWFkX3Rva2VuIiwiY2hhcmdlX3Rva2VuIiwiY3JlYXRlX3Byb2dyYW0iLCJyZWFkX3Byb2dyYW0iLCJjcmVhdGVfcHJvZ3JhbV9wYXJ0aWNpcGF0aW9uIiwicmVhZF9wcm9ncmFtX3BhcnRpY2lwYXRpb24iLCJtb2RpZnlfcHJvZ3JhbV9wYXJ0aWNpcGF0aW9uIl0sImV4cCI6MTUzNzM4MDczNiwiYXV0aG9yaXRpZXMiOlsiTUNOX0FQSV9UT0tFTl9DSEFSR0VSIiwiTUNOX0FQSV9UT0tFTl9DUkVBVE9SIiwiTUNOX0FQSV9BRE1JTiJdLCJqdGkiOiI4YzI2Njg1MC00NjMzLTQzZDMtYjZjOC1lNzIyY2ExNjQ1YTUiLCJjbGllbnRfaWQiOiI1MjE3NjhhYTc1OGQxMWU4YWE2YjAwNTA1NjlkMTU4NSJ9.HRYXZFATkIcI2_LJ1W_xo67IfBnbN9atyYNzyHqseLxYUxzgwBsAV5rNqCixKemOrDIeQLBN4jrwRsBIHDpEvshwBC8XmTodDJzpGmMaU9s1r20RV68X0_d1yTgSDke_Of7VCrVmJRbSuDl7AgsfTqQ1J7nWyu9vcIaER93ms-vadser_Ot9Z68_HAmCJL3DCLpdIFq3PYtBMKKKqXbvhfhSZQZD3b6-aewAnBo0VzpvK6tREqw1rv9_73oAvYcW2aHAj79ILr8viWMM40LyDKMMYOYkneg3hJUQsUVeh9WzztYUJKzERYNXje9fYIGN-eofoLvX7OZJ3eXmIfkrfQ' \
  -H 'Cache-Control: no-cache' \
  -H 'Content-Type: application/json' \
  -d '{ "clientAccnum": 900000, "clientSubacc": 0, "customerInfo": { "customerFname": "Tyler", "customerLname": "Thomas", "address1": "Woodland Drive", "address2": "Apt 21", "city": "Tempe", "state": "AZ", "zipcode": "85281", "country": "US", "phoneNumber": "5555555555", "email": "tthomas@xyz.com", "ipAddress": "10.70.60.14'\''", "browserHttpUserAgent": "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0", "browserHttpAccept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", "browserHttpAcceptLanguage": "en-US,en;q=0.5", "browserHttpAcceptEncoding": "gzip, deflate, br" }, "paymentInfo": { "creditCardPaymentInfo": { "cardNum": "4473707989493598", "nameOnCard": "Tyler Thomas", "expMonth": "04", "expYear": "2026" } }, "subscriptionId":900000000000000001, "timeToLive": 30, "validNumberOfUse": 3 }'

JavaScript

var data = JSON.stringify({
  "clientAccnum": 900000,
  "clientSubacc": 0,
  "customerInfo": {
    "customerFname": "Tyler",
    "customerLname": "Thomas",
    "address1": "Woodland Drive",
    "address2": "Apt 21",
    "city": "Tempe",
    "state": "AZ",
    "zipcode": "85281",
    "country": "US",
    "phoneNumber": "5555555555",
    "email": "tthomas@xyz.com",
    "ipAddress": "10.70.60.14'",
    "browserHttpUserAgent": "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0",
    "browserHttpAccept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
    "browserHttpAcceptLanguage": "en-US,en;q=0.5",
    "browserHttpAcceptEncoding": "gzip, deflate, br"
  },
  "paymentInfo": {
    "creditCardPaymentInfo": {
      "cardNum": "4473707989493598",
      "nameOnCard": "Tyler Thomas",
      "expMonth": "04",
      "expYear": "2026"
    }
  },
  "subscriptionId": 900000000000000000,
  "timeToLive": 30,
  "validNumberOfUse": 3
});

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === 4) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://api.ccbill.com/payment-tokens/merchant-only");
xhr.setRequestHeader("Content-Type", "application/json");
xhr.setRequestHeader("Authorization", "Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOlsibWNuLXRyYW5zYWN0aW9uLXNlcnZpY2UiLCJtY24tYWRtaW4tc2VydmljZSJdLCJzY29wZSI6WyJjcmVhdGVfdG9rZW4iLCJyZWFkX3Rva2VuIiwiY2hhcmdlX3Rva2VuIiwiY3JlYXRlX3Byb2dyYW0iLCJyZWFkX3Byb2dyYW0iLCJjcmVhdGVfcHJvZ3JhbV9wYXJ0aWNpcGF0aW9uIiwicmVhZF9wcm9ncmFtX3BhcnRpY2lwYXRpb24iLCJtb2RpZnlfcHJvZ3JhbV9wYXJ0aWNpcGF0aW9uIl0sImV4cCI6MTUzNzM4MDczNiwiYXV0aG9yaXRpZXMiOlsiTUNOX0FQSV9UT0tFTl9DSEFSR0VSIiwiTUNOX0FQSV9UT0tFTl9DUkVBVE9SIiwiTUNOX0FQSV9BRE1JTiJdLCJqdGkiOiI4YzI2Njg1MC00NjMzLTQzZDMtYjZjOC1lNzIyY2ExNjQ1YTUiLCJjbGllbnRfaWQiOiI1MjE3NjhhYTc1OGQxMWU4YWE2YjAwNTA1NjlkMTU4NSJ9.HRYXZFATkIcI2_LJ1W_xo67IfBnbN9atyYNzyHqseLxYUxzgwBsAV5rNqCixKemOrDIeQLBN4jrwRsBIHDpEvshwBC8XmTodDJzpGmMaU9s1r20RV68X0_d1yTgSDke_Of7VCrVmJRbSuDl7AgsfTqQ1J7nWyu9vcIaER93ms-vadser_Ot9Z68_HAmCJL3DCLpdIFq3PYtBMKKKqXbvhfhSZQZD3b6-aewAnBo0VzpvK6tREqw1rv9_73oAvYcW2aHAj79ILr8viWMM40LyDKMMYOYkneg3hJUQsUVeh9WzztYUJKzERYNXje9fYIGN-eofoLvX7OZJ3eXmIfkrfQ");
xhr.setRequestHeader("Cache-Control", "no-cache");

xhr.send(data);

PHP

<?php
$request = new HttpRequest();
$request->setUrl('https://api.ccbill.com/payment-tokens/merchant-only');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders(array(
  'Cache-Control' => 'no-cache',
  'Authorization' => 'Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOlsibWNuLXRyYW5zYWN0aW9uLXNlcnZpY2UiLCJtY24tYWRtaW4tc2VydmljZSJdLCJzY29wZSI6WyJjcmVhdGVfdG9rZW4iLCJyZWFkX3Rva2VuIiwiY2hhcmdlX3Rva2VuIiwiY3JlYXRlX3Byb2dyYW0iLCJyZWFkX3Byb2dyYW0iLCJjcmVhdGVfcHJvZ3JhbV9wYXJ0aWNpcGF0aW9uIiwicmVhZF9wcm9ncmFtX3BhcnRpY2lwYXRpb24iLCJtb2RpZnlfcHJvZ3JhbV9wYXJ0aWNpcGF0aW9uIl0sImV4cCI6MTUzNzM4MDczNiwiYXV0aG9yaXRpZXMiOlsiTUNOX0FQSV9UT0tFTl9DSEFSR0VSIiwiTUNOX0FQSV9UT0tFTl9DUkVBVE9SIiwiTUNOX0FQSV9BRE1JTiJdLCJqdGkiOiI4YzI2Njg1MC00NjMzLTQzZDMtYjZjOC1lNzIyY2ExNjQ1YTUiLCJjbGllbnRfaWQiOiI1MjE3NjhhYTc1OGQxMWU4YWE2YjAwNTA1NjlkMTU4NSJ9.HRYXZFATkIcI2_LJ1W_xo67IfBnbN9atyYNzyHqseLxYUxzgwBsAV5rNqCixKemOrDIeQLBN4jrwRsBIHDpEvshwBC8XmTodDJzpGmMaU9s1r20RV68X0_d1yTgSDke_Of7VCrVmJRbSuDl7AgsfTqQ1J7nWyu9vcIaER93ms-vadser_Ot9Z68_HAmCJL3DCLpdIFq3PYtBMKKKqXbvhfhSZQZD3b6-aewAnBo0VzpvK6tREqw1rv9_73oAvYcW2aHAj79ILr8viWMM40LyDKMMYOYkneg3hJUQsUVeh9WzztYUJKzERYNXje9fYIGN-eofoLvX7OZJ3eXmIfkrfQ',
  'Content-Type' => 'application/json'
));

$request->setBody('{ "clientAccnum": 900000, "clientSubacc": 0, "customerInfo": { "customerFname": "Tyler", "customerLname": "Thomas", "address1": "Woodland Drive", "address2": "Apt 21", "city": "Tempe", "state": "AZ", "zipcode": "85281", "country": "US", "phoneNumber": "5555555555", "email": "tthomas@xyz.com", "ipAddress": "10.70.60.14'", "browserHttpUserAgent": "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0", "browserHttpAccept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", "browserHttpAcceptLanguage": "en-US,en;q=0.5", "browserHttpAcceptEncoding": "gzip, deflate, br" }, "paymentInfo": { "creditCardPaymentInfo": { "cardNum": "4473707989493598", "nameOnCard": "Tyler Thomas", "expMonth": "04", "expYear": "2026" } }, "subscriptionId":900000000000000001, "timeToLive": 30, "validNumberOfUse": 3 }');

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
?>
Response Schemas
Response

The request has been successful. Extract the paymentTokenID string to create a charge for the customer.

Note: in PaymentTokenVerifyV2 subscriptionId is returned as a string. In the v1 sample below, subscriptionId is retuned as a number/integer.

Type PaymentToken
{ "createdDatetime": "datetime-only", "timeToLive": "integer", "originalPaymentTokenId": "string", "validNumberOfUse": "integer", "clientAccnum": "integer", "clientSubacc": "integer", "programParticipationId": "integer", "paymentTokenId": "string", "paymentInfoId": "string", "subscriptionId": "integer" }

Parameter Type Description
createdDatetime datetime-only (required) The date and time the Payment Token was created.
timeToLive integer (required) Defines how long the Payment Token is going to exist.
originalPaymentTokenId string (optional) Reference to a previous Token Id.
validNumberOfUse integer (required) Total number of times the Payment Token can be used for purchases.
clientAccnum integer (required) Merchant account number.
clientSubacc integer (required) Merchant subaccount number.
programParticipationId integer (required) Program connected to the Payment Token.
paymentTokenId string (required) Complex representation of Payment Token Id.
paymentInfoId string (optional) Information associated with the payment.
subscriptionId integer (required) Identification of the subscription associated with the transaction.

The response failed to complete due to an invalid header/parameter in the request.

Type Error
{ "id": "string", "url": "string", "errors": [ { "field": "string", "message": "string" } ], "generalMessage": "string", "errorCode": "string", "timestamp": "datetime" }

Parameter Type Description
id (required) string Randomly generated GUID.
Validation pattern: ^[a-zA-Z0-9-]*$
Example: "62432dd8-97d9-400a-8da8-4a5c1951f935"
url (required) string The RELATIVE URL that has caused this error. Example: "/programs/123"
errors ValidationError[object] Optional, only returned on 400 Bad Request errors for validation errors
errors. field (required) string Field in error
errors. message (required) string Descriptional message
generalMessage (required) string A human-readable message
errorCode (required) string Product defined error code.
Validation pattern: ^[0-9-]*$
timestamp (required) datetime Timestamp of the call

The response failed to complete due to authorization problem.

Type Error
{ "id": "string", "url": "string", "errors": [ { "field": "string", "message": "string" } ], "generalMessage": "string", "errorCode": "string", "timestamp": "datetime" }

Parameter Type Description
id (required) string Randomly generated GUID.
Validation pattern: ^[a-zA-Z0-9-]*$
Example: "62432dd8-97d9-400a-8da8-4a5c1951f935"
url (required) string The RELATIVE URL that has caused this error. Example: "/programs/123"
errors ValidationError[object] Optional, only returned on 400 Bad Request errors for validation errors
errors. field (required) string Field in error
errors. message (required) string Descriptional message
generalMessage (required) string A human-readable message
errorCode (required) string Product defined error code.
Validation pattern: ^[0-9-]*$
timestamp (required) datetime Timestamp of the call

The response failed to complete because access to the resource is forbidden.

Type Error
{ "id": "string", "url": "string", "errors": [ { "field": "string", "message": "string" } ], "generalMessage": "string", "errorCode": "string", "timestamp": "datetime" }

Parameter Type Description
id (required) string Randomly generated GUID.
Validation pattern: ^[a-zA-Z0-9-]*$
Example: "62432dd8-97d9-400a-8da8-4a5c1951f935"
url (required) string The RELATIVE URL that has caused this error. Example: "/programs/123"
errors ValidationError[object] Optional, only returned on 400 Bad Request errors for validation errors
errors. field (required) string Field in error
errors. message (required) string Descriptional message
generalMessage (required) string A human-readable message
errorCode (required) string Product defined error code.
Validation pattern: ^[0-9-]*$
timestamp (required) datetime Timestamp of the call

The response failed to complete due to an invalid resource.

Type Error
{ "id": "string", "url": "string", "errors": [ { "field": "string", "message": "string" } ], "generalMessage": "string", "errorCode": "string", "timestamp": "datetime" }

Parameter Type Description
id (required) string Randomly generated GUID.
Validation pattern: ^[a-zA-Z0-9-]*$
Example: "62432dd8-97d9-400a-8da8-4a5c1951f935"
url (required) string The RELATIVE URL that has caused this error. Example: "/programs/123"
errors ValidationError[object] Optional, only returned on 400 Bad Request errors for validation errors
errors. field (required) string Field in error
errors. message (required) string Descriptional message
generalMessage (required) string A human-readable message
errorCode (required) string Product defined error code.
Validation pattern: ^[0-9-]*$
timestamp (required) datetime Timestamp of the call

The response failed to complete due to an invalid method of request.

Type Error
{ "id": "string", "url": "string", "errors": [ { "field": "string", "message": "string" } ], "generalMessage": "string", "errorCode": "string", "timestamp": "datetime" }

Parameter Type Description
id (required) string Randomly generated GUID.
Validation pattern: ^[a-zA-Z0-9-]*$
Example: "62432dd8-97d9-400a-8da8-4a5c1951f935"
url (required) string The RELATIVE URL that has caused this error. Example: "/programs/123"
errors ValidationError[object] Optional, only returned on 400 Bad Request errors for validation errors
errors. field (required) string Field in error
errors. message (required) string Descriptional message
generalMessage (required) string A human-readable message
errorCode (required) string Product defined error code.
Validation pattern: ^[0-9-]*$
timestamp (required) datetime Timestamp of the call

The response failed to complete due to an unacceptable media type in the request.

Type Error
{ "id": "string", "url": "string", "errors": [ { "field": "string", "message": "string" } ], "generalMessage": "string", "errorCode": "string", "timestamp": "datetime" }

Parameter Type Description
id (required) string Randomly generated GUID.
Validation pattern: ^[a-zA-Z0-9-]*$
Example: "62432dd8-97d9-400a-8da8-4a5c1951f935"
url (required) string The RELATIVE URL that has caused this error. Example: "/programs/123"
errors ValidationError[object] Optional, only returned on 400 Bad Request errors for validation errors
errors. field (required) string Field in error
errors. message (required) string Descriptional message
generalMessage (required) string A human-readable message
errorCode (required) string Product defined error code.
Validation pattern: ^[0-9-]*$
timestamp (required) datetime Timestamp of the call

The response failed to complete due to an unsupported media type in the request.

Type Error
{ "id": "string", "url": "string", "errors": [ { "field": "string", "message": "string" } ], "generalMessage": "string", "errorCode": "string", "timestamp": "datetime" }

Parameter Type Description
id (required) string Randomly generated GUID.
Validation pattern: ^[a-zA-Z0-9-]*$
Example: "62432dd8-97d9-400a-8da8-4a5c1951f935"
url (required) string The RELATIVE URL that has caused this error. Example: "/programs/123"
errors ValidationError[object] Optional, only returned on 400 Bad Request errors for validation errors
errors. field (required) string Field in error
errors. message (required) string Descriptional message
generalMessage (required) string A human-readable message
errorCode (required) string Product defined error code.
Validation pattern: ^[0-9-]*$
timestamp (required) datetime Timestamp of the call

The response failed to complete in some way.

Type Error
{ "id": "string", "url": "string", "errors": [ { "field": "string", "message": "string" } ], "generalMessage": "string", "errorCode": "string", "timestamp": "datetime" }

Parameter Type Description
id (required) string Randomly generated GUID.
Validation pattern: ^[a-zA-Z0-9-]*$
Example: "62432dd8-97d9-400a-8da8-4a5c1951f935"
url (required) string The RELATIVE URL that has caused this error. Example: "/programs/123"
errors ValidationError[object] Optional, only returned on 400 Bad Request errors for validation errors
errors. field (required) string Field in error
errors. message (required) string Descriptional message
generalMessage (required) string A human-readable message
errorCode (required) string Product defined error code.
Validation pattern: ^[0-9-]*$
timestamp (required) datetime Timestamp of the call

/payment-tokens/merchant-only-verify

The resource is used to enhance authentication during payment token creation. This endpoint includes cvvResponse and avsResponse parameters in the response. These parameters help in reducing the chargeback ratios for merchants.

HTTP Request URL
Request Schema
Header
PARAMETERTYPEDESCRIPTION
Acceptstring
(enum)
API version

Example values:

  • application/vnd.mcn.transaction-service.api.v.1+json
  • application/vnd.mcn.transaction-service.api.v.2+json
Request Parameters
PARAMETERTYPEDESCRIPTION
clientAccnuminteger
(required)
Merchant account number.
clientSubaccinteger
(required)
Merchant subaccount number.
customerInfoobject
(array)
Customer information.
customerInfo. emailstring
(required)
Customer's email address.
customerInfo. browserHttpAcceptLanguagestring
(optional)
List of acceptable human languages for the response.
customerInfo. browserHttpUserAgentstring
(optional)
The user agent string of the user agent.
customerInfo. citystring
(required)
Customer's city.
customerInfo. browserHttpAcceptstring
(optional)
Media type(s) that is(/are) acceptable for the response.
customerInfo. statestring
(required)
Customer's state.
customerInfo. zipcodestring
(required)
Customer's zip code.
customerInfo. customerFnamestring
(required)
Customer's first name.
customerInfo. address1string
(required)
Customer's address.
customerInfo. address2string
(optional)
Customer's address (additional info).
customerInfo. browserHttpAcceptEncodingstring
(optional)
List of acceptable encodings.
customerInfo. customerLnamestring
(required)
Customer's last name.
customerInfo. ipAddressstring
(required)
Customer's IP address. Add as a request parameter or through X-Origin-IP header.
customerInfo. phoneNumberstring
(optional)
Customer's phone number.
customerInfo. countrystring
(required)
Customer's country.
paymentInfoobject
(array)
Payment information.
paymentInfo. cardNumstring
(required)
Card number.
paymentInfo. expMonthstring
(required)
Card expiration month in mm format.
paymentInfo. expYearstring
(required)
Card expiration year in yyyy format.
paymentInfo. nameOnCardstring
(required)
Name as it appears on the card.
paymentInfo. cvv2string
(required)
CVV2 code on the card.
subscriptionIdinteger
(required)
Transaction subscription identification number.
timeToLiveinteger
(optional)
Time for the token to exist.
validNumberOfUseinteger
(optional)
The total number of times the Payment Token can be used for purchases.

cURL

curl -X POST \
  https://api.ccbill.com/payment-tokens/merchant-only-verify \
  -H 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOlsibWNuLXRyYW5zYWN0aW9uLXNlcnZpY2UiLCJtY24tYWRtaW4tc2VydmljZSJdLCJzY29wZSI6WyJjcmVhdGVfdG9rZW4iLCJyZWFkX3Rva2VuIiwiY2hhcmdlX3Rva2VuIiwiY3JlYXRlX3Byb2dyYW0iLCJyZWFkX3Byb2dyYW0iLCJjcmVhdGVfcHJvZ3JhbV9wYXJ0aWNpcGF0aW9uIiwicmVhZF9wcm9ncmFtX3BhcnRpY2lwYXRpb24iLCJtb2RpZnlfcHJvZ3JhbV9wYXJ0aWNpcGF0aW9uIl0sImV4cCI6MTUzNzM4MDczNiwiYXV0aG9yaXRpZXMiOlsiTUNOX0FQSV9UT0tFTl9DSEFSR0VSIiwiTUNOX0FQSV9UT0tFTl9DUkVBVE9SIiwiTUNOX0FQSV9BRE1JTiJdLCJqdGkiOiI4YzI2Njg1MC00NjMzLTQzZDMtYjZjOC1lNzIyY2ExNjQ1YTUiLCJjbGllbnRfaWQiOiI1MjE3NjhhYTc1OGQxMWU4YWE2YjAwNTA1NjlkMTU4NSJ9.HRYXZFATkIcI2_LJ1W_xo67IfBnbN9atyYNzyHqseLxYUxzgwBsAV5rNqCixKemOrDIeQLBN4jrwRsBIHDpEvshwBC8XmTodDJzpGmMaU9s1r20RV68X0_d1yTgSDke_Of7VCrVmJRbSuDl7AgsfTqQ1J7nWyu9vcIaER93ms-vadser_Ot9Z68_HAmCJL3DCLpdIFq3PYtBMKKKqXbvhfhSZQZD3b6-aewAnBo0VzpvK6tREqw1rv9_73oAvYcW2aHAj79ILr8viWMM40LyDKMMYOYkneg3hJUQsUVeh9WzztYUJKzERYNXje9fYIGN-eofoLvX7OZJ3eXmIfkrfQ' \
  -H 'Cache-Control: no-cache' \
  -H 'Content-Type: application/json' \
  -d '{ "clientAccnum": 900000, "clientSubacc": 0, "customerInfo": { "customerFname": "Tyler", "customerLname": "Thomas", "address1": "Woodland Drive", "address2": "Apt 21", "city": "Tempe", "state": "AZ", "zipcode": "85281", "country": "US", "phoneNumber": "5555555555", "email": "tthomas@xyz.com", "ipAddress": "10.70.60.14'\''", "browserHttpUserAgent": "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0", "browserHttpAccept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", "browserHttpAcceptLanguage": "en-US,en;q=0.5", "browserHttpAcceptEncoding": "gzip, deflate, br" }, "paymentInfo": { "creditCardPaymentInfo": { "cardNum": "4473707989493598", "nameOnCard": "Tyler Thomas", "expMonth": "04", "expYear": "2026", "cvv2": "123" } }, "subscriptionId":900000000000000001, "timeToLive": 30, "validNumberOfUse": 3 }'

JavaScript

var data = JSON.stringify({
  "clientAccnum": 900000,
  "clientSubacc": 0,
  "customerInfo": {
    "customerFname": "Tyler",
    "customerLname": "Thomas",
    "address1": "Woodland Drive",
    "address2": "Apt 21",
    "city": "Tempe",
    "state": "AZ",
    "zipcode": "85281",
    "country": "US",
    "phoneNumber": "5555555555",
    "email": "tthomas@xyz.com",
    "ipAddress": "10.70.60.14'",
    "browserHttpUserAgent": "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0",
    "browserHttpAccept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
    "browserHttpAcceptLanguage": "en-US,en;q=0.5",
    "browserHttpAcceptEncoding": "gzip, deflate, br"
  },
  "paymentInfo": {
    "creditCardPaymentInfo": {
      "cardNum": "4473707989493598",
      "nameOnCard": "Tyler Thomas",
      "expMonth": "04",
      "expYear": "2026",
      "cvv2": "123"
    }
  },
  "subscriptionId": 900000000000000000,
  "timeToLive": 30,
  "validNumberOfUse": 3
});

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === 4) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://api.ccbill.com/payment-tokens/merchant-only-verify");
xhr.setRequestHeader("Content-Type", "application/json");
xhr.setRequestHeader("Authorization", "Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOlsibWNuLXRyYW5zYWN0aW9uLXNlcnZpY2UiLCJtY24tYWRtaW4tc2VydmljZSJdLCJzY29wZSI6WyJjcmVhdGVfdG9rZW4iLCJyZWFkX3Rva2VuIiwiY2hhcmdlX3Rva2VuIiwiY3JlYXRlX3Byb2dyYW0iLCJyZWFkX3Byb2dyYW0iLCJjcmVhdGVfcHJvZ3JhbV9wYXJ0aWNpcGF0aW9uIiwicmVhZF9wcm9ncmFtX3BhcnRpY2lwYXRpb24iLCJtb2RpZnlfcHJvZ3JhbV9wYXJ0aWNpcGF0aW9uIl0sImV4cCI6MTUzNzM4MDczNiwiYXV0aG9yaXRpZXMiOlsiTUNOX0FQSV9UT0tFTl9DSEFSR0VSIiwiTUNOX0FQSV9UT0tFTl9DUkVBVE9SIiwiTUNOX0FQSV9BRE1JTiJdLCJqdGkiOiI4YzI2Njg1MC00NjMzLTQzZDMtYjZjOC1lNzIyY2ExNjQ1YTUiLCJjbGllbnRfaWQiOiI1MjE3NjhhYTc1OGQxMWU4YWE2YjAwNTA1NjlkMTU4NSJ9.HRYXZFATkIcI2_LJ1W_xo67IfBnbN9atyYNzyHqseLxYUxzgwBsAV5rNqCixKemOrDIeQLBN4jrwRsBIHDpEvshwBC8XmTodDJzpGmMaU9s1r20RV68X0_d1yTgSDke_Of7VCrVmJRbSuDl7AgsfTqQ1J7nWyu9vcIaER93ms-vadser_Ot9Z68_HAmCJL3DCLpdIFq3PYtBMKKKqXbvhfhSZQZD3b6-aewAnBo0VzpvK6tREqw1rv9_73oAvYcW2aHAj79ILr8viWMM40LyDKMMYOYkneg3hJUQsUVeh9WzztYUJKzERYNXje9fYIGN-eofoLvX7OZJ3eXmIfkrfQ");
xhr.setRequestHeader("Cache-Control", "no-cache");

xhr.send(data);

PHP

<?php
$request = new HttpRequest();
$request->setUrl('https://api.ccbill.com/payment-tokens/merchant-only-verify');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders(array(
  'Cache-Control' => 'no-cache',
  'Authorization' => 'Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOlsibWNuLXRyYW5zYWN0aW9uLXNlcnZpY2UiLCJtY24tYWRtaW4tc2VydmljZSJdLCJzY29wZSI6WyJjcmVhdGVfdG9rZW4iLCJyZWFkX3Rva2VuIiwiY2hhcmdlX3Rva2VuIiwiY3JlYXRlX3Byb2dyYW0iLCJyZWFkX3Byb2dyYW0iLCJjcmVhdGVfcHJvZ3JhbV9wYXJ0aWNpcGF0aW9uIiwicmVhZF9wcm9ncmFtX3BhcnRpY2lwYXRpb24iLCJtb2RpZnlfcHJvZ3JhbV9wYXJ0aWNpcGF0aW9uIl0sImV4cCI6MTUzNzM4MDczNiwiYXV0aG9yaXRpZXMiOlsiTUNOX0FQSV9UT0tFTl9DSEFSR0VSIiwiTUNOX0FQSV9UT0tFTl9DUkVBVE9SIiwiTUNOX0FQSV9BRE1JTiJdLCJqdGkiOiI4YzI2Njg1MC00NjMzLTQzZDMtYjZjOC1lNzIyY2ExNjQ1YTUiLCJjbGllbnRfaWQiOiI1MjE3NjhhYTc1OGQxMWU4YWE2YjAwNTA1NjlkMTU4NSJ9.HRYXZFATkIcI2_LJ1W_xo67IfBnbN9atyYNzyHqseLxYUxzgwBsAV5rNqCixKemOrDIeQLBN4jrwRsBIHDpEvshwBC8XmTodDJzpGmMaU9s1r20RV68X0_d1yTgSDke_Of7VCrVmJRbSuDl7AgsfTqQ1J7nWyu9vcIaER93ms-vadser_Ot9Z68_HAmCJL3DCLpdIFq3PYtBMKKKqXbvhfhSZQZD3b6-aewAnBo0VzpvK6tREqw1rv9_73oAvYcW2aHAj79ILr8viWMM40LyDKMMYOYkneg3hJUQsUVeh9WzztYUJKzERYNXje9fYIGN-eofoLvX7OZJ3eXmIfkrfQ',
  'Content-Type' => 'application/json'
));

$request->setBody('{ "clientAccnum": 900000, "clientSubacc": 0, "customerInfo": { "customerFname": "Tyler", "customerLname": "Thomas", "address1": "Woodland Drive", "address2": "Apt 21", "city": "Tempe", "state": "AZ", "zipcode": "85281", "country": "US", "phoneNumber": "5555555555", "email": "tthomas@xyz.com", "ipAddress": "10.70.60.14'", "browserHttpUserAgent": "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0", "browserHttpAccept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", "browserHttpAcceptLanguage": "en-US,en;q=0.5", "browserHttpAcceptEncoding": "gzip, deflate, br" }, "paymentInfo": { "creditCardPaymentInfo": { "cardNum": "4473707989493598", "nameOnCard": "Tyler Thomas", "expMonth": "04", "expYear": "2026", "cvv2": "123" } }, "subscriptionId":900000000000000001, "timeToLive": 30, "validNumberOfUse": 3 }');

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
?>
Response Schemas
Response

The request has been successful. Extract the paymentTokenID string to create a charge for the customer.

Type PaymentTokenVerify
{ "createdDatetime": "datetime-only", "timeToLive": "integer", "originalPaymentTokenId": "string", "validNumberOfUse": "integer", "clientAccnum": "integer", "clientSubacc": "integer", "programParticipationId": "integer", "avsResponse": "string", "paymentTokenId": "string", "paymentInfoId": "string", "cvv2Response": "string", "subscriptionId": "integer" }

Parameter Type Description
createdDatetime (required) datetime-only Date and uime of creation of the Payment Token.
timeToLive (required) integer Time for the token to exist (hours)
originalPaymentTokenId string Reference to a previous Token Id
validNumberOfUse (required) integer Total number of times the Payment Token can be used for purchases
clientAccnum (required) integer Merchant account number
clientSubacc (required) integer Merchant subaccount number
programParticipationId (required) integer The Program connected to the Payment Token
avsResponse (required) string The result of AVS verification
paymentTokenId (required) string Complex representation of Payment Token Id
paymentInfoId string Information associated with the payment
cvv2Response (required) string The result of CVV2 verification
subscriptionId (required) integer Identification of the subscription associated with the transaction

The response failed to complete due to an invalid header/parameter in the request.

Type Error
{ "id": "string", "url": "string", "errors": [ { "field": "string", "message": "string" } ], "generalMessage": "string", "errorCode": "string", "timestamp": "datetime" }

Parameter Type Description
id (required) string Randomly generated GUID.
Validation pattern: ^[a-zA-Z0-9-]*$
Example: "62432dd8-97d9-400a-8da8-4a5c1951f935"
url (required) string The RELATIVE URL that has caused this error. Example: "/programs/123"
errors ValidationError[object] Optional, only returned on 400 Bad Request errors for validation errors
errors. field (required) string Field in error
errors. message (required) string Descriptional message
generalMessage (required) string A human-readable message
errorCode (required) string Product defined error code.
Validation pattern: ^[0-9-]*$
timestamp (required) datetime Timestamp of the call

The response failed to complete due to authorization problem.

Type Error
{ "id": "string", "url": "string", "errors": [ { "field": "string", "message": "string" } ], "generalMessage": "string", "errorCode": "string", "timestamp": "datetime" }

Parameter Type Description
id (required) string Randomly generated GUID.
Validation pattern: ^[a-zA-Z0-9-]*$
Example: "62432dd8-97d9-400a-8da8-4a5c1951f935"
url (required) string The RELATIVE URL that has caused this error. Example: "/programs/123"
errors ValidationError[object] Optional, only returned on 400 Bad Request errors for validation errors
errors. field (required) string Field in error
errors. message (required) string Descriptional message
generalMessage (required) string A human-readable message
errorCode (required) string Product defined error code.
Validation pattern: ^[0-9-]*$
timestamp (required) datetime Timestamp of the call

The response failed to complete because access to the resource is forbidden.

Type Error
{ "id": "string", "url": "string", "errors": [ { "field": "string", "message": "string" } ], "generalMessage": "string", "errorCode": "string", "timestamp": "datetime" }

Parameter Type Description
id (required) string Randomly generated GUID.
Validation pattern: ^[a-zA-Z0-9-]*$
Example: "62432dd8-97d9-400a-8da8-4a5c1951f935"
url (required) string The RELATIVE URL that has caused this error. Example: "/programs/123"
errors ValidationError[object] Optional, only returned on 400 Bad Request errors for validation errors
errors. field (required) string Field in error
errors. message (required) string Descriptional message
generalMessage (required) string A human-readable message
errorCode (required) string Product defined error code.
Validation pattern: ^[0-9-]*$
timestamp (required) datetime Timestamp of the call

The response failed to complete due to an invalid resource.

Type Error
{ "id": "string", "url": "string", "errors": [ { "field": "string", "message": "string" } ], "generalMessage": "string", "errorCode": "string", "timestamp": "datetime" }

Parameter Type Description
id (required) string Randomly generated GUID.
Validation pattern: ^[a-zA-Z0-9-]*$
Example: "62432dd8-97d9-400a-8da8-4a5c1951f935"
url (required) string The RELATIVE URL that has caused this error. Example: "/programs/123"
errors ValidationError[object] Optional, only returned on 400 Bad Request errors for validation errors
errors. field (required) string Field in error
errors. message (required) string Descriptional message
generalMessage (required) string A human-readable message
errorCode (required) string Product defined error code.
Validation pattern: ^[0-9-]*$
timestamp (required) datetime Timestamp of the call

The response failed to complete due to an invalid method of request.

Type Error
{ "id": "string", "url": "string", "errors": [ { "field": "string", "message": "string" } ], "generalMessage": "string", "errorCode": "string", "timestamp": "datetime" }

Parameter Type Description
id (required) string Randomly generated GUID.
Validation pattern: ^[a-zA-Z0-9-]*$
Example: "62432dd8-97d9-400a-8da8-4a5c1951f935"
url (required) string The RELATIVE URL that has caused this error. Example: "/programs/123"
errors ValidationError[object] Optional, only returned on 400 Bad Request errors for validation errors
errors. field (required) string Field in error
errors. message (required) string Descriptional message
generalMessage (required) string A human-readable message
errorCode (required) string Product defined error code.
Validation pattern: ^[0-9-]*$
timestamp (required) datetime Timestamp of the call

The response failed to complete due to an unacceptable media type in the request.

Type Error
{ "id": "string", "url": "string", "errors": [ { "field": "string", "message": "string" } ], "generalMessage": "string", "errorCode": "string", "timestamp": "datetime" }

Parameter Type Description
id (required) string Randomly generated GUID.
Validation pattern: ^[a-zA-Z0-9-]*$
Example: "62432dd8-97d9-400a-8da8-4a5c1951f935"
url (required) string The RELATIVE URL that has caused this error. Example: "/programs/123"
errors ValidationError[object] Optional, only returned on 400 Bad Request errors for validation errors
errors. field (required) string Field in error
errors. message (required) string Descriptional message
generalMessage (required) string A human-readable message
errorCode (required) string Product defined error code.
Validation pattern: ^[0-9-]*$
timestamp (required) datetime Timestamp of the call

The response failed to complete due to an unsupported media type in the request.

Type Error
{ "id": "string", "url": "string", "errors": [ { "field": "string", "message": "string" } ], "generalMessage": "string", "errorCode": "string", "timestamp": "datetime" }

Parameter Type Description
id (required) string Randomly generated GUID.
Validation pattern: ^[a-zA-Z0-9-]*$
Example: "62432dd8-97d9-400a-8da8-4a5c1951f935"
url (required) string The RELATIVE URL that has caused this error. Example: "/programs/123"
errors ValidationError[object] Optional, only returned on 400 Bad Request errors for validation errors
errors. field (required) string Field in error
errors. message (required) string Descriptional message
generalMessage (required) string A human-readable message
errorCode (required) string Product defined error code.
Validation pattern: ^[0-9-]*$
timestamp (required) datetime Timestamp of the call

The response failed to complete in some way.

Type Error
{ "id": "string", "url": "string", "errors": [ { "field": "string", "message": "string" } ], "generalMessage": "string", "errorCode": "string", "timestamp": "datetime" }

Parameter Type Description
id (required) string Randomly generated GUID.
Validation pattern: ^[a-zA-Z0-9-]*$
Example: "62432dd8-97d9-400a-8da8-4a5c1951f935"
url (required) string The RELATIVE URL that has caused this error. Example: "/programs/123"
errors ValidationError[object] Optional, only returned on 400 Bad Request errors for validation errors
errors. field (required) string Field in error
errors. message (required) string Descriptional message
generalMessage (required) string A human-readable message
errorCode (required) string Product defined error code.
Validation pattern: ^[0-9-]*$
timestamp (required) datetime Timestamp of the call

/payment-tokens/{paymentTokenId}

Use this request to retrieve details of a Payment Token based on its ID.

HTTP Request URL
URI Parameter
PARAMETERTYPEDESCRIPTION
paymentTokenIdstring
(required)
Complex representation of the Payment Token Id.
Header
PARAMETERTYPEDESCRIPTION
Acceptstring
(enum)
API version

Possible Values:

  • application/vnd.mcn.transaction-service.api.v.1+json
  • application/vnd.mcn.transaction-service.api.v.2+json

Example Value:

  • application/vnd.mcn.transaction-service.api.v.1+json

cURL

curl -X GET \
  https://api.ccbill.com/payment-tokens/01047ed6f3b440c7a2ccc6abc1ad0a84 \
  -H 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOlsibWNuLXRyYW5zYWN0aW9uLXNlcnZpY2UiLCJtY24tYWRtaW4tc2VydmljZSJdLCJzY29wZSI6WyJjcmVhdGVfdG9rZW4iLCJyZWFkX3Rva2VuIiwiY2hhcmdlX3Rva2VuIiwiY3JlYXRlX3Byb2dyYW0iLCJyZWFkX3Byb2dyYW0iLCJyZWFkX3Byb2dyYW1fcGFydGljaXBhdGlvbiIsIm1vZGlmeV9wcm9ncmFtX3BhcnRpY2lwYXRpb24iXSwiZXhwIjoxNTM2MjcwMTE2LCJhdXRob3JpdGllcyI6WyJNQ05fQVBJX1RPS0VOX0NIQVJHRVIiLCJNQ05fQVBJX1RPS0VOX0NSRUFUT1IiLCJNQ05fQVBJX0FETUlOIl0sImp0aSI6IjlkZjQ5M2NjLTNmNDAtNDdmYS04ZjIwLWFiYWM5NTljOWFjYyIsImNsaWVudF9pZCI6IjUyMTc2OGFhNzU4ZDExZThhYTZiMDA1MDU2OWQxNTg1In0.e6pUqftnUlJcaz1rsxsoCBcitPvnAwAwp1ZiBl77ht0dsVRBUg3vOvruGzxELjVPKWFnu8NFXEJKEhoQXkZuqn2AiiM1u9mOJUtyQ9c1KgEMq6yTCQ_QIxGsrYcwkkr_B2yw5p_q6KHCcaAAAq4HGkKdHbo8C1GHvApD0Q7DVWRmie265Da6ln4Y1_wFHADKYTktCtLhBr4rv-5bmWHy25GKPZgIHViMrJmwSKqG2kC60JEYDrOsZsajhicbKPytXDw9X0Z6PcYPyRCkpz5I1FjsXJmIJnSKLwG8fPC2AOYPqF4p30BHLaCxvtS29jSbpfZj1W0pt708ipZSOlwHAw' \
  -H 'Cache-Control: no-cache'

JavaScript

var data = null;

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === 4) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.ccbill.com/payment-tokens/01047ed6f3b440c7a2ccc6abc1ad0a84");
xhr.setRequestHeader("Authorization", "Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOlsibWNuLXRyYW5zYWN0aW9uLXNlcnZpY2UiLCJtY24tYWRtaW4tc2VydmljZSJdLCJzY29wZSI6WyJjcmVhdGVfdG9rZW4iLCJyZWFkX3Rva2VuIiwiY2hhcmdlX3Rva2VuIiwiY3JlYXRlX3Byb2dyYW0iLCJyZWFkX3Byb2dyYW0iLCJyZWFkX3Byb2dyYW1fcGFydGljaXBhdGlvbiIsIm1vZGlmeV9wcm9ncmFtX3BhcnRpY2lwYXRpb24iXSwiZXhwIjoxNTM2MjcwMTE2LCJhdXRob3JpdGllcyI6WyJNQ05fQVBJX1RPS0VOX0NIQVJHRVIiLCJNQ05fQVBJX1RPS0VOX0NSRUFUT1IiLCJNQ05fQVBJX0FETUlOIl0sImp0aSI6IjlkZjQ5M2NjLTNmNDAtNDdmYS04ZjIwLWFiYWM5NTljOWFjYyIsImNsaWVudF9pZCI6IjUyMTc2OGFhNzU4ZDExZThhYTZiMDA1MDU2OWQxNTg1In0.e6pUqftnUlJcaz1rsxsoCBcitPvnAwAwp1ZiBl77ht0dsVRBUg3vOvruGzxELjVPKWFnu8NFXEJKEhoQXkZuqn2AiiM1u9mOJUtyQ9c1KgEMq6yTCQ_QIxGsrYcwkkr_B2yw5p_q6KHCcaAAAq4HGkKdHbo8C1GHvApD0Q7DVWRmie265Da6ln4Y1_wFHADKYTktCtLhBr4rv-5bmWHy25GKPZgIHViMrJmwSKqG2kC60JEYDrOsZsajhicbKPytXDw9X0Z6PcYPyRCkpz5I1FjsXJmIJnSKLwG8fPC2AOYPqF4p30BHLaCxvtS29jSbpfZj1W0pt708ipZSOlwHAw");
xhr.setRequestHeader("Cache-Control", "no-cache");

xhr.send(data);

PHP

<?php
$request = new HttpRequest();
$request->setUrl('https://api.ccbill.com/payment-tokens/01047ed6f3b440c7a2ccc6abc1ad0a84');
$request->setMethod(HTTP_METH_GET);

$request->setHeaders(array(
  'Cache-Control' => 'no-cache',
  'Authorization' => 'Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOlsibWNuLXRyYW5zYWN0aW9uLXNlcnZpY2UiLCJtY24tYWRtaW4tc2VydmljZSJdLCJzY29wZSI6WyJjcmVhdGVfdG9rZW4iLCJyZWFkX3Rva2VuIiwiY2hhcmdlX3Rva2VuIiwiY3JlYXRlX3Byb2dyYW0iLCJyZWFkX3Byb2dyYW0iLCJyZWFkX3Byb2dyYW1fcGFydGljaXBhdGlvbiIsIm1vZGlmeV9wcm9ncmFtX3BhcnRpY2lwYXRpb24iXSwiZXhwIjoxNTM2MjcwMTE2LCJhdXRob3JpdGllcyI6WyJNQ05fQVBJX1RPS0VOX0NIQVJHRVIiLCJNQ05fQVBJX1RPS0VOX0NSRUFUT1IiLCJNQ05fQVBJX0FETUlOIl0sImp0aSI6IjlkZjQ5M2NjLTNmNDAtNDdmYS04ZjIwLWFiYWM5NTljOWFjYyIsImNsaWVudF9pZCI6IjUyMTc2OGFhNzU4ZDExZThhYTZiMDA1MDU2OWQxNTg1In0.e6pUqftnUlJcaz1rsxsoCBcitPvnAwAwp1ZiBl77ht0dsVRBUg3vOvruGzxELjVPKWFnu8NFXEJKEhoQXkZuqn2AiiM1u9mOJUtyQ9c1KgEMq6yTCQ_QIxGsrYcwkkr_B2yw5p_q6KHCcaAAAq4HGkKdHbo8C1GHvApD0Q7DVWRmie265Da6ln4Y1_wFHADKYTktCtLhBr4rv-5bmWHy25GKPZgIHViMrJmwSKqG2kC60JEYDrOsZsajhicbKPytXDw9X0Z6PcYPyRCkpz5I1FjsXJmIJnSKLwG8fPC2AOYPqF4p30BHLaCxvtS29jSbpfZj1W0pt708ipZSOlwHAw'
));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
?>
Response Schemas
Response

The request has been successful. Extract the paymentTokenID string to create a charge for the customer.

Type PaymentToken
{ "createdDatetime": "datetime-only", "timeToLive": "integer", "originalPaymentTokenId": "string", "validNumberOfUse": "integer", "clientAccnum": "integer", "clientSubacc": "integer", "programParticipationId": "integer", "paymentTokenId": "string", "paymentInfoId": "string", "subscriptionId": "integer" }

Parameter Type Description
createdDatetime (required) datetime-only Date and uime of creation of the Payment Token.
timeToLive (required) integer Time for the token to exist expressed in hours
originalPaymentTokenId string Reference to a previous Token Id
validNumberOfUse (required) integer Total number of times the Payment Token can be used for purchases
clientAccnum (required) integer Merchant account number
clientSubacc (required) integer Merchant subaccount number
programParticipationId (required) integer The Program connected to the Payment Token
paymentTokenId (required) string Complex representation of Payment Token Id
paymentInfoId string Information associated with the payment
subscriptionId (required) integer Identification of the subscription associated with the transaction

The response failed to complete due to an invalid header/parameter in the request.

Type Error
{ "id": "string", "url": "string", "errors": [ { "field": "string", "message": "string" } ], "generalMessage": "string", "errorCode": "string", "timestamp": "datetime" }

Parameter Type Description
id (required) string Randomly generated GUID.
Validation pattern: ^[a-zA-Z0-9-]*$
Example: "62432dd8-97d9-400a-8da8-4a5c1951f935"
url (required) string The RELATIVE URL that has caused this error. Example: "/programs/123"
errors ValidationError[object] Optional, only returned on 400 Bad Request errors for validation errors
errors. field (required) string Field in error
errors. message (required) string Descriptional message
generalMessage (required) string A human-readable message
errorCode (required) string Product defined error code.
Validation pattern: ^[0-9-]*$
timestamp (required) datetime Timestamp of the call

The response failed to complete due to authorization problem.

Type Error
{ "id": "string", "url": "string", "errors": [ { "field": "string", "message": "string" } ], "generalMessage": "string", "errorCode": "string", "timestamp": "datetime" }

Parameter Type Description
id (required) string Randomly generated GUID.
Validation pattern: ^[a-zA-Z0-9-]*$
Example: "62432dd8-97d9-400a-8da8-4a5c1951f935"
url (required) string The RELATIVE URL that has caused this error. Example: "/programs/123"
errors ValidationError[object] Optional, only returned on 400 Bad Request errors for validation errors
errors. field (required) string Field in error
errors. message (required) string Descriptional message
generalMessage (required) string A human-readable message
errorCode (required) string Product defined error code.
Validation pattern: ^[0-9-]*$
timestamp (required) datetime Timestamp of the call

The response failed to complete because access to the resource is forbidden.

Type Error
{ "id": "string", "url": "string", "errors": [ { "field": "string", "message": "string" } ], "generalMessage": "string", "errorCode": "string", "timestamp": "datetime" }

Parameter Type Description
id (required) string Randomly generated GUID.
Validation pattern: ^[a-zA-Z0-9-]*$
Example: "62432dd8-97d9-400a-8da8-4a5c1951f935"
url (required) string The RELATIVE URL that has caused this error. Example: "/programs/123"
errors ValidationError[object] Optional, only returned on 400 Bad Request errors for validation errors
errors. field (required) string Field in error
errors. message (required) string Descriptional message
generalMessage (required) string A human-readable message
errorCode (required) string Product defined error code.
Validation pattern: ^[0-9-]*$
timestamp (required) datetime Timestamp of the call

The response failed to complete due to an invalid resource.

Type Error
{ "id": "string", "url": "string", "errors": [ { "field": "string", "message": "string" } ], "generalMessage": "string", "errorCode": "string", "timestamp": "datetime" }

Parameter Type Description
id (required) string Randomly generated GUID.
Validation pattern: ^[a-zA-Z0-9-]*$
Example: "62432dd8-97d9-400a-8da8-4a5c1951f935"
url (required) string The RELATIVE URL that has caused this error. Example: "/programs/123"
errors ValidationError[object] Optional, only returned on 400 Bad Request errors for validation errors
errors. field (required) string Field in error
errors. message (required) string Descriptional message
generalMessage (required) string A human-readable message
errorCode (required) string Product defined error code.
Validation pattern: ^[0-9-]*$
timestamp (required) datetime Timestamp of the call

The response failed to complete due to an invalid method of request.

Type Error
{ "id": "string", "url": "string", "errors": [ { "field": "string", "message": "string" } ], "generalMessage": "string", "errorCode": "string", "timestamp": "datetime" }

Parameter Type Description
id (required) string Randomly generated GUID.
Validation pattern: ^[a-zA-Z0-9-]*$
Example: "62432dd8-97d9-400a-8da8-4a5c1951f935"
url (required) string The RELATIVE URL that has caused this error. Example: "/programs/123"
errors ValidationError[object] Optional, only returned on 400 Bad Request errors for validation errors
errors. field (required) string Field in error
errors. message (required) string Descriptional message
generalMessage (required) string A human-readable message
errorCode (required) string Product defined error code.
Validation pattern: ^[0-9-]*$
timestamp (required) datetime Timestamp of the call

The response failed to complete due to an unacceptable media type in the request.

Type Error
{ "id": "string", "url": "string", "errors": [ { "field": "string", "message": "string" } ], "generalMessage": "string", "errorCode": "string", "timestamp": "datetime" }

Parameter Type Description
id (required) string Randomly generated GUID.
Validation pattern: ^[a-zA-Z0-9-]*$
Example: "62432dd8-97d9-400a-8da8-4a5c1951f935"
url (required) string The RELATIVE URL that has caused this error. Example: "/programs/123"
errors ValidationError[object] Optional, only returned on 400 Bad Request errors for validation errors
errors. field (required) string Field in error
errors. message (required) string Descriptional message
generalMessage (required) string A human-readable message
errorCode (required) string Product defined error code.
Validation pattern: ^[0-9-]*$
timestamp (required) datetime Timestamp of the call

The response failed to complete due to an unsupported media type in the request.

Type Error
{ "id": "string", "url": "string", "errors": [ { "field": "string", "message": "string" } ], "generalMessage": "string", "errorCode": "string", "timestamp": "datetime" }

Parameter Type Description
id (required) string Randomly generated GUID.
Validation pattern: ^[a-zA-Z0-9-]*$
Example: "62432dd8-97d9-400a-8da8-4a5c1951f935"
url (required) string The RELATIVE URL that has caused this error. Example: "/programs/123"
errors ValidationError[object] Optional, only returned on 400 Bad Request errors for validation errors
errors. field (required) string Field in error
errors. message (required) string Descriptional message
generalMessage (required) string A human-readable message
errorCode (required) string Product defined error code.
Validation pattern: ^[0-9-]*$
timestamp (required) datetime Timestamp of the call

The response failed to complete in some way.

Type Error
{ "id": "string", "url": "string", "errors": [ { "field": "string", "message": "string" } ], "generalMessage": "string", "errorCode": "string", "timestamp": "datetime" }

Parameter Type Description
id (required) string Randomly generated GUID.
Validation pattern: ^[a-zA-Z0-9-]*$
Example: "62432dd8-97d9-400a-8da8-4a5c1951f935"
url (required) string The RELATIVE URL that has caused this error. Example: "/programs/123"
errors ValidationError[object] Optional, only returned on 400 Bad Request errors for validation errors
errors. field (required) string Field in error
errors. message (required) string Descriptional message
generalMessage (required) string A human-readable message
errorCode (required) string Product defined error code.
Validation pattern: ^[0-9-]*$
timestamp (required) datetime Timestamp of the call

/payment-tokens/threeds-required

Use this request to determine if a payment card must undergo 3DS verification.

HTTP Request URL
Header
PARAMETERTYPEDESCRIPTION
Acceptstring
(enum)
API version

API version value:

  • application/vnd.mcn.transaction-service.api.v.1+json
Request Parameters
PARAMETERTYPEDESCRIPTION
bininteger
(required)
The Bank Identification Number (Usually the first 4-6 digits of the card number).
last4string
(required)
The last 4 digits of the credit card number.
clientAccnuminteger
(required)
Merchant's account number.
clientSubaccinteger
(required)
Merchant's sub-account number.
currencyCodestring
(required)
Three-digit currency code (ISO 4217 standard) for the currency used in the transaction.

cURL

curl -X GET \
  'https://api.ccbill.com/payment-tokens/threeds-required?bin=411111&last4=1111&clientAccnum=900684&currencyCode=840&clientSubacc=0000' \
  -H 'Accept: */*' \
  -H 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOlsibWNuLXRyYW5zYWN0aW9uLXNlcnZpY2UiLCJtY24tYWRtaW4tc2VydmljZSJdLCJzY29wZSI6WyJjcmVhdGVfdG9rZW4iLCJyZWFkX3Rva2VuIiwiY2hhcmdlX3Rva2VuIiwiY3JlYXRlX3Byb2dyYW0iLCJyZWFkX3Byb2dyYW0iLCJtb2RpZnlfcHJvZ3JhbSIsImNyZWF0ZV9wcm9ncmFtX3BhcnRpY2lwYXRpb24iLCJtb2RpZnlfcHJvZ3JhbV9wYXJ0aWNpcGF0aW9uIiwicmVhZF9wcm9ncmFtX3BhcnRpY2lwYXRpb24iXSwiZXhwIjoxNTY5NDM1NjY5LCJhdXRob3JpdGllcyI6WyJNQ05fQVBJX1RPS0VOX0NIQUdFUiIsIk1DTl9BUElfVE9LRU5fQ1JFQVRPUiIsIk1DTl9BUElfQURNSU4iXSwianRpIjoiMWFkODY1MWMtZGEwMS00YzNjLTkyY2EtOGQ0YjM3OWJjOGFiIiwiY2xpZW50X2lkIjoiYjhkOTJkOWFjZTYwMTFlOGFhNmIwMDUwNTY5ZDE1ODUifQ.Qxtk0x-MxcYHIXDrgtJh3bBLigSh9WALVHSyw0UKpfYpgj_0IVNk8p83njYrukMNXuMt-GnM0J3-ghCpQ3hKHYQnOgdWjA8c_Sr3BfxlRQfTGJUu5wRIxfTpCM3A4XkGKkccMIV3kTexPvUDlEH4Mj1HJNSmXSNzjk3HTbLQ6bTAclWkhYyC4ps81_NG-GaOKpB_hjZES0bcx7RqNhDGkotyAmMsRSIODE0ta6p0Y3X3uCGoGhHxWIj57lmCCdu3m3lNe3aYysSxstES3dsIiVNmJNFR44wviKp01UYRH-oqUqEqyaIUdX3q2ILIkMikb8gCbrZxeHMBFqIWO5z1oQ' \
  -H 'Cache-Control: no-cache'

JavaScript

var data = null;

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === 4) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.ccbill.com/payment-tokens/threeds-required?bin=411111&last4=1111&clientAccnum=900684&clientSubacc=0000&currencyCode=840");
xhr.setRequestHeader("Authorization", "Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOlsibWNuLXRyYW5zYWN0aW9uLXNlcnZpY2UiLCJtY24tYWRtaW4tc2VydmljZSJdLCJzY29wZSI6WyJjcmVhdGVfdG9rZW4iLCJyZWFkX3Rva2VuIiwiY2hhcmdlX3Rva2VuIiwiY3JlYXRlX3Byb2dyYW0iLCJyZWFkX3Byb2dyYW0iLCJtb2RpZnlfcHJvZ3JhbSIsImNyZWF0ZV9wcm9ncmFtX3BhcnRpY2lwYXRpb24iLCJtb2RpZnlfcHJvZ3JhbV9wYXJ0aWNpcGF0aW9uIiwicmVhZF9wcm9ncmFtX3BhcnRpY2lwYXRpb24iXSwiZXhwIjoxNTY5NDM1NjY5LCJhdXRob3JpdGllcyI6WyJNQ05fQVBJX1RPS0VOX0NIQUdFUiIsIk1DTl9BUElfVE9LRU5fQ1JFQVRPUiIsIk1DTl9BUElfQURNSU4iXSwianRpIjoiMWFkODY1MWMtZGEwMS00YzNjLTkyY2EtOGQ0YjM3OWJjOGFiIiwiY2xpZW50X2lkIjoiYjhkOTJkOWFjZTYwMTFlOGFhNmIwMDUwNTY5ZDE1ODUifQ.Qxtk0x-MxcYHIXDrgtJh3bBLigSh9WALVHSyw0UKpfYpgj_0IVNk8p83njYrukMNXuMt-GnM0J3-ghCpQ3hKHYQnOgdWjA8c_Sr3BfxlRQfTGJUu5wRIxfTpCM3A4XkGKkccMIV3kTexPvUDlEH4Mj1HJNSmXSNzjk3HTbLQ6bTAclWkhYyC4ps81_NG-GaOKpB_hjZES0bcx7RqNhDGkotyAmMsRSIODE0ta6p0Y3X3uCGoGhHxWIj57lmCCdu3m3lNe3aYysSxstES3dsIiVNmJNFR44wviKp01UYRH-oqUqEqyaIUdX3q2ILIkMikb8gCbrZxeHMBFqIWO5z1oQ");
xhr.setRequestHeader("Accept", "*/*");
xhr.setRequestHeader("Cache-Control", "no-cache");

xhr.send(data);

PHP

<!--?php

$request = new HttpRequest();
$request--->setUrl('https://api.ccbill.com/payment-tokens/threeds-required');
$request->setMethod(HTTP_METH_GET);

$request->setQueryData(array(
  'bin' => '411111',
  'last4' => '1111',
  'clientAccnum' => '900684',
  'clientSubacc' => '0000',
'currencyCode' => '840'
));

$request->setHeaders(array(
  'cache-control' => 'no-cache',
  'Accept' => '*/*',
  'Authorization' => 'Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOlsibWNuLXRyYW5zYWN0aW9uLXNlcnZpY2UiLCJtY24tYWRtaW4tc2VydmljZSJdLCJzY29wZSI6WyJjcmVhdGVfdG9rZW4iLCJyZWFkX3Rva2VuIiwiY2hhcmdlX3Rva2VuIiwiY3JlYXRlX3Byb2dyYW0iLCJyZWFkX3Byb2dyYW0iLCJtb2RpZnlfcHJvZ3JhbSIsImNyZWF0ZV9wcm9ncmFtX3BhcnRpY2lwYXRpb24iLCJtb2RpZnlfcHJvZ3JhbV9wYXJ0aWNpcGF0aW9uIiwicmVhZF9wcm9ncmFtX3BhcnRpY2lwYXRpb24iXSwiZXhwIjoxNTY5NDM1NjY5LCJhdXRob3JpdGllcyI6WyJNQ05fQVBJX1RPS0VOX0NIQUdFUiIsIk1DTl9BUElfVE9LRU5fQ1JFQVRPUiIsIk1DTl9BUElfQURNSU4iXSwianRpIjoiMWFkODY1MWMtZGEwMS00YzNjLTkyY2EtOGQ0YjM3OWJjOGFiIiwiY2xpZW50X2lkIjoiYjhkOTJkOWFjZTYwMTFlOGFhNmIwMDUwNTY5ZDE1ODUifQ.Qxtk0x-MxcYHIXDrgtJh3bBLigSh9WALVHSyw0UKpfYpgj_0IVNk8p83njYrukMNXuMt-GnM0J3-ghCpQ3hKHYQnOgdWjA8c_Sr3BfxlRQfTGJUu5wRIxfTpCM3A4XkGKkccMIV3kTexPvUDlEH4Mj1HJNSmXSNzjk3HTbLQ6bTAclWkhYyC4ps81_NG-GaOKpB_hjZES0bcx7RqNhDGkotyAmMsRSIODE0ta6p0Y3X3uCGoGhHxWIj57lmCCdu3m3lNe3aYysSxstES3dsIiVNmJNFR44wviKp01UYRH-oqUqEqyaIUdX3q2ILIkMikb8gCbrZxeHMBFqIWO5z1oQ'
));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
?>
Response Schemas
Response

Successful Response

Type ThreeDSRequired
{ "required": "boolean", "amount": "number" }

Parameter Type Description
required boolean 3DS required for payment card.
amount number Authorized charge amount.

The response failed to complete due to an invalid header/parameter in the request.

Type Error
{ "id": "string", "url": "string", "errors": [ { "field": "string", "message": "string" } ], "generalMessage": "string", "errorCode": "string", "timestamp": "datetime" }

Parameter Type Description
id (required) string Randomly generated GUID.
Validation pattern: ^[a-zA-Z0-9-]*$
Example: "62432dd8-97d9-400a-8da8-4a5c1951f935"
url (required) string The RELATIVE URL that has caused this error. Example: "/programs/123"
errors ValidationError[object] Optional, only returned on 400 Bad Request errors for validation errors
errors. field (required) string Field in error
errors. message (required) string Descriptional message
generalMessage (required) string A human-readable message
errorCode (required) string Product defined error code.
Validation pattern: ^[0-9-]*$
timestamp (required) datetime Timestamp of the call

The response failed to complete due to authorization problem.

Type Error
{ "id": "string", "url": "string", "errors": [ { "field": "string", "message": "string" } ], "generalMessage": "string", "errorCode": "string", "timestamp": "datetime" }

Parameter Type Description
id (required) string Randomly generated GUID.
Validation pattern: ^[a-zA-Z0-9-]*$
Example: "62432dd8-97d9-400a-8da8-4a5c1951f935"
url (required) string The RELATIVE URL that has caused this error. Example: "/programs/123"
errors ValidationError[object] Optional, only returned on 400 Bad Request errors for validation errors
errors. field (required) string Field in error
errors. message (required) string Descriptional message
generalMessage (required) string A human-readable message
errorCode (required) string Product defined error code.
Validation pattern: ^[0-9-]*$
timestamp (required) datetime Timestamp of the call

The response failed to complete because access to the resource is forbidden.

Type Error
{ "id": "string", "url": "string", "errors": [ { "field": "string", "message": "string" } ], "generalMessage": "string", "errorCode": "string", "timestamp": "datetime" }

Parameter Type Description
id (required) string Randomly generated GUID.
Validation pattern: ^[a-zA-Z0-9-]*$
Example: "62432dd8-97d9-400a-8da8-4a5c1951f935"
url (required) string The RELATIVE URL that has caused this error. Example: "/programs/123"
errors ValidationError[object] Optional, only returned on 400 Bad Request errors for validation errors
errors. field (required) string Field in error
errors. message (required) string Descriptional message
generalMessage (required) string A human-readable message
errorCode (required) string Product defined error code.
Validation pattern: ^[0-9-]*$
timestamp (required) datetime Timestamp of the call

The response failed to complete due to an invalid resource.

Type Error
{ "id": "string", "url": "string", "errors": [ { "field": "string", "message": "string" } ], "generalMessage": "string", "errorCode": "string", "timestamp": "datetime" }

Parameter Type Description
id (required) string Randomly generated GUID.
Validation pattern: ^[a-zA-Z0-9-]*$
Example: "62432dd8-97d9-400a-8da8-4a5c1951f935"
url (required) string The RELATIVE URL that has caused this error. Example: "/programs/123"
errors ValidationError[object] Optional, only returned on 400 Bad Request errors for validation errors
errors. field (required) string Field in error
errors. message (required) string Descriptional message
generalMessage (required) string A human-readable message
errorCode (required) string Product defined error code.
Validation pattern: ^[0-9-]*$
timestamp (required) datetime Timestamp of the call

The response failed to complete due to an invalid method of request.

Type Error
{ "id": "string", "url": "string", "errors": [ { "field": "string", "message": "string" } ], "generalMessage": "string", "errorCode": "string", "timestamp": "datetime" }

Parameter Type Description
id (required) string Randomly generated GUID.
Validation pattern: ^[a-zA-Z0-9-]*$
Example: "62432dd8-97d9-400a-8da8-4a5c1951f935"
url (required) string The RELATIVE URL that has caused this error. Example: "/programs/123"
errors ValidationError[object] Optional, only returned on 400 Bad Request errors for validation errors
errors. field (required) string Field in error
errors. message (required) string Descriptional message
generalMessage (required) string A human-readable message
errorCode (required) string Product defined error code.
Validation pattern: ^[0-9-]*$
timestamp (required) datetime Timestamp of the call

The response failed to complete due to an unacceptable media type in the request.

Type Error
{ "id": "string", "url": "string", "errors": [ { "field": "string", "message": "string" } ], "generalMessage": "string", "errorCode": "string", "timestamp": "datetime" }

Parameter Type Description
id (required) string Randomly generated GUID.
Validation pattern: ^[a-zA-Z0-9-]*$
Example: "62432dd8-97d9-400a-8da8-4a5c1951f935"
url (required) string The RELATIVE URL that has caused this error. Example: "/programs/123"
errors ValidationError[object] Optional, only returned on 400 Bad Request errors for validation errors
errors. field (required) string Field in error
errors. message (required) string Descriptional message
generalMessage (required) string A human-readable message
errorCode (required) string Product defined error code.
Validation pattern: ^[0-9-]*$
timestamp (required) datetime Timestamp of the call

The response failed to complete due to an unsupported media type in the request.

Type Error
{ "id": "string", "url": "string", "errors": [ { "field": "string", "message": "string" } ], "generalMessage": "string", "errorCode": "string", "timestamp": "datetime" }

Parameter Type Description
id (required) string Randomly generated GUID.
Validation pattern: ^[a-zA-Z0-9-]*$
Example: "62432dd8-97d9-400a-8da8-4a5c1951f935"
url (required) string The RELATIVE URL that has caused this error. Example: "/programs/123"
errors ValidationError[object] Optional, only returned on 400 Bad Request errors for validation errors
errors. field (required) string Field in error
errors. message (required) string Descriptional message
generalMessage (required) string A human-readable message
errorCode (required) string Product defined error code.
Validation pattern: ^[0-9-]*$
timestamp (required) datetime Timestamp of the call

The response failed to complete in some way.

Type Error
{ "id": "string", "url": "string", "errors": [ { "field": "string", "message": "string" } ], "generalMessage": "string", "errorCode": "string", "timestamp": "datetime" }

Parameter Type Description
id (required) string Randomly generated GUID.
Validation pattern: ^[a-zA-Z0-9-]*$
Example: "62432dd8-97d9-400a-8da8-4a5c1951f935"
url (required) string The RELATIVE URL that has caused this error. Example: "/programs/123"
errors ValidationError[object] Optional, only returned on 400 Bad Request errors for validation errors
errors. field (required) string Field in error
errors. message (required) string Descriptional message
generalMessage (required) string A human-readable message
errorCode (required) string Product defined error code.
Validation pattern: ^[0-9-]*$
timestamp (required) datetime Timestamp of the call

/payment-tokens/{paymentTokenId}/threeds-required

Use this endpoint to determine if a transaction must undergo 3DS verification based on the payment token ID.

HTTP Request URL
Header
PARAMETERTYPEDESCRIPTION
Acceptstring
(enum)
API version

API version value:

  • application/vnd.mcn.transaction-service.api.v.1+json
URI Parameter
PARAMETERTYPEDESCRIPTION
currencyCodestring
(required)
Three-digit currency code (ISO 4217 standard) for the currency used in the transaction.

cURL

curl -X GET \
  'https://api.ccbill.com/payment-tokens/01f1142953204411a7e399e0f100fc4d/threeds-required?currencyCode=840' \
  -H 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOlsibWNuLXRyYW5zYWN0aW9uLXNlcnZpY2UiLCJtY24tYWRtaW4tc2VydmljZSJdLCJzY29wZSI6WyJjcmVhdGVfdG9rZW4iLCJyZWFkX3Rva2VuIiwiY2hhcmdlX3Rva2VuIiwiY3JlYXRlX3Byb2dyYW0iLCJyZWFkX3Byb2dyYW0iLCJtb2RpZnlfcHJvZ3JhbSIsImNyZWF0ZV9wcm9ncmFtX3BhcnRpY2lwYXRpb24iLCJtb2RpZnlfcHJvZ3JhbV9wYXJ0aWNpcGF0aW9uIiwicmVhZF9wcm9ncmFtX3BhcnRpY2lwYXRpb24iXSwiZXhwIjoxNTcwMTQxMTYzLCJhdXRob3JpdGllcyI6WyJNQ05fQVBJX1RPS0VOX0NIQUdFUiIsIk1DTl9BUElfVE9LRU5fQ1JFQVRPUiIsIk1DTl9BUElfQURNSU4iXSwianRpIjoiMTc4ODM4NGUtYWQ5Zi00NjRmLWI3YTEtN2M2NGNiMGQ1ODgxIiwiY2xpZW50X2lkIjoiYjhkOTJkOWFjZTYwMTFlOGFhNmIwMDUwNTY5ZDE1ODUifQ.WqSzOQ6gRpZdUp7f-uINqJDXMh17jCLTPzZthPXaiL1N0-3aghhXEZTR7BX04upCtWxxzQQC5tP8IRAtWdtsQSfGHV86GjhILCDxLI5Z9OnMm26JCjtDsKqau5T_y8O-4FT7y-aPiVCB0wQZjRZ96U1cIL7V6zJiCS0Y-mE3ixmAkuUGhYM6Nor2AnvyNtrlfA8SGd8GEF7jJuLGgNCdVVXrDCjzuUdWnHp85Bp5daLai_IprPHapZpZ9UqeOJ9gaw04Kth--ftOx-Y4d3GyACJ0ymCyCGYocjLzerjfHW3HuoWFnRKTX5VVEUkIQ52jLEB1dtmm_hrwAZ1o8UMfQA' \
  -H 'Cache-Control: no-cache'

JavaScript

var data = null;

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === 4) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.ccbill.com/payment-tokens/01f1142953204411a7e399e0f100fc4d/threeds-required?currencyCode=840");
xhr.setRequestHeader("Authorization", "Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOlsibWNuLXRyYW5zYWN0aW9uLXNlcnZpY2UiLCJtY24tYWRtaW4tc2VydmljZSJdLCJzY29wZSI6WyJjcmVhdGVfdG9rZW4iLCJyZWFkX3Rva2VuIiwiY2hhcmdlX3Rva2VuIiwiY3JlYXRlX3Byb2dyYW0iLCJyZWFkX3Byb2dyYW0iLCJtb2RpZnlfcHJvZ3JhbSIsImNyZWF0ZV9wcm9ncmFtX3BhcnRpY2lwYXRpb24iLCJtb2RpZnlfcHJvZ3JhbV9wYXJ0aWNpcGF0aW9uIiwicmVhZF9wcm9ncmFtX3BhcnRpY2lwYXRpb24iXSwiZXhwIjoxNTcwMTQxMTYzLCJhdXRob3JpdGllcyI6WyJNQ05fQVBJX1RPS0VOX0NIQUdFUiIsIk1DTl9BUElfVE9LRU5fQ1JFQVRPUiIsIk1DTl9BUElfQURNSU4iXSwianRpIjoiMTc4ODM4NGUtYWQ5Zi00NjRmLWI3YTEtN2M2NGNiMGQ1ODgxIiwiY2xpZW50X2lkIjoiYjhkOTJkOWFjZTYwMTFlOGFhNmIwMDUwNTY5ZDE1ODUifQ.WqSzOQ6gRpZdUp7f-uINqJDXMh17jCLTPzZthPXaiL1N0-3aghhXEZTR7BX04upCtWxxzQQC5tP8IRAtWdtsQSfGHV86GjhILCDxLI5Z9OnMm26JCjtDsKqau5T_y8O-4FT7y-aPiVCB0wQZjRZ96U1cIL7V6zJiCS0Y-mE3ixmAkuUGhYM6Nor2AnvyNtrlfA8SGd8GEF7jJuLGgNCdVVXrDCjzuUdWnHp85Bp5daLai_IprPHapZpZ9UqeOJ9gaw04Kth--ftOx-Y4d3GyACJ0ymCyCGYocjLzerjfHW3HuoWFnRKTX5VVEUkIQ52jLEB1dtmm_hrwAZ1o8UMfQA");
xhr.setRequestHeader("Cache-Control", "no-cache");

xhr.send(data);

PHP

<?php

$request = new HttpRequest();
$request->setUrl('https://api.ccbill.com/payment-tokens/01f1142953204411a7e399e0f100fc4d/threeds-required?currencyCode=840');
$request->setMethod(HTTP_METH_GET);

$request->setHeaders(array(
  'Cache-Control' => 'no-cache',
  'Authorization' => 'Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOlsibWNuLXRyYW5zYWN0aW9uLXNlcnZpY2UiLCJtY24tYWRtaW4tc2VydmljZSJdLCJzY29wZSI6WyJjcmVhdGVfdG9rZW4iLCJyZWFkX3Rva2VuIiwiY2hhcmdlX3Rva2VuIiwiY3JlYXRlX3Byb2dyYW0iLCJyZWFkX3Byb2dyYW0iLCJtb2RpZnlfcHJvZ3JhbSIsImNyZWF0ZV9wcm9ncmFtX3BhcnRpY2lwYXRpb24iLCJtb2RpZnlfcHJvZ3JhbV9wYXJ0aWNpcGF0aW9uIiwicmVhZF9wcm9ncmFtX3BhcnRpY2lwYXRpb24iXSwiZXhwIjoxNTcwMTQxMTYzLCJhdXRob3JpdGllcyI6WyJNQ05fQVBJX1RPS0VOX0NIQUdFUiIsIk1DTl9BUElfVE9LRU5fQ1JFQVRPUiIsIk1DTl9BUElfQURNSU4iXSwianRpIjoiMTc4ODM4NGUtYWQ5Zi00NjRmLWI3YTEtN2M2NGNiMGQ1ODgxIiwiY2xpZW50X2lkIjoiYjhkOTJkOWFjZTYwMTFlOGFhNmIwMDUwNTY5ZDE1ODUifQ.WqSzOQ6gRpZdUp7f-uINqJDXMh17jCLTPzZthPXaiL1N0-3aghhXEZTR7BX04upCtWxxzQQC5tP8IRAtWdtsQSfGHV86GjhILCDxLI5Z9OnMm26JCjtDsKqau5T_y8O-4FT7y-aPiVCB0wQZjRZ96U1cIL7V6zJiCS0Y-mE3ixmAkuUGhYM6Nor2AnvyNtrlfA8SGd8GEF7jJuLGgNCdVVXrDCjzuUdWnHp85Bp5daLai_IprPHapZpZ9UqeOJ9gaw04Kth--ftOx-Y4d3GyACJ0ymCyCGYocjLzerjfHW3HuoWFnRKTX5VVEUkIQ52jLEB1dtmm_hrwAZ1o8UMfQA'
));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
?>
Response Schemas
Response

Successful Response

Type ThreeDSRequired
{ "required": "boolean", "amount": "number" }

Parameter Type Description
required boolean 3DS required for payment card.
amount number Authorized charge amount.

The response failed to complete due to an invalid header/parameter in the request.

Type Error
{ "id": "string", "url": "string", "errors": [ { "field": "string", "message": "string" } ], "generalMessage": "string", "errorCode": "string", "timestamp": "datetime" }

Parameter Type Description
id (required) string Randomly generated GUID.
Validation pattern: ^[a-zA-Z0-9-]*$
Example: "62432dd8-97d9-400a-8da8-4a5c1951f935"
url (required) string The RELATIVE URL that has caused this error. Example: "/programs/123"
errors ValidationError[object] Optional, only returned on 400 Bad Request errors for validation errors
errors. field (required) string Field in error
errors. message (required) string Descriptional message
generalMessage (required) string A human-readable message
errorCode (required) string Product defined error code.
Validation pattern: ^[0-9-]*$
timestamp (required) datetime Timestamp of the call

The response failed to complete due to authorization problem.

Type Error
{ "id": "string", "url": "string", "errors": [ { "field": "string", "message": "string" } ], "generalMessage": "string", "errorCode": "string", "timestamp": "datetime" }

Parameter Type Description
id (required) string Randomly generated GUID.
Validation pattern: ^[a-zA-Z0-9-]*$
Example: "62432dd8-97d9-400a-8da8-4a5c1951f935"
url (required) string The RELATIVE URL that has caused this error. Example: "/programs/123"
errors ValidationError[object] Optional, only returned on 400 Bad Request errors for validation errors
errors. field (required) string Field in error
errors. message (required) string Descriptional message
generalMessage (required) string A human-readable message
errorCode (required) string Product defined error code.
Validation pattern: ^[0-9-]*$
timestamp (required) datetime Timestamp of the call

The response failed to complete because access to the resource is forbidden.

Type Error
{ "id": "string", "url": "string", "errors": [ { "field": "string", "message": "string" } ], "generalMessage": "string", "errorCode": "string", "timestamp": "datetime" }

Parameter Type Description
id (required) string Randomly generated GUID.
Validation pattern: ^[a-zA-Z0-9-]*$
Example: "62432dd8-97d9-400a-8da8-4a5c1951f935"
url (required) string The RELATIVE URL that has caused this error. Example: "/programs/123"
errors ValidationError[object] Optional, only returned on 400 Bad Request errors for validation errors
errors. field (required) string Field in error
errors. message (required) string Descriptional message
generalMessage (required) string A human-readable message
errorCode (required) string Product defined error code.
Validation pattern: ^[0-9-]*$
timestamp (required) datetime Timestamp of the call

The response failed to complete due to an invalid resource.

Type Error
{ "id": "string", "url": "string", "errors": [ { "field": "string", "message": "string" } ], "generalMessage": "string", "errorCode": "string", "timestamp": "datetime" }

Parameter Type Description
id (required) string Randomly generated GUID.
Validation pattern: ^[a-zA-Z0-9-]*$
Example: "62432dd8-97d9-400a-8da8-4a5c1951f935"
url (required) string The RELATIVE URL that has caused this error. Example: "/programs/123"
errors ValidationError[object] Optional, only returned on 400 Bad Request errors for validation errors
errors. field (required) string Field in error
errors. message (required) string Descriptional message
generalMessage (required) string A human-readable message
errorCode (required) string Product defined error code.
Validation pattern: ^[0-9-]*$
timestamp (required) datetime Timestamp of the call

The response failed to complete due to an invalid method of request.

Type Error
{ "id": "string", "url": "string", "errors": [ { "field": "string", "message": "string" } ], "generalMessage": "string", "errorCode": "string", "timestamp": "datetime" }

Parameter Type Description
id (required) string Randomly generated GUID.
Validation pattern: ^[a-zA-Z0-9-]*$
Example: "62432dd8-97d9-400a-8da8-4a5c1951f935"
url (required) string The RELATIVE URL that has caused this error. Example: "/programs/123"
errors ValidationError[object] Optional, only returned on 400 Bad Request errors for validation errors
errors. field (required) string Field in error
errors. message (required) string Descriptional message
generalMessage (required) string A human-readable message
errorCode (required) string Product defined error code.
Validation pattern: ^[0-9-]*$
timestamp (required) datetime Timestamp of the call

The response failed to complete due to an unacceptable media type in the request.

Type Error
{ "id": "string", "url": "string", "errors": [ { "field": "string", "message": "string" } ], "generalMessage": "string", "errorCode": "string", "timestamp": "datetime" }

Parameter Type Description
id (required) string Randomly generated GUID.
Validation pattern: ^[a-zA-Z0-9-]*$
Example: "62432dd8-97d9-400a-8da8-4a5c1951f935"
url (required) string The RELATIVE URL that has caused this error. Example: "/programs/123"
errors ValidationError[object] Optional, only returned on 400 Bad Request errors for validation errors
errors. field (required) string Field in error
errors. message (required) string Descriptional message
generalMessage (required) string A human-readable message
errorCode (required) string Product defined error code.
Validation pattern: ^[0-9-]*$
timestamp (required) datetime Timestamp of the call

The response failed to complete due to an unsupported media type in the request.

Type Error
{ "id": "string", "url": "string", "errors": [ { "field": "string", "message": "string" } ], "generalMessage": "string", "errorCode": "string", "timestamp": "datetime" }

Parameter Type Description
id (required) string Randomly generated GUID.
Validation pattern: ^[a-zA-Z0-9-]*$
Example: "62432dd8-97d9-400a-8da8-4a5c1951f935"
url (required) string The RELATIVE URL that has caused this error. Example: "/programs/123"
errors ValidationError[object] Optional, only returned on 400 Bad Request errors for validation errors
errors. field (required) string Field in error
errors. message (required) string Descriptional message
generalMessage (required) string A human-readable message
errorCode (required) string Product defined error code.
Validation pattern: ^[0-9-]*$
timestamp (required) datetime Timestamp of the call

The response failed to complete in some way.

Type Error
{ "id": "string", "url": "string", "errors": [ { "field": "string", "message": "string" } ], "generalMessage": "string", "errorCode": "string", "timestamp": "datetime" }

Parameter Type Description
id (required) string Randomly generated GUID.
Validation pattern: ^[a-zA-Z0-9-]*$
Example: "62432dd8-97d9-400a-8da8-4a5c1951f935"
url (required) string The RELATIVE URL that has caused this error. Example: "/programs/123"
errors ValidationError[object] Optional, only returned on 400 Bad Request errors for validation errors
errors. field (required) string Field in error
errors. message (required) string Descriptional message
generalMessage (required) string A human-readable message
errorCode (required) string Product defined error code.
Validation pattern: ^[0-9-]*$
timestamp (required) datetime Timestamp of the call

/payment-tokens/target-client

This endpoint generates a payment token for the specified merchant/client.

It requires an active program participation and enables merchants to create payment tokens for cross-sale opportunities with other merchants.

HTTP Request URL
Request Schema
Header
PARAMETERTYPEDESCRIPTION
Acceptstring
(enum)
API version

API version values:

  • application/vnd.mcn.transaction-service.api.v.1+json
  • application/vnd.mcn.transaction-service.api.v.2+json

Example value:

  • application/vnd.mcn.transaction.service.api.v1+json
Request Parameters
PARAMETERTYPEDESCRIPTION
clientAccnuminteger
(required)
Merchant account number.
clientSubaccinteger
(required)
Merchant subaccount number.
customerInfoobject
(array)
Customer information.
customerInfo. emailstring
(required)
Customer's email address.
customerInfo. browserHttpAcceptLanguagestring
(optional)
List of acceptable human languages for the response.
customerInfo. browserHttpUserAgentstring
(optional)
The user agent string of the user agent.
customerInfo. citystring
(required)
Customer's city.
customerInfo. browserHttpAcceptstring
(optional)
Media types that are acceptable for the response.
customerInfo. statestring (required)Customer's state.
customerInfo. zipcodestring (required)Customer's zip code.
customerInfo. customerFnamestring (required)Customer's first name.
customerInfo. address1string (required)Customer's address.
customerInfo. address2string (optional)Customer's address (additional info).
customerInfo. browserHttpAcceptEncodingstring (optional)List of acceptable encodings.
customerInfo. customerLnamestring (required)Customer's last name.
customerInfo. ipAddressstring (required)Customer's IP address.
customerInfo. phoneNumberstring (optional)Customer's phone number.
customerInfo. countrystring (required)Customer's country.
paymentInfoobjectPayment information.
paymentInfo. cardNumstring (required)Card number.
paymentInfo. expMonthstring (required)Card expiration month in mm format.
paymentInfo. expYearstring (required)Card expiration year in yyyy format.
paymentInfo. nameOnCardstring (required)Name as it appears on card.
subscriptionIdinteger (required)Transaction subscription identification number.
targetClientAccnuminteger (required)Target Merchant Account Number.
targetClientSubaccinteger (required)Target Merchant Subaccount Number.
timeToLiveinteger (optional)Time for the token to exist.
validNumberOfUseinteger (optional)The total number of times the Payment Token can be used for purchases.

cURL

curl -X POST \
  https://api.ccbill.com/payment-tokens/target-client \
  -H 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOlsibWNuLXRyYW5zYWN0aW9uLXNlcnZpY2UiLCJtY24tYWRtaW4tc2VydmljZSJdLCJzY29wZSI6WyJjcmVhdGVfdG9rZW4iLCJyZWFkX3Rva2VuIiwiY2hhcmdlX3Rva2VuIiwiY3JlYXRlX3Byb2dyYW0iLCJyZWFkX3Byb2dyYW0iLCJjcmVhdGVfcHJvZ3JhbV9wYXJ0aWNpcGF0aW9uIiwicmVhZF9wcm9ncmFtX3BhcnRpY2lwYXRpb24iLCJtb2RpZnlfcHJvZ3JhbV9wYXJ0aWNpcGF0aW9uIl0sImV4cCI6MTUzNzM4MDczNiwiYXV0aG9yaXRpZXMiOlsiTUNOX0FQSV9UT0tFTl9DSEFSR0VSIiwiTUNOX0FQSV9UT0tFTl9DUkVBVE9SIiwiTUNOX0FQSV9BRE1JTiJdLCJqdGkiOiI4YzI2Njg1MC00NjMzLTQzZDMtYjZjOC1lNzIyY2ExNjQ1YTUiLCJjbGllbnRfaWQiOiI1MjE3NjhhYTc1OGQxMWU4YWE2YjAwNTA1NjlkMTU4NSJ9.HRYXZFATkIcI2_LJ1W_xo67IfBnbN9atyYNzyHqseLxYUxzgwBsAV5rNqCixKemOrDIeQLBN4jrwRsBIHDpEvshwBC8XmTodDJzpGmMaU9s1r20RV68X0_d1yTgSDke_Of7VCrVmJRbSuDl7AgsfTqQ1J7nWyu9vcIaER93ms-vadser_Ot9Z68_HAmCJL3DCLpdIFq3PYtBMKKKqXbvhfhSZQZD3b6-aewAnBo0VzpvK6tREqw1rv9_73oAvYcW2aHAj79ILr8viWMM40LyDKMMYOYkneg3hJUQsUVeh9WzztYUJKzERYNXje9fYIGN-eofoLvX7OZJ3eXmIfkrfQ' \
  -H 'Cache-Control: no-cache' \
  -H 'Content-Type: application/json' \
  -d '{ "clientAccnum": 900000, "clientSubacc": 0, "customerInfo": { "customerFname": "Tyler", "customerLname": "Thomas", "address1": "Woodland Drive", "address2": "Apt 21", "city": "Tempe", "state": "AZ", "zipcode": "85281", "country": "US", "phoneNumber": "5555555555", "email": "tthomas@xyz.com", "ipAddress": "10.70.60.14'\''", "browserHttpUserAgent": "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0", "browserHttpAccept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", "browserHttpAcceptLanguage": "en-US,en;q=0.5", "browserHttpAcceptEncoding": "gzip, deflate, br" }, "paymentInfo": { "creditCardPaymentInfo": { "cardNum": "4473707989493598", "nameOnCard": "Tyler Thomas", "expMonth": "04", "expYear": "2026" } }, "subscriptionId": 900000000000000001, "targetClientAccnum": 900000, "targetClientSubacc": 1, "timeToLive": 30, "validNumberOfUse": 3 }'

JavaScript

var data = JSON.stringify({
  "clientAccnum": 900000,
  "clientSubacc": 0,
  "customerInfo": {
    "customerFname": "Tyler",
    "customerLname": "Thomas",
    "address1": "Woodland Drive",
    "address2": "Apt 21",
    "city": "Tempe",
    "state": "AZ",
    "zipcode": "85281",
    "country": "US",
    "phoneNumber": "5555555555",
    "email": "tthomas@xyz.com",
    "ipAddress": "10.70.60.14'",
    "browserHttpUserAgent": "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0",
    "browserHttpAccept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
    "browserHttpAcceptLanguage": "en-US,en;q=0.5",
    "browserHttpAcceptEncoding": "gzip, deflate, br"
  },
  "paymentInfo": {
    "creditCardPaymentInfo": {
      "cardNum": "4473707989493598",
      "nameOnCard": "Tyler Thomas",
      "expMonth": "04",
      "expYear": "2026"
    }
  },
  "subscriptionId": 900000000000000000,
  "targetClientAccnum": 900000,
  "targetClientSubacc": 1,
  "timeToLive": 30,
  "validNumberOfUse": 3
});

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === 4) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://api.ccbill.com/payment-tokens/target-client");
xhr.setRequestHeader("Content-Type", "application/json");
xhr.setRequestHeader("Authorization", "Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOlsibWNuLXRyYW5zYWN0aW9uLXNlcnZpY2UiLCJtY24tYWRtaW4tc2VydmljZSJdLCJzY29wZSI6WyJjcmVhdGVfdG9rZW4iLCJyZWFkX3Rva2VuIiwiY2hhcmdlX3Rva2VuIiwiY3JlYXRlX3Byb2dyYW0iLCJyZWFkX3Byb2dyYW0iLCJjcmVhdGVfcHJvZ3JhbV9wYXJ0aWNpcGF0aW9uIiwicmVhZF9wcm9ncmFtX3BhcnRpY2lwYXRpb24iLCJtb2RpZnlfcHJvZ3JhbV9wYXJ0aWNpcGF0aW9uIl0sImV4cCI6MTUzNzM4MDczNiwiYXV0aG9yaXRpZXMiOlsiTUNOX0FQSV9UT0tFTl9DSEFSR0VSIiwiTUNOX0FQSV9UT0tFTl9DUkVBVE9SIiwiTUNOX0FQSV9BRE1JTiJdLCJqdGkiOiI4YzI2Njg1MC00NjMzLTQzZDMtYjZjOC1lNzIyY2ExNjQ1YTUiLCJjbGllbnRfaWQiOiI1MjE3NjhhYTc1OGQxMWU4YWE2YjAwNTA1NjlkMTU4NSJ9.HRYXZFATkIcI2_LJ1W_xo67IfBnbN9atyYNzyHqseLxYUxzgwBsAV5rNqCixKemOrDIeQLBN4jrwRsBIHDpEvshwBC8XmTodDJzpGmMaU9s1r20RV68X0_d1yTgSDke_Of7VCrVmJRbSuDl7AgsfTqQ1J7nWyu9vcIaER93ms-vadser_Ot9Z68_HAmCJL3DCLpdIFq3PYtBMKKKqXbvhfhSZQZD3b6-aewAnBo0VzpvK6tREqw1rv9_73oAvYcW2aHAj79ILr8viWMM40LyDKMMYOYkneg3hJUQsUVeh9WzztYUJKzERYNXje9fYIGN-eofoLvX7OZJ3eXmIfkrfQ");
xhr.setRequestHeader("Cache-Control", "no-cache");

xhr.send(data);

PHP

<?php
$request = new HttpRequest();
$request->setUrl('https://api.ccbill.com/payment-tokens/target-client');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders(array(
  'Cache-Control' => 'no-cache',
  'Authorization' => 'Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOlsibWNuLXRyYW5zYWN0aW9uLXNlcnZpY2UiLCJtY24tYWRtaW4tc2VydmljZSJdLCJzY29wZSI6WyJjcmVhdGVfdG9rZW4iLCJyZWFkX3Rva2VuIiwiY2hhcmdlX3Rva2VuIiwiY3JlYXRlX3Byb2dyYW0iLCJyZWFkX3Byb2dyYW0iLCJjcmVhdGVfcHJvZ3JhbV9wYXJ0aWNpcGF0aW9uIiwicmVhZF9wcm9ncmFtX3BhcnRpY2lwYXRpb24iLCJtb2RpZnlfcHJvZ3JhbV9wYXJ0aWNpcGF0aW9uIl0sImV4cCI6MTUzNzM4MDczNiwiYXV0aG9yaXRpZXMiOlsiTUNOX0FQSV9UT0tFTl9DSEFSR0VSIiwiTUNOX0FQSV9UT0tFTl9DUkVBVE9SIiwiTUNOX0FQSV9BRE1JTiJdLCJqdGkiOiI4YzI2Njg1MC00NjMzLTQzZDMtYjZjOC1lNzIyY2ExNjQ1YTUiLCJjbGllbnRfaWQiOiI1MjE3NjhhYTc1OGQxMWU4YWE2YjAwNTA1NjlkMTU4NSJ9.HRYXZFATkIcI2_LJ1W_xo67IfBnbN9atyYNzyHqseLxYUxzgwBsAV5rNqCixKemOrDIeQLBN4jrwRsBIHDpEvshwBC8XmTodDJzpGmMaU9s1r20RV68X0_d1yTgSDke_Of7VCrVmJRbSuDl7AgsfTqQ1J7nWyu9vcIaER93ms-vadser_Ot9Z68_HAmCJL3DCLpdIFq3PYtBMKKKqXbvhfhSZQZD3b6-aewAnBo0VzpvK6tREqw1rv9_73oAvYcW2aHAj79ILr8viWMM40LyDKMMYOYkneg3hJUQsUVeh9WzztYUJKzERYNXje9fYIGN-eofoLvX7OZJ3eXmIfkrfQ',
  'Content-Type' => 'application/json'
));

$request->setBody('{ "clientAccnum": 900000, "clientSubacc": 0, "customerInfo": { "customerFname": "Tyler", "customerLname": "Thomas", "address1": "Woodland Drive", "address2": "Apt 21", "city": "Tempe", "state": "AZ", "zipcode": "85281", "country": "US", "phoneNumber": "5555555555", "email": "tthomas@xyz.com", "ipAddress": "10.70.60.14'", "browserHttpUserAgent": "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0", "browserHttpAccept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", "browserHttpAcceptLanguage": "en-US,en;q=0.5", "browserHttpAcceptEncoding": "gzip, deflate, br" }, "paymentInfo": { "creditCardPaymentInfo": { "cardNum": "4473707989493598", "nameOnCard": "Tyler Thomas", "expMonth": "04", "expYear": "2026" } }, "subscriptionId": 900000000000000001, "targetClientAccnum": 900000, "targetClientSubacc": 1, "timeToLive": 30, "validNumberOfUse": 3 }');

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
?>
Response Schemas
Response

The request has been successful. Extract the paymentTokenID string to create a charge for the customer.

Note: in PaymentTokenVerifyV2 subscriptionId is returned as a string. In the v1 sample below, subscriptionId is retuned as a number/integer.

Type PaymentToken
{ "createdDatetime": "datetime-only", "timeToLive": "integer", "originalPaymentTokenId": "string", "validNumberOfUse": "integer", "clientAccnum": "integer", "clientSubacc": "integer", "programParticipationId": "integer", "paymentTokenId": "string", "paymentInfoId": "string", "subscriptionId": "integer" }

Parameter Type Description
createdDatetime datetime-only (required) The date and time the Payment Token was created.
timeToLive integer (required) Defines how long the Payment Token is going to exist.
originalPaymentTokenId string (optional) Reference to a previous Token Id.
validNumberOfUse integer (required) Total number of times the Payment Token can be used for purchases.
clientAccnum integer (required) Merchant account number.
clientSubacc integer (required) Merchant subaccount number.
programParticipationId integer (required) Program connected to the Payment Token.
paymentTokenId string (required) Complex representation of Payment Token Id.
paymentInfoId string (optional) Information associated with the payment.
subscriptionId integer (required) Identification of the subscription associated with the transaction.

The response failed to complete due to an invalid header/parameter in the request.

Type Error
{ "id": "string", "url": "string", "errors": [ { "field": "string", "message": "string" } ], "generalMessage": "string", "errorCode": "string", "timestamp": "datetime" }

Parameter Type Description
id (required) string Randomly generated GUID.
Validation pattern: ^[a-zA-Z0-9-]*$
Example: "62432dd8-97d9-400a-8da8-4a5c1951f935"
url (required) string The RELATIVE URL that has caused this error. Example: "/programs/123"
errors ValidationError[object] Optional, only returned on 400 Bad Request errors for validation errors
errors. field (required) string Field in error
errors. message (required) string Descriptional message
generalMessage (required) string A human-readable message
errorCode (required) string Product defined error code.
Validation pattern: ^[0-9-]*$
timestamp (required) datetime Timestamp of the call

The response failed to complete due to authorization problem.

Type Error
{ "id": "string", "url": "string", "errors": [ { "field": "string", "message": "string" } ], "generalMessage": "string", "errorCode": "string", "timestamp": "datetime" }

Parameter Type Description
id (required) string Randomly generated GUID.
Validation pattern: ^[a-zA-Z0-9-]*$
Example: "62432dd8-97d9-400a-8da8-4a5c1951f935"
url (required) string The RELATIVE URL that has caused this error. Example: "/programs/123"
errors ValidationError[object] Optional, only returned on 400 Bad Request errors for validation errors
errors. field (required) string Field in error
errors. message (required) string Descriptional message
generalMessage (required) string A human-readable message
errorCode (required) string Product defined error code.
Validation pattern: ^[0-9-]*$
timestamp (required) datetime Timestamp of the call

The response failed to complete because access to the resource is forbidden.

Type Error
{ "id": "string", "url": "string", "errors": [ { "field": "string", "message": "string" } ], "generalMessage": "string", "errorCode": "string", "timestamp": "datetime" }

Parameter Type Description
id (required) string Randomly generated GUID.
Validation pattern: ^[a-zA-Z0-9-]*$
Example: "62432dd8-97d9-400a-8da8-4a5c1951f935"
url (required) string The RELATIVE URL that has caused this error. Example: "/programs/123"
errors ValidationError[object] Optional, only returned on 400 Bad Request errors for validation errors
errors. field (required) string Field in error
errors. message (required) string Descriptional message
generalMessage (required) string A human-readable message
errorCode (required) string Product defined error code.
Validation pattern: ^[0-9-]*$
timestamp (required) datetime Timestamp of the call

The response failed to complete due to an invalid resource.

Type Error
{ "id": "string", "url": "string", "errors": [ { "field": "string", "message": "string" } ], "generalMessage": "string", "errorCode": "string", "timestamp": "datetime" }

Parameter Type Description
id (required) string Randomly generated GUID.
Validation pattern: ^[a-zA-Z0-9-]*$
Example: "62432dd8-97d9-400a-8da8-4a5c1951f935"
url (required) string The RELATIVE URL that has caused this error. Example: "/programs/123"
errors ValidationError[object] Optional, only returned on 400 Bad Request errors for validation errors
errors. field (required) string Field in error
errors. message (required) string Descriptional message
generalMessage (required) string A human-readable message
errorCode (required) string Product defined error code.
Validation pattern: ^[0-9-]*$
timestamp (required) datetime Timestamp of the call

The response failed to complete due to an invalid method of request.

Type Error
{ "id": "string", "url": "string", "errors": [ { "field": "string", "message": "string" } ], "generalMessage": "string", "errorCode": "string", "timestamp": "datetime" }

Parameter Type Description
id (required) string Randomly generated GUID.
Validation pattern: ^[a-zA-Z0-9-]*$
Example: "62432dd8-97d9-400a-8da8-4a5c1951f935"
url (required) string The RELATIVE URL that has caused this error. Example: "/programs/123"
errors ValidationError[object] Optional, only returned on 400 Bad Request errors for validation errors
errors. field (required) string Field in error
errors. message (required) string Descriptional message
generalMessage (required) string A human-readable message
errorCode (required) string Product defined error code.
Validation pattern: ^[0-9-]*$
timestamp (required) datetime Timestamp of the call

The response failed to complete due to an unacceptable media type in the request.

Type Error
{ "id": "string", "url": "string", "errors": [ { "field": "string", "message": "string" } ], "generalMessage": "string", "errorCode": "string", "timestamp": "datetime" }

Parameter Type Description
id (required) string Randomly generated GUID.
Validation pattern: ^[a-zA-Z0-9-]*$
Example: "62432dd8-97d9-400a-8da8-4a5c1951f935"
url (required) string The RELATIVE URL that has caused this error. Example: "/programs/123"
errors ValidationError[object] Optional, only returned on 400 Bad Request errors for validation errors
errors. field (required) string Field in error
errors. message (required) string Descriptional message
generalMessage (required) string A human-readable message
errorCode (required) string Product defined error code.
Validation pattern: ^[0-9-]*$
timestamp (required) datetime Timestamp of the call

The response failed to complete due to an unsupported media type in the request.

Type Error
{ "id": "string", "url": "string", "errors": [ { "field": "string", "message": "string" } ], "generalMessage": "string", "errorCode": "string", "timestamp": "datetime" }

Parameter Type Description
id (required) string Randomly generated GUID.
Validation pattern: ^[a-zA-Z0-9-]*$
Example: "62432dd8-97d9-400a-8da8-4a5c1951f935"
url (required) string The RELATIVE URL that has caused this error. Example: "/programs/123"
errors ValidationError[object] Optional, only returned on 400 Bad Request errors for validation errors
errors. field (required) string Field in error
errors. message (required) string Descriptional message
generalMessage (required) string A human-readable message
errorCode (required) string Product defined error code.
Validation pattern: ^[0-9-]*$
timestamp (required) datetime Timestamp of the call

The response failed to complete in some way.

Type Error
{ "id": "string", "url": "string", "errors": [ { "field": "string", "message": "string" } ], "generalMessage": "string", "errorCode": "string", "timestamp": "datetime" }

Parameter Type Description
id (required) string Randomly generated GUID.
Validation pattern: ^[a-zA-Z0-9-]*$
Example: "62432dd8-97d9-400a-8da8-4a5c1951f935"
url (required) string The RELATIVE URL that has caused this error. Example: "/programs/123"
errors ValidationError[object] Optional, only returned on 400 Bad Request errors for validation errors
errors. field (required) string Field in error
errors. message (required) string Descriptional message
generalMessage (required) string A human-readable message
errorCode (required) string Product defined error code.
Validation pattern: ^[0-9-]*$
timestamp (required) datetime Timestamp of the call

/payment-tokens/program-specified

This endpoint allows merchants to generate payment tokens for cross-sale opportunities with other specified program participants (merchants).

HTTP Request URL
  • https://api.ccbill.com/payment-tokens/program-specified
Request Schema
Header
PARAMETERTYPEDESCRIPTION
Acceptstring
(enum)
API version

API version values:

  • application/vnd.mcn.transaction-service.api.v.1+json
  • application/vnd.mcn.transaction-service.api.v.2+json

Example value:

  • application/vnd.mcn.transaction.service.api.v1+json
Request Parameters
PARAMETERTYPEDESCRIPTION
clientAccnuminteger
(required)
Merchant account number.
clientSubaccinteger
(required)
Merchant subaccount number.
customerInfoobjectCustomer information.
customerInfo. emailstring
(required)
Customer's email address.
customerInfo. browserHttpAcceptLanguagestring
(optional)
List of acceptable human languages for response.
customerInfo. browserHttpUserAgentstring
(optional)
The user agent string of the user agent.
customerInfo. citystring
(required)
Customer's city.
customerInfo. browserHttpAcceptstring
(optional)
Media type(s) that is(/are) acceptable for the response.
customerInfo. statestring
(required)
Customer's state.
customerInfo. zipcodestring
(required)
Customer's zip code.
customerInfo. customerFnamestring
(required)
Customer's first name.
customerInfo. address1string
(required)
Customer's address.
customerInfo. address2string
(optional)
Customer's address (additional info).
customerInfo. browserHttpAcceptEncodingstring
(optional)
List of acceptable encodings.
customerInfo. customerLnamestring
(required)
Customer's last name.
customerInfo. ipAddressstring
(required)
Customer's IP address.
customerInfo. phoneNumberstring
(optional)
Customer's phone number.
customerInfo. countrystring
(required)
Customer's country.
paymentInfoobjectPayment information.
paymentInfo. cardNumstring
(required)
Card number.
paymentInfo. expMonthstring
(required)
Card expiration month in mm format.
paymentInfo. expYearstring
(required)
Card expiration year in yyyy format.
paymentInfo. nameOnCardstring
(required)
Name as it appears on card.
subscriptionIdinteger
(required)
Transaction subscription identification number.
programParticipationIdinteger
(required)
The identifier represents the program associated with the transaction.
timeToLiveinteger
(optional)
Time for the token to exist.
validNumberOfUseinteger
(optional)
The total number of times the Payment Token can be used for purchases.

cURL

curl -X POST \
  https://api.ccbill.com/payment-tokens/program-specified \
  -H 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOlsibWNuLXRyYW5zYWN0aW9uLXNlcnZpY2UiLCJtY24tYWRtaW4tc2VydmljZSJdLCJzY29wZSI6WyJjcmVhdGVfdG9rZW4iLCJyZWFkX3Rva2VuIiwiY2hhcmdlX3Rva2VuIiwiY3JlYXRlX3Byb2dyYW0iLCJyZWFkX3Byb2dyYW0iLCJjcmVhdGVfcHJvZ3JhbV9wYXJ0aWNpcGF0aW9uIiwicmVhZF9wcm9ncmFtX3BhcnRpY2lwYXRpb24iLCJtb2RpZnlfcHJvZ3JhbV9wYXJ0aWNpcGF0aW9uIl0sImV4cCI6MTUzNzM4MDczNiwiYXV0aG9yaXRpZXMiOlsiTUNOX0FQSV9UT0tFTl9DSEFSR0VSIiwiTUNOX0FQSV9UT0tFTl9DUkVBVE9SIiwiTUNOX0FQSV9BRE1JTiJdLCJqdGkiOiI4YzI2Njg1MC00NjMzLTQzZDMtYjZjOC1lNzIyY2ExNjQ1YTUiLCJjbGllbnRfaWQiOiI1MjE3NjhhYTc1OGQxMWU4YWE2YjAwNTA1NjlkMTU4NSJ9.HRYXZFATkIcI2_LJ1W_xo67IfBnbN9atyYNzyHqseLxYUxzgwBsAV5rNqCixKemOrDIeQLBN4jrwRsBIHDpEvshwBC8XmTodDJzpGmMaU9s1r20RV68X0_d1yTgSDke_Of7VCrVmJRbSuDl7AgsfTqQ1J7nWyu9vcIaER93ms-vadser_Ot9Z68_HAmCJL3DCLpdIFq3PYtBMKKKqXbvhfhSZQZD3b6-aewAnBo0VzpvK6tREqw1rv9_73oAvYcW2aHAj79ILr8viWMM40LyDKMMYOYkneg3hJUQsUVeh9WzztYUJKzERYNXje9fYIGN-eofoLvX7OZJ3eXmIfkrfQ' \
  -H 'Cache-Control: no-cache' \
  -H 'Content-Type: application/json' \
  -d '{ "clientAccnum": 900000, "clientSubacc": 0, "customerInfo": { "customerFname": "Tyler", "customerLname": "Thomas", "address1": "Woodland Drive", "address2": "Apt 21", "city": "Tempe", "state": "AZ", "zipcode": "85281", "country": "US", "phoneNumber": "5555555555", "email": "tthomas@xyz.com", "ipAddress": "10.70.60.14'\''", "browserHttpUserAgent": "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0", "browserHttpAccept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", "browserHttpAcceptLanguage": "en-US,en;q=0.5", "browserHttpAcceptEncoding": "gzip, deflate, br" }, "paymentInfo": { "creditCardPaymentInfo": { "cardNum": "4473707989493598", "nameOnCard": "Tyler Thomas", "expMonth": "04", "expYear": "2026" } }, "subscriptionId": 900000000000000001, "programParticipationId": 1, "timeToLive": 30, "validNumberOfUse": 3 }'
  

JavaScript

var data = JSON.stringify({
  "clientAccnum": 900000,
  "clientSubacc": 0,
  "customerInfo": {
    "customerFname": "Tyler",
    "customerLname": "Thomas",
    "address1": "Woodland Drive",
    "address2": "Apt 21",
    "city": "Tempe",
    "state": "AZ",
    "zipcode": "85281",
    "country": "US",
    "phoneNumber": "5555555555",
    "email": "tthomas@xyz.com",
    "ipAddress": "10.70.60.14'",
    "browserHttpUserAgent": "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0",
    "browserHttpAccept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
    "browserHttpAcceptLanguage": "en-US,en;q=0.5",
    "browserHttpAcceptEncoding": "gzip, deflate, br"
  },
  "paymentInfo": {
    "creditCardPaymentInfo": {
      "cardNum": "4473707989493598",
      "nameOnCard": "Tyler Thomas",
      "expMonth": "04",
      "expYear": "2026"
    }
  },
  "subscriptionId": 900000000000000000,
  "programParticipationId": 1,
  "timeToLive": 30,
  "validNumberOfUse": 3
});

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === 4) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://api.ccbill.com/payment-tokens/program-specified");
xhr.setRequestHeader("Content-Type", "application/json");
xhr.setRequestHeader("Authorization", "Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOlsibWNuLXRyYW5zYWN0aW9uLXNlcnZpY2UiLCJtY24tYWRtaW4tc2VydmljZSJdLCJzY29wZSI6WyJjcmVhdGVfdG9rZW4iLCJyZWFkX3Rva2VuIiwiY2hhcmdlX3Rva2VuIiwiY3JlYXRlX3Byb2dyYW0iLCJyZWFkX3Byb2dyYW0iLCJjcmVhdGVfcHJvZ3JhbV9wYXJ0aWNpcGF0aW9uIiwicmVhZF9wcm9ncmFtX3BhcnRpY2lwYXRpb24iLCJtb2RpZnlfcHJvZ3JhbV9wYXJ0aWNpcGF0aW9uIl0sImV4cCI6MTUzNzM4MDczNiwiYXV0aG9yaXRpZXMiOlsiTUNOX0FQSV9UT0tFTl9DSEFSR0VSIiwiTUNOX0FQSV9UT0tFTl9DUkVBVE9SIiwiTUNOX0FQSV9BRE1JTiJdLCJqdGkiOiI4YzI2Njg1MC00NjMzLTQzZDMtYjZjOC1lNzIyY2ExNjQ1YTUiLCJjbGllbnRfaWQiOiI1MjE3NjhhYTc1OGQxMWU4YWE2YjAwNTA1NjlkMTU4NSJ9.HRYXZFATkIcI2_LJ1W_xo67IfBnbN9atyYNzyHqseLxYUxzgwBsAV5rNqCixKemOrDIeQLBN4jrwRsBIHDpEvshwBC8XmTodDJzpGmMaU9s1r20RV68X0_d1yTgSDke_Of7VCrVmJRbSuDl7AgsfTqQ1J7nWyu9vcIaER93ms-vadser_Ot9Z68_HAmCJL3DCLpdIFq3PYtBMKKKqXbvhfhSZQZD3b6-aewAnBo0VzpvK6tREqw1rv9_73oAvYcW2aHAj79ILr8viWMM40LyDKMMYOYkneg3hJUQsUVeh9WzztYUJKzERYNXje9fYIGN-eofoLvX7OZJ3eXmIfkrfQ");
xhr.setRequestHeader("Cache-Control", "no-cache");

xhr.send(data);

PHP

<?php
$request = new HttpRequest();
$request->setUrl('https://api.ccbill.com/payment-tokens/program-specified');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders(array(
  'Cache-Control' => 'no-cache',
  'Authorization' => 'Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOlsibWNuLXRyYW5zYWN0aW9uLXNlcnZpY2UiLCJtY24tYWRtaW4tc2VydmljZSJdLCJzY29wZSI6WyJjcmVhdGVfdG9rZW4iLCJyZWFkX3Rva2VuIiwiY2hhcmdlX3Rva2VuIiwiY3JlYXRlX3Byb2dyYW0iLCJyZWFkX3Byb2dyYW0iLCJjcmVhdGVfcHJvZ3JhbV9wYXJ0aWNpcGF0aW9uIiwicmVhZF9wcm9ncmFtX3BhcnRpY2lwYXRpb24iLCJtb2RpZnlfcHJvZ3JhbV9wYXJ0aWNpcGF0aW9uIl0sImV4cCI6MTUzNzM4MDczNiwiYXV0aG9yaXRpZXMiOlsiTUNOX0FQSV9UT0tFTl9DSEFSR0VSIiwiTUNOX0FQSV9UT0tFTl9DUkVBVE9SIiwiTUNOX0FQSV9BRE1JTiJdLCJqdGkiOiI4YzI2Njg1MC00NjMzLTQzZDMtYjZjOC1lNzIyY2ExNjQ1YTUiLCJjbGllbnRfaWQiOiI1MjE3NjhhYTc1OGQxMWU4YWE2YjAwNTA1NjlkMTU4NSJ9.HRYXZFATkIcI2_LJ1W_xo67IfBnbN9atyYNzyHqseLxYUxzgwBsAV5rNqCixKemOrDIeQLBN4jrwRsBIHDpEvshwBC8XmTodDJzpGmMaU9s1r20RV68X0_d1yTgSDke_Of7VCrVmJRbSuDl7AgsfTqQ1J7nWyu9vcIaER93ms-vadser_Ot9Z68_HAmCJL3DCLpdIFq3PYtBMKKKqXbvhfhSZQZD3b6-aewAnBo0VzpvK6tREqw1rv9_73oAvYcW2aHAj79ILr8viWMM40LyDKMMYOYkneg3hJUQsUVeh9WzztYUJKzERYNXje9fYIGN-eofoLvX7OZJ3eXmIfkrfQ',
  'Content-Type' => 'application/json'
));

$request->setBody('{ "clientAccnum": 900000, "clientSubacc": 0, "customerInfo": { "customerFname": "Tyler", "customerLname": "Thomas", "address1": "Woodland Drive", "address2": "Apt 21", "city": "Tempe", "state": "AZ", "zipcode": "85281", "country": "US", "phoneNumber": "5555555555", "email": "tthomas@xyz.com", "ipAddress": "10.70.60.14'", "browserHttpUserAgent": "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0", "browserHttpAccept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", "browserHttpAcceptLanguage": "en-US,en;q=0.5", "browserHttpAcceptEncoding": "gzip, deflate, br" }, "paymentInfo": { "creditCardPaymentInfo": { "cardNum": "4473707989493598", "nameOnCard": "Tyler Thomas", "expMonth": "04", "expYear": "2026" } }, "subscriptionId": 900000000000000001, "programParticipationId": 1, "timeToLive": 30, "validNumberOfUse": 3 }');

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
?>
Response Schemas
Response

The request has been successful. Extract the paymentTokenID string to create a charge for the customer.

Note: in PaymentTokenVerifyV2 subscriptionId is returned as a string. In the v1 sample below, subscriptionId is retuned as a number/integer.

Type PaymentToken
{ "createdDatetime": "datetime-only", "timeToLive": "integer", "originalPaymentTokenId": "string", "validNumberOfUse": "integer", "clientAccnum": "integer", "clientSubacc": "integer", "programParticipationId": "integer", "paymentTokenId": "string", "paymentInfoId": "string", "subscriptionId": "integer" }

Parameter Type Description
createdDatetime datetime-only (required) The date and time the Payment Token was created.
timeToLive integer (required) Defines how long the Payment Token is going to exist.
originalPaymentTokenId string (optional) Reference to a previous Token Id.
validNumberOfUse integer (required) Total number of times the Payment Token can be used for purchases.
clientAccnum integer (required) Merchant account number.
clientSubacc integer (required) Merchant subaccount number.
programParticipationId integer (required) Program connected to the Payment Token.
paymentTokenId string (required) Complex representation of Payment Token Id.
paymentInfoId string (optional) Information associated with the payment.
subscriptionId integer (required) Identification of the subscription associated with the transaction.

The response failed to complete due to an invalid header/parameter in the request.

Type Error
{ "id": "string", "url": "string", "errors": [ { "field": "string", "message": "string" } ], "generalMessage": "string", "errorCode": "string", "timestamp": "datetime" }

Parameter Type Description
id (required) string Randomly generated GUID.
Validation pattern: ^[a-zA-Z0-9-]*$
Example: "62432dd8-97d9-400a-8da8-4a5c1951f935"
url (required) string The RELATIVE URL that has caused this error. Example: "/programs/123"
errors ValidationError[object] Optional, only returned on 400 Bad Request errors for validation errors
errors. field (required) string Field in error
errors. message (required) string Descriptional message
generalMessage (required) string A human-readable message
errorCode (required) string Product defined error code.
Validation pattern: ^[0-9-]*$
timestamp (required) datetime Timestamp of the call

The response failed to complete due to authorization problem.

Type Error
{ "id": "string", "url": "string", "errors": [ { "field": "string", "message": "string" } ], "generalMessage": "string", "errorCode": "string", "timestamp": "datetime" }

Parameter Type Description
id (required) string Randomly generated GUID.
Validation pattern: ^[a-zA-Z0-9-]*$
Example: "62432dd8-97d9-400a-8da8-4a5c1951f935"
url (required) string The RELATIVE URL that has caused this error. Example: "/programs/123"
errors ValidationError[object] Optional, only returned on 400 Bad Request errors for validation errors
errors. field (required) string Field in error
errors. message (required) string Descriptional message
generalMessage (required) string A human-readable message
errorCode (required) string Product defined error code.
Validation pattern: ^[0-9-]*$
timestamp (required) datetime Timestamp of the call

The response failed to complete because access to the resource is forbidden.

Type Error
{ "id": "string", "url": "string", "errors": [ { "field": "string", "message": "string" } ], "generalMessage": "string", "errorCode": "string", "timestamp": "datetime" }

Parameter Type Description
id (required) string Randomly generated GUID.
Validation pattern: ^[a-zA-Z0-9-]*$
Example: "62432dd8-97d9-400a-8da8-4a5c1951f935"
url (required) string The RELATIVE URL that has caused this error. Example: "/programs/123"
errors ValidationError[object] Optional, only returned on 400 Bad Request errors for validation errors
errors. field (required) string Field in error
errors. message (required) string Descriptional message
generalMessage (required) string A human-readable message
errorCode (required) string Product defined error code.
Validation pattern: ^[0-9-]*$
timestamp (required) datetime Timestamp of the call

The response failed to complete due to an invalid resource.

Type Error
{ "id": "string", "url": "string", "errors": [ { "field": "string", "message": "string" } ], "generalMessage": "string", "errorCode": "string", "timestamp": "datetime" }

Parameter Type Description
id (required) string Randomly generated GUID.
Validation pattern: ^[a-zA-Z0-9-]*$
Example: "62432dd8-97d9-400a-8da8-4a5c1951f935"
url (required) string The RELATIVE URL that has caused this error. Example: "/programs/123"
errors ValidationError[object] Optional, only returned on 400 Bad Request errors for validation errors
errors. field (required) string Field in error
errors. message (required) string Descriptional message
generalMessage (required) string A human-readable message
errorCode (required) string Product defined error code.
Validation pattern: ^[0-9-]*$
timestamp (required) datetime Timestamp of the call

The response failed to complete due to an invalid method of request.

Type Error
{ "id": "string", "url": "string", "errors": [ { "field": "string", "message": "string" } ], "generalMessage": "string", "errorCode": "string", "timestamp": "datetime" }

Parameter Type Description
id (required) string Randomly generated GUID.
Validation pattern: ^[a-zA-Z0-9-]*$
Example: "62432dd8-97d9-400a-8da8-4a5c1951f935"
url (required) string The RELATIVE URL that has caused this error. Example: "/programs/123"
errors ValidationError[object] Optional, only returned on 400 Bad Request errors for validation errors
errors. field (required) string Field in error
errors. message (required) string Descriptional message
generalMessage (required) string A human-readable message
errorCode (required) string Product defined error code.
Validation pattern: ^[0-9-]*$
timestamp (required) datetime Timestamp of the call

The response failed to complete due to an unacceptable media type in the request.

Type Error
{ "id": "string", "url": "string", "errors": [ { "field": "string", "message": "string" } ], "generalMessage": "string", "errorCode": "string", "timestamp": "datetime" }

Parameter Type Description
id (required) string Randomly generated GUID.
Validation pattern: ^[a-zA-Z0-9-]*$
Example: "62432dd8-97d9-400a-8da8-4a5c1951f935"
url (required) string The RELATIVE URL that has caused this error. Example: "/programs/123"
errors ValidationError[object] Optional, only returned on 400 Bad Request errors for validation errors
errors. field (required) string Field in error
errors. message (required) string Descriptional message
generalMessage (required) string A human-readable message
errorCode (required) string Product defined error code.
Validation pattern: ^[0-9-]*$
timestamp (required) datetime Timestamp of the call

The response failed to complete due to an unsupported media type in the request.

Type Error
{ "id": "string", "url": "string", "errors": [ { "field": "string", "message": "string" } ], "generalMessage": "string", "errorCode": "string", "timestamp": "datetime" }

Parameter Type Description
id (required) string Randomly generated GUID.
Validation pattern: ^[a-zA-Z0-9-]*$
Example: "62432dd8-97d9-400a-8da8-4a5c1951f935"
url (required) string The RELATIVE URL that has caused this error. Example: "/programs/123"
errors ValidationError[object] Optional, only returned on 400 Bad Request errors for validation errors
errors. field (required) string Field in error
errors. message (required) string Descriptional message
generalMessage (required) string A human-readable message
errorCode (required) string Product defined error code.
Validation pattern: ^[0-9-]*$
timestamp (required) datetime Timestamp of the call

The response failed to complete in some way.

Type Error
{ "id": "string", "url": "string", "errors": [ { "field": "string", "message": "string" } ], "generalMessage": "string", "errorCode": "string", "timestamp": "datetime" }

Parameter Type Description
id (required) string Randomly generated GUID.
Validation pattern: ^[a-zA-Z0-9-]*$
Example: "62432dd8-97d9-400a-8da8-4a5c1951f935"
url (required) string The RELATIVE URL that has caused this error. Example: "/programs/123"
errors ValidationError[object] Optional, only returned on 400 Bad Request errors for validation errors
errors. field (required) string Field in error
errors. message (required) string Descriptional message
generalMessage (required) string A human-readable message
errorCode (required) string Product defined error code.
Validation pattern: ^[0-9-]*$
timestamp (required) datetime Timestamp of the call

/transactions

Use the Transactions endpoint to create a charge for an existing or new customer, or to retrieve data on a charge.

A charge can represent a transaction on a customer's billing details by a sponsor, based on a token obtained from an affiliate that identifies one of their clients.

SUB-RESOURCESMETHODSDESCRIPTION
/transactions/payment-tokens/{payment_token_id}POSTSubresource used to bill a client, or retrieve details about a charge.
/transactions/payment-tokens/{payment_token_id}GETSubresource used to bill a client, or retrieve details about a charge.
/transactions/payment-tokens/threeds/{payment_token_id}POSTSubresource used to bill a client or retrieve details about a charge with 3DS verification.

The GET /transactions/payment-tokens/{payment_token_id} API call allows merchants to retrieve details about a charge that was made in the system.

Use the POST /transactions/payment-tokens/{payment_token_id} API call to bill a customer.

/transactions/payment-tokens/{payment_token_id}

The POST /transactions/payment-tokens/{payment_token_id} API call will create a transaction request for a customer.

The customer is identified by a token that is obtained from an affiliate. If the token is short-lived, and this is the first billing for this customer a longer-lived token is returned.

Supply the payment token ID as a URI parameter.

HTTP Request URL
Request Schema
URI Parameter
PARAMETERTYPEDESCRIPTION
paymentTokenIdstring
(required)
Complex representation of Payment Token Id.
Header
PARAMETERTYPEDESCRIPTION
Acceptstring
(enum)
API version

API version value:

  • application/vnd.mcn.transaction-service.api.v.1+json
Request Parameters
PARAMETERTYPEDESCRIPTION
createNewPaymentTokenbooleanReturn new payment token for subsequent transactions or not.
initialPricenumber
(required)
Price of the initial transaction.
clientAccnuminteger
(required)
Merchant account number.
clientSubaccinteger
(required)
Merchant subaccount number.
currencyCodestring
(optional)
Numerical representation of the currency used in the transaction.
lifeTimeSubscriptionboolean
(optional)
Subscription is valid during the website's lifetime.
initialPeriodinteger
(required)
The time period of the initial transaction
recurringPeriodinteger
(optional)
The time period of recurrent transactions.
rebillsinteger
(optional)
The number of times recurrent transactions can occur.
recurringPricenumber
(optional)
Price of recurrent transactions.
passThroughInfo array
(optional)
Paired Information Passed Through to the Transaction Service.

cURL

curl -X POST \
  https://api.ccbill.com/transactions/payment-tokens/01047ed6f3b440c7a2ccc6abc1ad0a84 \
  -H 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOlsibWNuLXRyYW5zYWN0aW9uLXNlcnZpY2UiLCJtY24tYWRtaW4tc2VydmljZSJdLCJzY29wZSI6WyJjcmVhdGVfdG9rZW4iLCJyZWFkX3Rva2VuIiwiY2hhcmdlX3Rva2VuIiwiY3JlYXRlX3Byb2dyYW0iLCJyZWFkX3Byb2dyYW0iLCJjcmVhdGVfcHJvZ3JhbV9wYXJ0aWNpcGF0aW9uIiwicmVhZF9wcm9ncmFtX3BhcnRpY2lwYXRpb24iLCJtb2RpZnlfcHJvZ3JhbV9wYXJ0aWNpcGF0aW9uIl0sImV4cCI6MTUzNzM4MDczNiwiYXV0aG9yaXRpZXMiOlsiTUNOX0FQSV9UT0tFTl9DSEFSR0VSIiwiTUNOX0FQSV9UT0tFTl9DUkVBVE9SIiwiTUNOX0FQSV9BRE1JTiJdLCJqdGkiOiI4YzI2Njg1MC00NjMzLTQzZDMtYjZjOC1lNzIyY2ExNjQ1YTUiLCJjbGllbnRfaWQiOiI1MjE3NjhhYTc1OGQxMWU4YWE2YjAwNTA1NjlkMTU4NSJ9.HRYXZFATkIcI2_LJ1W_xo67IfBnbN9atyYNzyHqseLxYUxzgwBsAV5rNqCixKemOrDIeQLBN4jrwRsBIHDpEvshwBC8XmTodDJzpGmMaU9s1r20RV68X0_d1yTgSDke_Of7VCrVmJRbSuDl7AgsfTqQ1J7nWyu9vcIaER93ms-vadser_Ot9Z68_HAmCJL3DCLpdIFq3PYtBMKKKqXbvhfhSZQZD3b6-aewAnBo0VzpvK6tREqw1rv9_73oAvYcW2aHAj79ILr8viWMM40LyDKMMYOYkneg3hJUQsUVeh9WzztYUJKzERYNXje9fYIGN-eofoLvX7OZJ3eXmIfkrfQ' \
  -H 'Cache-Control: no-cache' \
  -H 'Content-Type: application/json' \
  -d '{ "clientAccnum":900123, "clientSubacc":10, "initialPrice": 9.99, "initialPeriod": 10, "recurringPrice": 15.00, "recurringPeriod": 30, "rebills": 99, "currencyCode": 840, "lifeTimeSubscription": false, "createNewPaymentToken": false, "passThroughInfo": [ { "name": "val1", "value": "val2" } ] }'
  

JavaScript

var data = JSON.stringify({
  "clientAccnum": 900123,
  "clientSubacc": 10,
  "initialPrice": 9.99,
  "initialPeriod": 10,
  "recurringPrice": 15,
  "recurringPeriod": 30,
  "rebills": 99,
  "currencyCode": 840,
  "lifeTimeSubscription": false,
  "createNewPaymentToken": false,
  "passThroughInfo": [
    {
      "name": "val1",
      "value": "val2"
    }
  ]
});

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === 4) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://api.ccbill.com/transactions/payment-tokens/01047ed6f3b440c7a2ccc6abc1ad0a84");
xhr.setRequestHeader("Content-Type", "application/json");
xhr.setRequestHeader("Authorization", "Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOlsibWNuLXRyYW5zYWN0aW9uLXNlcnZpY2UiLCJtY24tYWRtaW4tc2VydmljZSJdLCJzY29wZSI6WyJjcmVhdGVfdG9rZW4iLCJyZWFkX3Rva2VuIiwiY2hhcmdlX3Rva2VuIiwiY3JlYXRlX3Byb2dyYW0iLCJyZWFkX3Byb2dyYW0iLCJjcmVhdGVfcHJvZ3JhbV9wYXJ0aWNpcGF0aW9uIiwicmVhZF9wcm9ncmFtX3BhcnRpY2lwYXRpb24iLCJtb2RpZnlfcHJvZ3JhbV9wYXJ0aWNpcGF0aW9uIl0sImV4cCI6MTUzNzM4MDczNiwiYXV0aG9yaXRpZXMiOlsiTUNOX0FQSV9UT0tFTl9DSEFSR0VSIiwiTUNOX0FQSV9UT0tFTl9DUkVBVE9SIiwiTUNOX0FQSV9BRE1JTiJdLCJqdGkiOiI4YzI2Njg1MC00NjMzLTQzZDMtYjZjOC1lNzIyY2ExNjQ1YTUiLCJjbGllbnRfaWQiOiI1MjE3NjhhYTc1OGQxMWU4YWE2YjAwNTA1NjlkMTU4NSJ9.HRYXZFATkIcI2_LJ1W_xo67IfBnbN9atyYNzyHqseLxYUxzgwBsAV5rNqCixKemOrDIeQLBN4jrwRsBIHDpEvshwBC8XmTodDJzpGmMaU9s1r20RV68X0_d1yTgSDke_Of7VCrVmJRbSuDl7AgsfTqQ1J7nWyu9vcIaER93ms-vadser_Ot9Z68_HAmCJL3DCLpdIFq3PYtBMKKKqXbvhfhSZQZD3b6-aewAnBo0VzpvK6tREqw1rv9_73oAvYcW2aHAj79ILr8viWMM40LyDKMMYOYkneg3hJUQsUVeh9WzztYUJKzERYNXje9fYIGN-eofoLvX7OZJ3eXmIfkrfQ");
xhr.setRequestHeader("Cache-Control", "no-cache");

xhr.send(data);

PHP

<?php
$request = new HttpRequest();
$request->setUrl('https://api.ccbill.com/transactions/payment-tokens/01047ed6f3b440c7a2ccc6abc1ad0a84');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders(array(
  'Cache-Control' => 'no-cache',
  'Authorization' => 'Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOlsibWNuLXRyYW5zYWN0aW9uLXNlcnZpY2UiLCJtY24tYWRtaW4tc2VydmljZSJdLCJzY29wZSI6WyJjcmVhdGVfdG9rZW4iLCJyZWFkX3Rva2VuIiwiY2hhcmdlX3Rva2VuIiwiY3JlYXRlX3Byb2dyYW0iLCJyZWFkX3Byb2dyYW0iLCJjcmVhdGVfcHJvZ3JhbV9wYXJ0aWNpcGF0aW9uIiwicmVhZF9wcm9ncmFtX3BhcnRpY2lwYXRpb24iLCJtb2RpZnlfcHJvZ3JhbV9wYXJ0aWNpcGF0aW9uIl0sImV4cCI6MTUzNzM4MDczNiwiYXV0aG9yaXRpZXMiOlsiTUNOX0FQSV9UT0tFTl9DSEFSR0VSIiwiTUNOX0FQSV9UT0tFTl9DUkVBVE9SIiwiTUNOX0FQSV9BRE1JTiJdLCJqdGkiOiI4YzI2Njg1MC00NjMzLTQzZDMtYjZjOC1lNzIyY2ExNjQ1YTUiLCJjbGllbnRfaWQiOiI1MjE3NjhhYTc1OGQxMWU4YWE2YjAwNTA1NjlkMTU4NSJ9.HRYXZFATkIcI2_LJ1W_xo67IfBnbN9atyYNzyHqseLxYUxzgwBsAV5rNqCixKemOrDIeQLBN4jrwRsBIHDpEvshwBC8XmTodDJzpGmMaU9s1r20RV68X0_d1yTgSDke_Of7VCrVmJRbSuDl7AgsfTqQ1J7nWyu9vcIaER93ms-vadser_Ot9Z68_HAmCJL3DCLpdIFq3PYtBMKKKqXbvhfhSZQZD3b6-aewAnBo0VzpvK6tREqw1rv9_73oAvYcW2aHAj79ILr8viWMM40LyDKMMYOYkneg3hJUQsUVeh9WzztYUJKzERYNXje9fYIGN-eofoLvX7OZJ3eXmIfkrfQ',
  'Content-Type' => 'application/json'
));

$request->setBody('{ "clientAccnum":900123, "clientSubacc":10, "initialPrice": 9.99, "initialPeriod": 10, "recurringPrice": 15.00, "recurringPeriod": 30, "rebills": 99, "currencyCode": 840, "lifeTimeSubscription": false, "createNewPaymentToken": false, "passThroughInfo": [ { "name": "val1", "value": "val2" } ] }');

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
?>
Response Schemas
Response

A 200 return value indicates that the request was successful. You will receive the following information:

Type TransactionInfo
[ { "errorCode": "integer", "approved": "boolean", "paymentUniqueId": "string", "sessionId": "string", "subscriptionId": "integer", "newPaymentTokenId": "string" } ]

Parameter Type Description
item.errorCode (required) integer Error condition value of the transaction
item. approved (required) boolean Approval status of the transaction
item. paymentUniqueId (required) string Unique key connected to payment account
item. sessionId (required) string Unique session ID value for transaction
item.subscriptionId (required) integer Subscription ID to which the transaction belongs
item.newPaymentTokenId (required) string New payment token for subsequent transactions

The response failed to complete due to an invalid header/parameter in the request.

Type Error
{ "id": "string", "url": "string", "errors": [ { "field": "string", "message": "string" } ], "generalMessage": "string", "errorCode": "string", "timestamp": "datetime" }

Parameter Type Description
id (required) string Randomly generated GUID.
Validation pattern: ^[a-zA-Z0-9-]*$
Example: "62432dd8-97d9-400a-8da8-4a5c1951f935"
url (required) string The RELATIVE URL that has caused this error. Example: "/programs/123"
errors ValidationError[object] Optional, only returned on 400 Bad Request errors for validation errors
errors. field (required) string Field in error
errors. message (required) string Descriptional message
generalMessage (required) string A human-readable message
errorCode (required) string Product defined error code.
Validation pattern: ^[0-9-]*$
timestamp (required) datetime Timestamp of the call

The response failed to complete due to authorization problem.

Type Error
{ "id": "string", "url": "string", "errors": [ { "field": "string", "message": "string" } ], "generalMessage": "string", "errorCode": "string", "timestamp": "datetime" }

Parameter Type Description
id (required) string Randomly generated GUID.
Validation pattern: ^[a-zA-Z0-9-]*$
Example: "62432dd8-97d9-400a-8da8-4a5c1951f935"
url (required) string The RELATIVE URL that has caused this error. Example: "/programs/123"
errors ValidationError[object] Optional, only returned on 400 Bad Request errors for validation errors
errors. field (required) string Field in error
errors. message (required) string Descriptional message
generalMessage (required) string A human-readable message
errorCode (required) string Product defined error code.
Validation pattern: ^[0-9-]*$
timestamp (required) datetime Timestamp of the call

The response failed to complete because access to the resource is forbidden.

Type Error
{ "id": "string", "url": "string", "errors": [ { "field": "string", "message": "string" } ], "generalMessage": "string", "errorCode": "string", "timestamp": "datetime" }

Parameter Type Description
id (required) string Randomly generated GUID.
Validation pattern: ^[a-zA-Z0-9-]*$
Example: "62432dd8-97d9-400a-8da8-4a5c1951f935"
url (required) string The RELATIVE URL that has caused this error. Example: "/programs/123"
errors ValidationError[object] Optional, only returned on 400 Bad Request errors for validation errors
errors. field (required) string Field in error
errors. message (required) string Descriptional message
generalMessage (required) string A human-readable message
errorCode (required) string Product defined error code.
Validation pattern: ^[0-9-]*$
timestamp (required) datetime Timestamp of the call

The response failed to complete due to an invalid resource.

Type Error
{ "id": "string", "url": "string", "errors": [ { "field": "string", "message": "string" } ], "generalMessage": "string", "errorCode": "string", "timestamp": "datetime" }

Parameter Type Description
id (required) string Randomly generated GUID.
Validation pattern: ^[a-zA-Z0-9-]*$
Example: "62432dd8-97d9-400a-8da8-4a5c1951f935"
url (required) string The RELATIVE URL that has caused this error. Example: "/programs/123"
errors ValidationError[object] Optional, only returned on 400 Bad Request errors for validation errors
errors. field (required) string Field in error
errors. message (required) string Descriptional message
generalMessage (required) string A human-readable message
errorCode (required) string Product defined error code.
Validation pattern: ^[0-9-]*$
timestamp (required) datetime Timestamp of the call

The response failed to complete due to an invalid method of request.

Type Error
{ "id": "string", "url": "string", "errors": [ { "field": "string", "message": "string" } ], "generalMessage": "string", "errorCode": "string", "timestamp": "datetime" }

Parameter Type Description
id (required) string Randomly generated GUID.
Validation pattern: ^[a-zA-Z0-9-]*$
Example: "62432dd8-97d9-400a-8da8-4a5c1951f935"
url (required) string The RELATIVE URL that has caused this error. Example: "/programs/123"
errors ValidationError[object] Optional, only returned on 400 Bad Request errors for validation errors
errors. field (required) string Field in error
errors. message (required) string Descriptional message
generalMessage (required) string A human-readable message
errorCode (required) string Product defined error code.
Validation pattern: ^[0-9-]*$
timestamp (required) datetime Timestamp of the call

The response failed to complete due to an unacceptable media type in the request.

Type Error
{ "id": "string", "url": "string", "errors": [ { "field": "string", "message": "string" } ], "generalMessage": "string", "errorCode": "string", "timestamp": "datetime" }

Parameter Type Description
id (required) string Randomly generated GUID.
Validation pattern: ^[a-zA-Z0-9-]*$
Example: "62432dd8-97d9-400a-8da8-4a5c1951f935"
url (required) string The RELATIVE URL that has caused this error. Example: "/programs/123"
errors ValidationError[object] Optional, only returned on 400 Bad Request errors for validation errors
errors. field (required) string Field in error
errors. message (required) string Descriptional message
generalMessage (required) string A human-readable message
errorCode (required) string Product defined error code.
Validation pattern: ^[0-9-]*$
timestamp (required) datetime Timestamp of the call

The response failed to complete due to an unsupported media type in the request.

Type Error
{ "id": "string", "url": "string", "errors": [ { "field": "string", "message": "string" } ], "generalMessage": "string", "errorCode": "string", "timestamp": "datetime" }

Parameter Type Description
id (required) string Randomly generated GUID.
Validation pattern: ^[a-zA-Z0-9-]*$
Example: "62432dd8-97d9-400a-8da8-4a5c1951f935"
url (required) string The RELATIVE URL that has caused this error. Example: "/programs/123"
errors ValidationError[object] Optional, only returned on 400 Bad Request errors for validation errors
errors. field (required) string Field in error
errors. message (required) string Descriptional message
generalMessage (required) string A human-readable message
errorCode (required) string Product defined error code.
Validation pattern: ^[0-9-]*$
timestamp (required) datetime Timestamp of the call

The response failed to complete in some way.

Type Error
{ "id": "string", "url": "string", "errors": [ { "field": "string", "message": "string" } ], "generalMessage": "string", "errorCode": "string", "timestamp": "datetime" }

Parameter Type Description
id (required) string Randomly generated GUID.
Validation pattern: ^[a-zA-Z0-9-]*$
Example: "62432dd8-97d9-400a-8da8-4a5c1951f935"
url (required) string The RELATIVE URL that has caused this error. Example: "/programs/123"
errors ValidationError[object] Optional, only returned on 400 Bad Request errors for validation errors
errors. field (required) string Field in error
errors. message (required) string Descriptional message
generalMessage (required) string A human-readable message
errorCode (required) string Product defined error code.
Validation pattern: ^[0-9-]*$
timestamp (required) datetime Timestamp of the call

/transactions/payment-tokens/{payment_token_id}

Use this endpoint to obtain data on a previously made charge. You will need to identify the charge by the ID.

Supply the payment token ID as a URI parameter.

HTTP Request URL
URI Parameter
PARAMETERTYPEDESCRIPTION
paymentTokenIdstring
(required)
Complex representation of Payment Token Id.
Header
PARAMETERTYPEDESCRIPTION
Acceptstring
(enum)
API version

API version value:

  • application/vnd.mcn.transaction-service.api.v.1+json

cURL

curl -X GET \
  https://api.ccbill.com/transactions/payment-tokens/01047ed6f3b440c7a2ccc6abc1ad0a84 \
  -H 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOlsibWNuLXRyYW5zYWN0aW9uLXNlcnZpY2UiLCJtY24tYWRtaW4tc2VydmljZSJdLCJzY29wZSI6WyJjcmVhdGVfdG9rZW4iLCJyZWFkX3Rva2VuIiwiY2hhcmdlX3Rva2VuIiwiY3JlYXRlX3Byb2dyYW0iLCJyZWFkX3Byb2dyYW0iLCJyZWFkX3Byb2dyYW1fcGFydGljaXBhdGlvbiIsIm1vZGlmeV9wcm9ncmFtX3BhcnRpY2lwYXRpb24iXSwiZXhwIjoxNTM2MjcwMTE2LCJhdXRob3JpdGllcyI6WyJNQ05fQVBJX1RPS0VOX0NIQVJHRVIiLCJNQ05fQVBJX1RPS0VOX0NSRUFUT1IiLCJNQ05fQVBJX0FETUlOIl0sImp0aSI6IjlkZjQ5M2NjLTNmNDAtNDdmYS04ZjIwLWFiYWM5NTljOWFjYyIsImNsaWVudF9pZCI6IjUyMTc2OGFhNzU4ZDExZThhYTZiMDA1MDU2OWQxNTg1In0.e6pUqftnUlJcaz1rsxsoCBcitPvnAwAwp1ZiBl77ht0dsVRBUg3vOvruGzxELjVPKWFnu8NFXEJKEhoQXkZuqn2AiiM1u9mOJUtyQ9c1KgEMq6yTCQ_QIxGsrYcwkkr_B2yw5p_q6KHCcaAAAq4HGkKdHbo8C1GHvApD0Q7DVWRmie265Da6ln4Y1_wFHADKYTktCtLhBr4rv-5bmWHy25GKPZgIHViMrJmwSKqG2kC60JEYDrOsZsajhicbKPytXDw9X0Z6PcYPyRCkpz5I1FjsXJmIJnSKLwG8fPC2AOYPqF4p30BHLaCxvtS29jSbpfZj1W0pt708ipZSOlwHAw' \
  -H 'Cache-Control: no-cache'
  

JavaScript

var data = null;

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === 4) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.ccbill.com/transactions/payment-tokens/01047ed6f3b440c7a2ccc6abc1ad0a84");
xhr.setRequestHeader("Authorization", "Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOlsibWNuLXRyYW5zYWN0aW9uLXNlcnZpY2UiLCJtY24tYWRtaW4tc2VydmljZSJdLCJzY29wZSI6WyJjcmVhdGVfdG9rZW4iLCJyZWFkX3Rva2VuIiwiY2hhcmdlX3Rva2VuIiwiY3JlYXRlX3Byb2dyYW0iLCJyZWFkX3Byb2dyYW0iLCJyZWFkX3Byb2dyYW1fcGFydGljaXBhdGlvbiIsIm1vZGlmeV9wcm9ncmFtX3BhcnRpY2lwYXRpb24iXSwiZXhwIjoxNTM2MjcwMTE2LCJhdXRob3JpdGllcyI6WyJNQ05fQVBJX1RPS0VOX0NIQVJHRVIiLCJNQ05fQVBJX1RPS0VOX0NSRUFUT1IiLCJNQ05fQVBJX0FETUlOIl0sImp0aSI6IjlkZjQ5M2NjLTNmNDAtNDdmYS04ZjIwLWFiYWM5NTljOWFjYyIsImNsaWVudF9pZCI6IjUyMTc2OGFhNzU4ZDExZThhYTZiMDA1MDU2OWQxNTg1In0.e6pUqftnUlJcaz1rsxsoCBcitPvnAwAwp1ZiBl77ht0dsVRBUg3vOvruGzxELjVPKWFnu8NFXEJKEhoQXkZuqn2AiiM1u9mOJUtyQ9c1KgEMq6yTCQ_QIxGsrYcwkkr_B2yw5p_q6KHCcaAAAq4HGkKdHbo8C1GHvApD0Q7DVWRmie265Da6ln4Y1_wFHADKYTktCtLhBr4rv-5bmWHy25GKPZgIHViMrJmwSKqG2kC60JEYDrOsZsajhicbKPytXDw9X0Z6PcYPyRCkpz5I1FjsXJmIJnSKLwG8fPC2AOYPqF4p30BHLaCxvtS29jSbpfZj1W0pt708ipZSOlwHAw");
xhr.setRequestHeader("Cache-Control", "no-cache");

xhr.send(data);

PHP

<?php
$request = new HttpRequest();
$request->setUrl('https://api.ccbill.com/transactions/payment-tokens/01047ed6f3b440c7a2ccc6abc1ad0a84');
$request->setMethod(HTTP_METH_GET);

$request->setHeaders(array(
  'Cache-Control' => 'no-cache',
  'Authorization' => 'Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOlsibWNuLXRyYW5zYWN0aW9uLXNlcnZpY2UiLCJtY24tYWRtaW4tc2VydmljZSJdLCJzY29wZSI6WyJjcmVhdGVfdG9rZW4iLCJyZWFkX3Rva2VuIiwiY2hhcmdlX3Rva2VuIiwiY3JlYXRlX3Byb2dyYW0iLCJyZWFkX3Byb2dyYW0iLCJyZWFkX3Byb2dyYW1fcGFydGljaXBhdGlvbiIsIm1vZGlmeV9wcm9ncmFtX3BhcnRpY2lwYXRpb24iXSwiZXhwIjoxNTM2MjcwMTE2LCJhdXRob3JpdGllcyI6WyJNQ05fQVBJX1RPS0VOX0NIQVJHRVIiLCJNQ05fQVBJX1RPS0VOX0NSRUFUT1IiLCJNQ05fQVBJX0FETUlOIl0sImp0aSI6IjlkZjQ5M2NjLTNmNDAtNDdmYS04ZjIwLWFiYWM5NTljOWFjYyIsImNsaWVudF9pZCI6IjUyMTc2OGFhNzU4ZDExZThhYTZiMDA1MDU2OWQxNTg1In0.e6pUqftnUlJcaz1rsxsoCBcitPvnAwAwp1ZiBl77ht0dsVRBUg3vOvruGzxELjVPKWFnu8NFXEJKEhoQXkZuqn2AiiM1u9mOJUtyQ9c1KgEMq6yTCQ_QIxGsrYcwkkr_B2yw5p_q6KHCcaAAAq4HGkKdHbo8C1GHvApD0Q7DVWRmie265Da6ln4Y1_wFHADKYTktCtLhBr4rv-5bmWHy25GKPZgIHViMrJmwSKqG2kC60JEYDrOsZsajhicbKPytXDw9X0Z6PcYPyRCkpz5I1FjsXJmIJnSKLwG8fPC2AOYPqF4p30BHLaCxvtS29jSbpfZj1W0pt708ipZSOlwHAw'
));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
?>
Response Schemas
Response

A 200 return value indicates that the request was successful. You will receive the following information:

Type TransactionInfo
[ { "errorCode": "integer", "approved": "boolean", "paymentUniqueId": "string", "sessionId": "string", "subscriptionId": "integer", "newPaymentTokenId": "string" } ]

Parameter Type Description
item.errorCode (required) integer Error condition value of the transaction
item. approved (required) boolean Approval status of the transaction
item. paymentUniqueId (required) string Unique key connected to payment account
item. sessionId (required) string Unique session ID value for transaction
item.subscriptionId (required) integer Subscription ID to which the transaction belongs
item.newPaymentTokenId (required) string New payment token for subsequent transactions

The response failed to complete due to an invalid header/parameter in the request.

Type Error
{ "id": "string", "url": "string", "errors": [ { "field": "string", "message": "string" } ], "generalMessage": "string", "errorCode": "string", "timestamp": "datetime" }

Parameter Type Description
id (required) string Randomly generated GUID.
Validation pattern: ^[a-zA-Z0-9-]*$
Example: "62432dd8-97d9-400a-8da8-4a5c1951f935"
url (required) string The RELATIVE URL that has caused this error. Example: "/programs/123"
errors ValidationError[object] Optional, only returned on 400 Bad Request errors for validation errors
errors. field (required) string Field in error
errors. message (required) string Descriptional message
generalMessage (required) string A human-readable message
errorCode (required) string Product defined error code.
timestamp (required) datetime Timestamp of the call

The response failed to complete due to authorization problem.

Type Error
{ "id": "string", "url": "string", "errors": [ { "field": "string", "message": "string" } ], "generalMessage": "string", "errorCode": "string", "timestamp": "datetime" }

Parameter Type Description
id (required) string Randomly generated GUID.
Validation pattern: ^[a-zA-Z0-9-]*$
Example: "62432dd8-97d9-400a-8da8-4a5c1951f935"
url (required) string The RELATIVE URL that has caused this error. Example: "/programs/123"
errors ValidationError[object] Optional, only returned on 400 Bad Request errors for validation errors
errors. field (required) string Field in error
errors. message (required) string Descriptional message
generalMessage (required) string A human-readable message
errorCode (required) string Product defined error code.
Validation pattern: ^[0-9-]*$
timestamp (required) datetime Timestamp of the call

The response failed to complete because access to the resource is forbidden.

Type Error
{ "id": "string", "url": "string", "errors": [ { "field": "string", "message": "string" } ], "generalMessage": "string", "errorCode": "string", "timestamp": "datetime" }

Parameter Type Description
id (required) string Randomly generated GUID.
Validation pattern: ^[a-zA-Z0-9-]*$
Example: "62432dd8-97d9-400a-8da8-4a5c1951f935"
url (required) string The RELATIVE URL that has caused this error. Example: "/programs/123"
errors ValidationError[object] Optional, only returned on 400 Bad Request errors for validation errors
errors. field (required) string Field in error
errors. message (required) string Descriptional message
generalMessage (required) string A human-readable message
errorCode (required) string Product defined error code.
Validation pattern: ^[0-9-]*$
timestamp (required) datetime Timestamp of the call

The response failed to complete due to an invalid resource.

Type Error
{ "id": "string", "url": "string", "errors": [ { "field": "string", "message": "string" } ], "generalMessage": "string", "errorCode": "string", "timestamp": "datetime" }

Parameter Type Description
id (required) string Randomly generated GUID.
Validation pattern: ^[a-zA-Z0-9-]*$
Example: "62432dd8-97d9-400a-8da8-4a5c1951f935"
url (required) string The RELATIVE URL that has caused this error. Example: "/programs/123"
errors ValidationError[object] Optional, only returned on 400 Bad Request errors for validation errors
errors. field (required) string Field in error
errors. message (required) string Descriptional message
generalMessage (required) string A human-readable message
errorCode (required) string Product defined error code.
Validation pattern: ^[0-9-]*$
timestamp (required) datetime Timestamp of the call

The response failed to complete due to an invalid method of request.

Type Error
{ "id": "string", "url": "string", "errors": [ { "field": "string", "message": "string" } ], "generalMessage": "string", "errorCode": "string", "timestamp": "datetime" }

Parameter Type Description
id (required) string Randomly generated GUID.
Validation pattern: ^[a-zA-Z0-9-]*$
Example: "62432dd8-97d9-400a-8da8-4a5c1951f935"
url (required) string The RELATIVE URL that has caused this error. Example: "/programs/123"
errors ValidationError[object] Optional, only returned on 400 Bad Request errors for validation errors
errors. field (required) string Field in error
errors. message (required) string Descriptional message
generalMessage (required) string A human-readable message
errorCode (required) string Product defined error code.
Validation pattern: ^[0-9-]*$
timestamp (required) datetime Timestamp of the call

The response failed to complete due to an unacceptable media type in the request.

Type Error
{ "id": "string", "url": "string", "errors": [ { "field": "string", "message": "string" } ], "generalMessage": "string", "errorCode": "string", "timestamp": "datetime" }

Parameter Type Description
id (required) string Randomly generated GUID.
Validation pattern: ^[a-zA-Z0-9-]*$
Example: "62432dd8-97d9-400a-8da8-4a5c1951f935"
url (required) string The RELATIVE URL that has caused this error. Example: "/programs/123"
errors ValidationError[object] Optional, only returned on 400 Bad Request errors for validation errors
errors. field (required) string Field in error
errors. message (required) string Descriptional message
generalMessage (required) string A human-readable message
errorCode (required) string Product defined error code.
Validation pattern: ^[0-9-]*$
timestamp (required) datetime Timestamp of the call

The response failed to complete due to an unsupported media type in the request.

Type Error
{ "id": "string", "url": "string", "errors": [ { "field": "string", "message": "string" } ], "generalMessage": "string", "errorCode": "string", "timestamp": "datetime" }

Parameter Type Description
id (required) string Randomly generated GUID.
Validation pattern: ^[a-zA-Z0-9-]*$
Example: "62432dd8-97d9-400a-8da8-4a5c1951f935"
url (required) string The RELATIVE URL that has caused this error. Example: "/programs/123"
errors ValidationError[object] Optional, only returned on 400 Bad Request errors for validation errors
errors. field (required) string Field in error
errors. message (required) string Descriptional message
generalMessage (required) string A human-readable message
errorCode (required) string Product defined error code.
Validation pattern: ^[0-9-]*$
timestamp (required) datetime Timestamp of the call

The response failed to complete in some way.

Type Error
{ "id": "string", "url": "string", "errors": [ { "field": "string", "message": "string" } ], "generalMessage": "string", "errorCode": "string", "timestamp": "datetime" }

Parameter Type Description
id (required) string Randomly generated GUID.
Validation pattern: ^[a-zA-Z0-9-]*$
Example: "62432dd8-97d9-400a-8da8-4a5c1951f935"
url (required) string The RELATIVE URL that has caused this error. Example: "/programs/123"
errors ValidationError[object] Optional, only returned on 400 Bad Request errors for validation errors
errors. field (required) string Field in error
errors. message (required) string Descriptional message
generalMessage (required) string A human-readable message
errorCode (required) string Product defined error code.
Validation pattern: ^[0-9-]*$
timestamp (required) datetime Timestamp of the call

/transactions/payment-tokens/threeds/{payment_token_id}

Use this API call to obtain data on a previously made charge with 3DS authentication. You will need to identify the charge by the ID.

Supply the payment token ID as a URI parameter.

HTTP Request URL
URI Parameter
PARAMETERTYPEDESCRIPTION
paymentTokenIdstring
(required)
Complex representation of Payment Token Id.
Header
PARAMETERTYPEDESCRIPTION
Acceptstring
(enum)
API version

API version value:

  • application/vnd.mcn.transaction-service.api.v.1+json
Request Schema
Request Parameters
PARAMETERTYPEDESCRIPTION
createNewPaymentTokenboolean
(optional)
Return new payment token for subsequent transactions or not.
clientAccnuminteger
(required)
Merchant account number.
clientSubaccinteger
(required)
Merchant subaccount number.
initialPricefloat
(required)
Initial transaction price.
initialPeriodinteger
(required)
The length (in days) of the initial billing period.
currencyCodestring
(optional)
Three-digit currency code (ISO 4217 standard) for the currency used in the transaction.
recurringPricefloat
(optional)
The amount the consumer will be charged for each recurring bill.
recurringPeriodinteger
(optional)
The length of time between rebills.
rebillsinteger
(optional)
The total number of times the subscription will rebill.
lifeTimeSubscriptionboolean
(optional)
The presence of this variable with a value of 1 indicates that the transaction is a lifetime subscription.
createNewPaymentTokenboolean
(optional)
Return new payment token for subsequent transactions or not.
passThroughInfoArray[any]
(optional)
Paired information being passed through to the transaction service.
threedsCardTokenstring
(required)
The encrypted cardToken you receive through the 3DS verification process. As we require only the first 16 characters, trim the string to that length before sending it to the CCBill API. Sending a string longer than 16 characters results in an error.
Example value: gjeoB5NdJ1r6p0dG
threedsEcistring
(required)
An Electronic Commerce Indicator (ECI).
Values: '0', '1', '2', '5', '6', or '7'.
threedsStatusstring
(required)
The status of the 3DS verification ('Y', 'N', 'A', etc.)
threedsVersionstring
(required)
The version of the 3DS protocol to be followed for this specific card and transaction.
Available versions are 1.0.2 and 2.1.0
threedsXidstring
(optional/required)
The transaction identifier (XID) is a unique tracking number set by the merchant for 3DS. It is a required parameter for threedsVersion 1.0.2
threedsCavvstring
(optional/required)
A digital signature that proves that the transaction has been 3DS verified. The signature is obtained through a 3DS verification flow and is a required parameter for threedsVersion 1.0.2
threedsCavvAlgorithmstring
(optional/required)
CAVV Algorithm for threeds request. The threedsCavvAlgorithm parameter is required for threedsVersion 1.0.2
threedsDsTransIdstring
(optional/required)
Directory Server Transaction ID. The threedsDsTransId parameter is required for threedsVersion 2.1.0
threedsAcsTransIdstring
(optional/required)
Access Control Server Transaction ID. The threedsAcsTransId parameter is required for threedsVersion 2.1.0
threedsSdkTransIdstring
(optional)
The 3DS vendor's transaction ID.
threedsAuthenticationTypestring
(optional)
A digital signature that proves that the transaction has been 3DS verified. The signature is obtained through a 3DS verification flow (v2.1.0).
threedsAuthenticationValuestring
(optional/required)
A digital signature that proves that the transaction has been 3DS verified. The threedsAuthenticationValue parameter is required for threedsVersion 2.1.0
threedsClientTransactionIdstring
(required)
The parameter is automatically generated by the Advanced Widget. Its purpose is to identify the origin of the 3DS authentication transaction.
threedsSuccessboolean
(required)
Verification of 3DS authentication success or failure.
threedsAmountinteger
(optional)
The amount to be charged (same as initialPrice).
threedsCurrencyinteger
(optional)
The 3-digit currency code for the currency to be used in this transaction.
Example value: 840
threedsErrorstring
(optional/required)
Error received from the 3DS vendor during the strong customer authentication process. The parameter is required if no threedsVersion is provided.
threedsErrorDetailstring
(optional)
Error details related to the threedsError.
threedsErrorCodestring
(optional)
Error code.
threedsResponsestring
(optional)
The complete response in case of an error.

cURL

curl -X POST \
  https://api.ccbill.com/transactions/payment-tokens/threeds/01047ed6f3b440c7a2ccc6abc1ad0a84 \
  -H 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOlsibWNuLXRyYW5zYWN0aW9uLXNlcnZpY2UiLCJtY24tYWRtaW4tc2VydmljZSJdLCJzY29wZSI6WyJjcmVhdGVfdG9rZW4iLCJyZWFkX3Rva2VuIiwiY2hhcmdlX3Rva2VuIiwiY3JlYXRlX3Byb2dyYW0iLCJyZWFkX3Byb2dyYW0iLCJjcmVhdGVfcHJvZ3JhbV9wYXJ0aWNpcGF0aW9uIiwicmVhZF9wcm9ncmFtX3BhcnRpY2lwYXRpb24iLCJtb2RpZnlfcHJvZ3JhbV9wYXJ0aWNpcGF0aW9uIl0sImV4cCI6MTUzNzM4MDczNiwiYXV0aG9yaXRpZXMiOlsiTUNOX0FQSV9UT0tFTl9DSEFSR0VSIiwiTUNOX0FQSV9UT0tFTl9DUkVBVE9SIiwiTUNOX0FQSV9BRE1JTiJdLCJqdGkiOiI4YzI2Njg1MC00NjMzLTQzZDMtYjZjOC1lNzIyY2ExNjQ1YTUiLCJjbGllbnRfaWQiOiI1MjE3NjhhYTc1OGQxMWU4YWE2YjAwNTA1NjlkMTU4NSJ9.HRYXZFATkIcI2_LJ1W_xo67IfBnbN9atyYNzyHqseLxYUxzgwBsAV5rNqCixKemOrDIeQLBN4jrwRsBIHDpEvshwBC8XmTodDJzpGmMaU9s1r20RV68X0_d1yTgSDke_Of7VCrVmJRbSuDl7AgsfTqQ1J7nWyu9vcIaER93ms-vadser_Ot9Z68_HAmCJL3DCLpdIFq3PYtBMKKKqXbvhfhSZQZD3b6-aewAnBo0VzpvK6tREqw1rv9_73oAvYcW2aHAj79ILr8viWMM40LyDKMMYOYkneg3hJUQsUVeh9WzztYUJKzERYNXje9fYIGN-eofoLvX7OZJ3eXmIfkrfQ' \
  -H 'Cache-Control: no-cache' \
  -H 'Content-Type: application/json' \
  -d '{"clientAccnum":"901505","clientSubacc":"0","initialPrice":"10.00","initialPeriod":"30","currencyCode":"840","threedsEci":"05","threedsError":"","threedsStatus":"Y","threedsSuccess":"true","threedsVersion":"1.0.2","threedsXid":"aWQteHc4ajJnNGIxZW8gICAgICA=","threedsCavv":"cGFzc3dvcmQxMjM0NTZwYXNzd28=","threedsCavvAlgorithm":"SHA-256","threedsAmount":"10","threedsClientTransactionId":"id-wl9r6duc5zj","threedsCurrency":"USD","threedsSdkTransId":"","threedsAcsTransId":"","threedsDsTransId":"","threedsAuthenticationType":"","threedsCardToken":"gjeoB5NdJ1r6p0dG","threedsErrorDetail":"","threedsErrorCode":"","threedsResponse":""}'
  

JavaScript

var data = JSON.stringify({
    "clientAccnum": "901505",
    "clientSubacc": "0",
    "initialPrice": "10.00",
    "initialPeriod": "30",
    "threedsEci": "05",
    "threedsError": "",
    "threedsStatus": "Y",
    "threedsSuccess": "true",
    "threedsVersion": "1.0.2",
    "threedsXid": "aWQteHc4ajJnNGIxZW8gICAgICA=",
    "threedsCavv": "cGFzc3dvcmQxMjM0NTZwYXNzd28=",
    "threedsCavvAlgorithm": "SHA-256",
    "threedsAmount": "10",
    "threedsClientTransactionId": "id-wl9r6duc5zj",
    "threedsCurrency": "USD",
    "threedsSdkTransId": "",
    "threedsAcsTransId": "",
    "threedsDsTransId": "",
    "threedsAuthenticationType": "",
    "threedsCardToken": "gjeoB5NdJ1r6p0dG",
    "threedsErrorDetail": "",
    "threedsErrorCode": "",
    "threedsResponse": ""
});

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === 4) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://api.ccbill.com/transactions/payment-tokens/threeds/01047ed6f3b440c7a2ccc6abc1ad0a84");
xhr.setRequestHeader("Content-Type", "application/json");
xhr.setRequestHeader("Authorization", "Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOlsibWNuLXRyYW5zYWN0aW9uLXNlcnZpY2UiLCJtY24tYWRtaW4tc2VydmljZSJdLCJzY29wZSI6WyJjcmVhdGVfdG9rZW4iLCJyZWFkX3Rva2VuIiwiY2hhcmdlX3Rva2VuIiwiY3JlYXRlX3Byb2dyYW0iLCJyZWFkX3Byb2dyYW0iLCJjcmVhdGVfcHJvZ3JhbV9wYXJ0aWNpcGF0aW9uIiwicmVhZF9wcm9ncmFtX3BhcnRpY2lwYXRpb24iLCJtb2RpZnlfcHJvZ3JhbV9wYXJ0aWNpcGF0aW9uIl0sImV4cCI6MTUzNzM4MDczNiwiYXV0aG9yaXRpZXMiOlsiTUNOX0FQSV9UT0tFTl9DSEFSR0VSIiwiTUNOX0FQSV9UT0tFTl9DUkVBVE9SIiwiTUNOX0FQSV9BRE1JTiJdLCJqdGkiOiI4YzI2Njg1MC00NjMzLTQzZDMtYjZjOC1lNzIyY2ExNjQ1YTUiLCJjbGllbnRfaWQiOiI1MjE3NjhhYTc1OGQxMWU4YWE2YjAwNTA1NjlkMTU4NSJ9.HRYXZFATkIcI2_LJ1W_xo67IfBnbN9atyYNzyHqseLxYUxzgwBsAV5rNqCixKemOrDIeQLBN4jrwRsBIHDpEvshwBC8XmTodDJzpGmMaU9s1r20RV68X0_d1yTgSDke_Of7VCrVmJRbSuDl7AgsfTqQ1J7nWyu9vcIaER93ms-vadser_Ot9Z68_HAmCJL3DCLpdIFq3PYtBMKKKqXbvhfhSZQZD3b6-aewAnBo0VzpvK6tREqw1rv9_73oAvYcW2aHAj79ILr8viWMM40LyDKMMYOYkneg3hJUQsUVeh9WzztYUJKzERYNXje9fYIGN-eofoLvX7OZJ3eXmIfkrfQ");
xhr.setRequestHeader("Cache-Control", "no-cache");

xhr.send(data);

PHP

<?php
$request = new HttpRequest();
$request->setUrl('https://api.ccbill.com/transactions/payment-tokens/threeds/01047ed6f3b440c7a2ccc6abc1ad0a84');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders(array(
  'Cache-Control' => 'no-cache',
  'Authorization' => 'Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOlsibWNuLXRyYW5zYWN0aW9uLXNlcnZpY2UiLCJtY24tYWRtaW4tc2VydmljZSJdLCJzY29wZSI6WyJjcmVhdGVfdG9rZW4iLCJyZWFkX3Rva2VuIiwiY2hhcmdlX3Rva2VuIiwiY3JlYXRlX3Byb2dyYW0iLCJyZWFkX3Byb2dyYW0iLCJjcmVhdGVfcHJvZ3JhbV9wYXJ0aWNpcGF0aW9uIiwicmVhZF9wcm9ncmFtX3BhcnRpY2lwYXRpb24iLCJtb2RpZnlfcHJvZ3JhbV9wYXJ0aWNpcGF0aW9uIl0sImV4cCI6MTUzNzM4MDczNiwiYXV0aG9yaXRpZXMiOlsiTUNOX0FQSV9UT0tFTl9DSEFSR0VSIiwiTUNOX0FQSV9UT0tFTl9DUkVBVE9SIiwiTUNOX0FQSV9BRE1JTiJdLCJqdGkiOiI4YzI2Njg1MC00NjMzLTQzZDMtYjZjOC1lNzIyY2ExNjQ1YTUiLCJjbGllbnRfaWQiOiI1MjE3NjhhYTc1OGQxMWU4YWE2YjAwNTA1NjlkMTU4NSJ9.HRYXZFATkIcI2_LJ1W_xo67IfBnbN9atyYNzyHqseLxYUxzgwBsAV5rNqCixKemOrDIeQLBN4jrwRsBIHDpEvshwBC8XmTodDJzpGmMaU9s1r20RV68X0_d1yTgSDke_Of7VCrVmJRbSuDl7AgsfTqQ1J7nWyu9vcIaER93ms-vadser_Ot9Z68_HAmCJL3DCLpdIFq3PYtBMKKKqXbvhfhSZQZD3b6-aewAnBo0VzpvK6tREqw1rv9_73oAvYcW2aHAj79ILr8viWMM40LyDKMMYOYkneg3hJUQsUVeh9WzztYUJKzERYNXje9fYIGN-eofoLvX7OZJ3eXmIfkrfQ',
  'Content-Type' => 'application/json'
));

$request->setBody('{"clientAccnum":"901505","clientSubacc":"0","initialPrice":"10.00","initialPeriod":"30","threedsEci":"05","threedsError":"","threedsStatus":"Y","threedsSuccess":"true","threedsVersion":"1.0.2","threedsXid":"aWQteHc4ajJnNGIxZW8gICAgICA=","threedsCavv":"cGFzc3dvcmQxMjM0NTZwYXNzd28=","threedsCavvAlgorithm":"SHA-256","threedsAmount":"10","threedsClientTransactionId":"id-wl9r6duc5zj","threedsCurrency":"USD","threedsSdkTransId":"","threedsAcsTransId":"","threedsDsTransId":"","threedsAuthenticationType":"","threedsCardToken":"gjeoB5NdJ1r6p0dG","threedsErrorDetail":"","threedsErrorCode":"","threedsResponse":""}');

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
?>
Response Schemas
Response

A 200 return value indicates that the request was successful. You will receive the following information:

Type TransactionInfo
[ { "errorCode": "integer", "approved": "boolean", "paymentUniqueId": "string", "sessionId": "string", "subscriptionId": "integer", "newPaymentTokenId": "string" } ]

Parameter Type Description
item.errorCode (required) integer Error condition value of the transaction
item. approved (required) boolean Approval status of the transaction
item. paymentUniqueId (required) string Unique key connected to payment account
item. sessionId (required) string Unique session ID value for transaction
item.subscriptionId (required) integer Subscription ID to which the transaction belongs
item.newPaymentTokenId (required) string New payment token for subsequent transactions

The response failed to complete due to an invalid header/parameter in the request.

Type Error
{ "id": "string", "url": "string", "errors": [ { "field": "string", "message": "string" } ], "generalMessage": "string", "errorCode": "string", "timestamp": "datetime" }

Parameter Type Description
id (required) string Randomly generated GUID.
Validation pattern: ^[a-zA-Z0-9-]*$
Example: "62432dd8-97d9-400a-8da8-4a5c1951f935"
url (required) string The RELATIVE URL that has caused this error. Example: "/programs/123"
errors ValidationError[object] Optional, only returned on 400 Bad Request errors for validation errors
errors. field (required) string Field in error
errors. message (required) string Descriptional message
generalMessage (required) string A human-readable message
errorCode (required) string Product defined error code.
Validation pattern: ^[0-9-]*$
timestamp (required) datetime Timestamp of the call

The response failed to complete due to authorization problem.

Type Error
{ "id": "string", "url": "string", "errors": [ { "field": "string", "message": "string" } ], "generalMessage": "string", "errorCode": "string", "timestamp": "datetime" }

Parameter Type Description
id (required) string Randomly generated GUID.
Validation pattern: ^[a-zA-Z0-9-]*$
Example: "62432dd8-97d9-400a-8da8-4a5c1951f935"
url (required) string The RELATIVE URL that has caused this error. Example: "/programs/123"
errors ValidationError[object] Optional, only returned on 400 Bad Request errors for validation errors
errors. field (required) string Field in error
errors. message (required) string Descriptional message
generalMessage (required) string A human-readable message
errorCode (required) string Product defined error code.
Validation pattern: ^[0-9-]*$
timestamp (required) datetime Timestamp of the call

The response failed to complete because access to the resource is forbidden.

Type Error
{ "id": "string", "url": "string", "errors": [ { "field": "string", "message": "string" } ], "generalMessage": "string", "errorCode": "string", "timestamp": "datetime" }

Parameter Type Description
id (required) string Randomly generated GUID.
Validation pattern: ^[a-zA-Z0-9-]*$
Example: "62432dd8-97d9-400a-8da8-4a5c1951f935"
url (required) string The RELATIVE URL that has caused this error. Example: "/programs/123"
errors ValidationError[object] Optional, only returned on 400 Bad Request errors for validation errors
errors. field (required) string Field in error
errors. message (required) string Descriptional message
generalMessage (required) string A human-readable message
errorCode (required) string Product defined error code.
Validation pattern: ^[0-9-]*$
timestamp (required) datetime Timestamp of the call

The response failed to complete due to an invalid resource.

Type Error
{ "id": "string", "url": "string", "errors": [ { "field": "string", "message": "string" } ], "generalMessage": "string", "errorCode": "string", "timestamp": "datetime" }

Parameter Type Description
id (required) string Randomly generated GUID.
Validation pattern: ^[a-zA-Z0-9-]*$
Example: "62432dd8-97d9-400a-8da8-4a5c1951f935"
url (required) string The RELATIVE URL that has caused this error. Example: "/programs/123"
errors ValidationError[object] Optional, only returned on 400 Bad Request errors for validation errors
errors. field (required) string Field in error
errors. message (required) string Descriptional message
generalMessage (required) string A human-readable message
errorCode (required) string Product defined error code.
Validation pattern: ^[0-9-]*$
timestamp (required) datetime Timestamp of the call

The response failed to complete due to an invalid method of request.

Type Error
{ "id": "string", "url": "string", "errors": [ { "field": "string", "message": "string" } ], "generalMessage": "string", "errorCode": "string", "timestamp": "datetime" }

Parameter Type Description
id (required) string Randomly generated GUID.
Validation pattern: ^[a-zA-Z0-9-]*$
Example: "62432dd8-97d9-400a-8da8-4a5c1951f935"
url (required) string The RELATIVE URL that has caused this error. Example: "/programs/123"
errors ValidationError[object] Optional, only returned on 400 Bad Request errors for validation errors
errors. field (required) string Field in error
errors. message (required) string Descriptional message
generalMessage (required) string A human-readable message
errorCode (required) string Product defined error code.
Validation pattern: ^[0-9-]*$
timestamp (required) datetime Timestamp of the call

The response failed to complete due to an unacceptable media type in the request.

Type Error
{ "id": "string", "url": "string", "errors": [ { "field": "string", "message": "string" } ], "generalMessage": "string", "errorCode": "string", "timestamp": "datetime" }

Parameter Type Description
id (required) string Randomly generated GUID.
Validation pattern: ^[a-zA-Z0-9-]*$
Example: "62432dd8-97d9-400a-8da8-4a5c1951f935"
url (required) string The RELATIVE URL that has caused this error. Example: "/programs/123"
errors ValidationError[object] Optional, only returned on 400 Bad Request errors for validation errors
errors. field (required) string Field in error
errors. message (required) string Descriptional message
generalMessage (required) string A human-readable message
errorCode (required) string Product defined error code.
Validation pattern: ^[0-9-]*$
timestamp (required) datetime Timestamp of the call

The response failed to complete due to an unsupported media type in the request.

Type Error
{ "id": "string", "url": "string", "errors": [ { "field": "string", "message": "string" } ], "generalMessage": "string", "errorCode": "string", "timestamp": "datetime" }

Parameter Type Description
id (required) string Randomly generated GUID.
Validation pattern: ^[a-zA-Z0-9-]*$
Example: "62432dd8-97d9-400a-8da8-4a5c1951f935"
url (required) string The RELATIVE URL that has caused this error. Example: "/programs/123"
errors ValidationError[object] Optional, only returned on 400 Bad Request errors for validation errors
errors. field (required) string Field in error
errors. message (required) string Descriptional message
generalMessage (required) string A human-readable message
errorCode (required) string Product defined error code.
Validation pattern: ^[0-9-]*$
timestamp (required) datetime Timestamp of the call

The response failed to complete in some way.

Type Error
{ "id": "string", "url": "string", "errors": [ { "field": "string", "message": "string" } ], "generalMessage": "string", "errorCode": "string", "timestamp": "datetime" }

Parameter Type Description
id (required) string Randomly generated GUID.
Validation pattern: ^[a-zA-Z0-9-]*$
Example: "62432dd8-97d9-400a-8da8-4a5c1951f935"
url (required) string The RELATIVE URL that has caused this error. Example: "/programs/123"
errors ValidationError[object] Optional, only returned on 400 Bad Request errors for validation errors
errors. field (required) string Field in error
errors. message (required) string Descriptional message
generalMessage (required) string A human-readable message
errorCode (required) string Product defined error code.
Validation pattern: ^[0-9-]*$
timestamp (required) datetime Timestamp of the call