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.
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 NAME | CONTENT-TYPE |
---|---|
Content-Type | application/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.
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-RESOURCE | METHOD | DESCRIPTION |
---|---|---|
/merchant-only | POST | Generates a payment token for a specific merchant/client. |
/merchant-only-verify | POST | Generates a payment token for a specific merchant/client. CVV2 is required for card transactions. |
/{paymentTokenId} | GET | Retrieves details for the specified payment token (timeToLive, creation date, etc). |
/threeds-required | GET | Retrieves whether or not 3DS/SCA is required for a given credit card. |
/{paymentTokenId}/threeds-required | GET | Retrieves whether or not 3DS/SCA is required for a payment token. |
/program-specified | POST | Generates a payment token for the specified program participant. |
/target-client | POST | Generates a payment token for the specified merchant/client. Requires active program participation. |
Endpoint used for creating a payment token.
PARAMETER | TYPE | DESCRIPTION |
---|---|---|
Accept | string (enum) | API version |
Possible API version values:
Example value:
PARAMETER | TYPE | DESCRIPTION |
---|---|---|
clientAccnum | integer (required) | Merchant account number. |
clientSubacc | integer (required) | Merchant subaccount number. |
customerInfo | object (array) | Customer information. |
customerInfo. email | string (required) | Customer's email address. |
customerInfo. browserHttpAcceptLanguage | string (optional) | List of acceptable human languages for response. |
customerInfo. browserHttpUserAgent | string (optional) | The user agent string of the user agent. |
customerInfo. city | string (required) | Customer's city. |
customerInfo. browserHttpAccept | string (optional) | Media type(s) that is(/are) acceptable for the response. |
customerInfo. state | string (required) | Customer's state. |
customerInfo. zipcode | string (required) | Customer's zip code. |
customerInfo. customerFname | string (required) | Customer's first name. |
customerInfo. address1 | string (required) | Customer's address. |
customerInfo. address2 | string (optional) | Customer's address (additional info). |
customerInfo. browserHttpAcceptEncoding | string (optional) | List of acceptable encodings. |
customerInfo. customerLname | string (required) | Customer's last name. |
customerInfo. ipAddress | string (required) | Customer's IP address. Add as a request parameter or through X-Origin-IP header. |
customerInfo. phoneNumber | string (optional) | Customer's phone number. |
customerInfo. country | string (required) | Customer's country. |
paymentInfo | object (array) | Payment information. |
paymentInfo. cardNum | string (required) | Card number. |
paymentInfo. expMonth | string (required) | Card expiration month in mm format. |
paymentInfo. expYear | string (required) | Card expiration year in yyyy format. |
paymentInfo. nameOnCard | string (required) | Name as it appears on the card. |
subscriptionId | integer (required) | Transaction subscription identification number. |
timeToLive | integer (optional) | Time for the token to exist. |
validNumberOfUse | integer (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;
}
?>
{
"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. |
{
"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 |
{
"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 |
{
"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 |
{
"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 |
{
"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 |
{
"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 |
{
"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 |
{
"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 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.
PARAMETER | TYPE | DESCRIPTION |
---|---|---|
Accept | string (enum) | API version |
Example values:
PARAMETER | TYPE | DESCRIPTION |
---|---|---|
clientAccnum | integer (required) | Merchant account number. |
clientSubacc | integer (required) | Merchant subaccount number. |
customerInfo | object (array) | Customer information. |
customerInfo. email | string (required) | Customer's email address. |
customerInfo. browserHttpAcceptLanguage | string (optional) | List of acceptable human languages for the response. |
customerInfo. browserHttpUserAgent | string (optional) | The user agent string of the user agent. |
customerInfo. city | string (required) | Customer's city. |
customerInfo. browserHttpAccept | string (optional) | Media type(s) that is(/are) acceptable for the response. |
customerInfo. state | string (required) | Customer's state. |
customerInfo. zipcode | string (required) | Customer's zip code. |
customerInfo. customerFname | string (required) | Customer's first name. |
customerInfo. address1 | string (required) | Customer's address. |
customerInfo. address2 | string (optional) | Customer's address (additional info). |
customerInfo. browserHttpAcceptEncoding | string (optional) | List of acceptable encodings. |
customerInfo. customerLname | string (required) | Customer's last name. |
customerInfo. ipAddress | string (required) | Customer's IP address. Add as a request parameter or through X-Origin-IP header. |
customerInfo. phoneNumber | string (optional) | Customer's phone number. |
customerInfo. country | string (required) | Customer's country. |
paymentInfo | object (array) | Payment information. |
paymentInfo. cardNum | string (required) | Card number. |
paymentInfo. expMonth | string (required) | Card expiration month in mm format. |
paymentInfo. expYear | string (required) | Card expiration year in yyyy format. |
paymentInfo. nameOnCard | string (required) | Name as it appears on the card. |
paymentInfo. cvv2 | string (required) | CVV2 code on the card. |
subscriptionId | integer (required) | Transaction subscription identification number. |
timeToLive | integer (optional) | Time for the token to exist. |
validNumberOfUse | integer (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;
}
?>
{
"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 |
{
"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 |
{
"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 |
{
"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 |
{
"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 |
{
"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 |
{
"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 |
{
"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 |
{
"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 |
Use this request to retrieve details of a Payment Token based on its ID.
PARAMETER | TYPE | DESCRIPTION |
---|---|---|
paymentTokenId | string (required) | Complex representation of the Payment Token Id. |
PARAMETER | TYPE | DESCRIPTION |
---|---|---|
Accept | string (enum) | API version |
Possible Values:
Example Value:
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;
}
?>
{
"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 |
{
"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 |
{
"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 |
{
"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 |
{
"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 |
{
"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 |
{
"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 |
{
"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 |
{
"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 |
Use this request to determine if a payment card must undergo 3DS verification.
PARAMETER | TYPE | DESCRIPTION |
---|---|---|
Accept | string (enum) | API version |
API version value:
PARAMETER | TYPE | DESCRIPTION |
---|---|---|
bin | integer (required) | The Bank Identification Number (Usually the first 4-6 digits of the card number). |
last4 | string (required) | The last 4 digits of the credit card number. |
clientAccnum | integer (required) | Merchant's account number. |
clientSubacc | integer (required) | Merchant's sub-account number. |
currencyCode | string (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¤cyCode=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¤cyCode=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;
?>
{
"required": "boolean",
"amount": "number"
}
Parameter | Type | Description |
---|---|---|
required | boolean | 3DS required for payment card. |
amount | number | Authorized charge amount. |
{
"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 |
{
"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 |
{
"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 |
{
"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 |
{
"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 |
{
"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 |
{
"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 |
{
"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 |
Use this endpoint to determine if a transaction must undergo 3DS verification based on the payment token ID.
PARAMETER | TYPE | DESCRIPTION |
---|---|---|
Accept | string (enum) | API version |
API version value:
PARAMETER | TYPE | DESCRIPTION |
---|---|---|
currencyCode | string (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;
}
?>
{
"required": "boolean",
"amount": "number"
}
Parameter | Type | Description |
---|---|---|
required | boolean | 3DS required for payment card. |
amount | number | Authorized charge amount. |
{
"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 |
{
"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 |
{
"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 |
{
"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 |
{
"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 |
{
"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 |
{
"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 |
{
"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 |
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.
PARAMETER | TYPE | DESCRIPTION |
---|---|---|
Accept | string (enum) | API version |
API version values:
Example value:
PARAMETER | TYPE | DESCRIPTION |
---|---|---|
clientAccnum | integer (required) | Merchant account number. |
clientSubacc | integer (required) | Merchant subaccount number. |
customerInfo | object (array) | Customer information. |
customerInfo. email | string (required) | Customer's email address. |
customerInfo. browserHttpAcceptLanguage | string (optional) | List of acceptable human languages for the response. |
customerInfo. browserHttpUserAgent | string (optional) | The user agent string of the user agent. |
customerInfo. city | string (required) | Customer's city. |
customerInfo. browserHttpAccept | string (optional) | Media types that are acceptable for the response. |
customerInfo. state | string (required) | Customer's state. |
customerInfo. zipcode | string (required) | Customer's zip code. |
customerInfo. customerFname | string (required) | Customer's first name. |
customerInfo. address1 | string (required) | Customer's address. |
customerInfo. address2 | string (optional) | Customer's address (additional info). |
customerInfo. browserHttpAcceptEncoding | string (optional) | List of acceptable encodings. |
customerInfo. customerLname | string (required) | Customer's last name. |
customerInfo. ipAddress | string (required) | Customer's IP address. |
customerInfo. phoneNumber | string (optional) | Customer's phone number. |
customerInfo. country | string (required) | Customer's country. |
paymentInfo | object | Payment information. |
paymentInfo. cardNum | string (required) | Card number. |
paymentInfo. expMonth | string (required) | Card expiration month in mm format. |
paymentInfo. expYear | string (required) | Card expiration year in yyyy format. |
paymentInfo. nameOnCard | string (required) | Name as it appears on card. |
subscriptionId | integer (required) | Transaction subscription identification number. |
targetClientAccnum | integer (required) | Target Merchant Account Number. |
targetClientSubacc | integer (required) | Target Merchant Subaccount Number. |
timeToLive | integer (optional) | Time for the token to exist. |
validNumberOfUse | integer (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;
}
?>
{
"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. |
{
"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 |
{
"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 |
{
"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 |
{
"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 |
{
"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 |
{
"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 |
{
"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 |
{
"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 |
This endpoint allows merchants to generate payment tokens for cross-sale opportunities with other specified program participants (merchants).
PARAMETER | TYPE | DESCRIPTION |
---|---|---|
Accept | string (enum) | API version |
API version values:
Example value:
PARAMETER | TYPE | DESCRIPTION |
---|---|---|
clientAccnum | integer (required) | Merchant account number. |
clientSubacc | integer (required) | Merchant subaccount number. |
customerInfo | object | Customer information. |
customerInfo. email | string (required) | Customer's email address. |
customerInfo. browserHttpAcceptLanguage | string (optional) | List of acceptable human languages for response. |
customerInfo. browserHttpUserAgent | string (optional) | The user agent string of the user agent. |
customerInfo. city | string (required) | Customer's city. |
customerInfo. browserHttpAccept | string (optional) | Media type(s) that is(/are) acceptable for the response. |
customerInfo. state | string (required) | Customer's state. |
customerInfo. zipcode | string (required) | Customer's zip code. |
customerInfo. customerFname | string (required) | Customer's first name. |
customerInfo. address1 | string (required) | Customer's address. |
customerInfo. address2 | string (optional) | Customer's address (additional info). |
customerInfo. browserHttpAcceptEncoding | string (optional) | List of acceptable encodings. |
customerInfo. customerLname | string (required) | Customer's last name. |
customerInfo. ipAddress | string (required) | Customer's IP address. |
customerInfo. phoneNumber | string (optional) | Customer's phone number. |
customerInfo. country | string (required) | Customer's country. |
paymentInfo | object | Payment information. |
paymentInfo. cardNum | string (required) | Card number. |
paymentInfo. expMonth | string (required) | Card expiration month in mm format. |
paymentInfo. expYear | string (required) | Card expiration year in yyyy format. |
paymentInfo. nameOnCard | string (required) | Name as it appears on card. |
subscriptionId | integer (required) | Transaction subscription identification number. |
programParticipationId | integer (required) | The identifier represents the program associated with the transaction. |
timeToLive | integer (optional) | Time for the token to exist. |
validNumberOfUse | integer (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;
}
?>
{
"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. |
{
"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 |
{
"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 |
{
"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 |
{
"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 |
{
"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 |
{
"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 |
{
"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 |
{
"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 |
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-RESOURCES | METHODS | DESCRIPTION |
---|---|---|
/transactions/payment-tokens/{payment_token_id} | POST | Subresource used to bill a client, or retrieve details about a charge. |
/transactions/payment-tokens/{payment_token_id} | GET | Subresource used to bill a client, or retrieve details about a charge. |
/transactions/payment-tokens/threeds/{payment_token_id} | POST | Subresource 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.
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.
PARAMETER | TYPE | DESCRIPTION |
---|---|---|
paymentTokenId | string (required) | Complex representation of Payment Token Id. |
PARAMETER | TYPE | DESCRIPTION |
---|---|---|
Accept | string (enum) | API version |
API version value:
PARAMETER | TYPE | DESCRIPTION |
---|---|---|
createNewPaymentToken | boolean | Return new payment token for subsequent transactions or not. |
initialPrice | number (required) | Price of the initial transaction. |
clientAccnum | integer (required) | Merchant account number. |
clientSubacc | integer (required) | Merchant subaccount number. |
currencyCode | string (optional) | Numerical representation of the currency used in the transaction. |
lifeTimeSubscription | boolean (optional) | Subscription is valid during the website's lifetime. |
initialPeriod | integer (required) | The time period of the initial transaction |
recurringPeriod | integer (optional) | The time period of recurrent transactions. |
rebills | integer (optional) | The number of times recurrent transactions can occur. |
recurringPrice | number (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;
}
?>
[
{
"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 |
{
"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 |
{
"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 |
{
"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 |
{
"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 |
{
"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 |
{
"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 |
{
"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 |
{
"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 |
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.
PARAMETER | TYPE | DESCRIPTION |
---|---|---|
paymentTokenId | string (required) | Complex representation of Payment Token Id. |
PARAMETER | TYPE | DESCRIPTION |
---|---|---|
Accept | string (enum) | API version |
API version value:
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;
}
?>
[
{
"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 |
{
"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 |
{
"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 |
{
"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 |
{
"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 |
{
"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 |
{
"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 |
{
"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 |
{
"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 |
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.
PARAMETER | TYPE | DESCRIPTION |
---|---|---|
paymentTokenId | string (required) | Complex representation of Payment Token Id. |
PARAMETER | TYPE | DESCRIPTION |
---|---|---|
Accept | string (enum) | API version |
API version value:
PARAMETER | TYPE | DESCRIPTION |
---|---|---|
createNewPaymentToken | boolean (optional) | Return new payment token for subsequent transactions or not. |
clientAccnum | integer (required) | Merchant account number. |
clientSubacc | integer (required) | Merchant subaccount number. |
initialPrice | float (required) | Initial transaction price. |
initialPeriod | integer (required) | The length (in days) of the initial billing period. |
currencyCode | string (optional) | Three-digit currency code (ISO 4217 standard) for the currency used in the transaction. |
recurringPrice | float (optional) | The amount the consumer will be charged for each recurring bill. |
recurringPeriod | integer (optional) | The length of time between rebills. |
rebills | integer (optional) | The total number of times the subscription will rebill. |
lifeTimeSubscription | boolean (optional) | The presence of this variable with a value of 1 indicates that the transaction is a lifetime subscription. |
createNewPaymentToken | boolean (optional) | Return new payment token for subsequent transactions or not. |
passThroughInfo | Array[any] (optional) | Paired information being passed through to the transaction service. |
threedsCardToken | string (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 |
threedsEci | string (required) | An Electronic Commerce Indicator (ECI). Values: '0', '1', '2', '5', '6', or '7'. |
threedsStatus | string (required) | The status of the 3DS verification ('Y', 'N', 'A', etc.) |
threedsVersion | string (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 |
threedsXid | string (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 |
threedsCavv | string (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 |
threedsCavvAlgorithm | string (optional/required) | CAVV Algorithm for threeds request. The threedsCavvAlgorithm parameter is required for threedsVersion 1.0.2 |
threedsDsTransId | string (optional/required) | Directory Server Transaction ID. The threedsDsTransId parameter is required for threedsVersion 2.1.0 |
threedsAcsTransId | string (optional/required) | Access Control Server Transaction ID. The threedsAcsTransId parameter is required for threedsVersion 2.1.0 |
threedsSdkTransId | string (optional) | The 3DS vendor's transaction ID. |
threedsAuthenticationType | string (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). |
threedsAuthenticationValue | string (optional/required) | A digital signature that proves that the transaction has been 3DS verified. The threedsAuthenticationValue parameter is required for threedsVersion 2.1.0 |
threedsClientTransactionId | string (required) | The parameter is automatically generated by the Advanced Widget. Its purpose is to identify the origin of the 3DS authentication transaction. |
threedsSuccess | boolean (required) | Verification of 3DS authentication success or failure. |
threedsAmount | integer (optional) | The amount to be charged (same as initialPrice). |
threedsCurrency | integer (optional) | The 3-digit currency code for the currency to be used in this transaction. Example value: 840 |
threedsError | string (optional/required) | Error received from the 3DS vendor during the strong customer authentication process. The parameter is required if no threedsVersion is provided. |
threedsErrorDetail | string (optional) | Error details related to the threedsError. |
threedsErrorCode | string (optional) | Error code. |
threedsResponse | string (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;
}
?>
[
{
"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 |
{
"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 |
{
"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 |
{
"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 |
{
"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 |
{
"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 |
{
"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 |
{
"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 |
{
"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 |