Centrobill Payment API (1.1.39)

Download OpenAPI specification:Download

Centrobill API

The HTTP headers are used to pass additional information between the clients and the server through the request and response header. Certain request customization requires setting HTTP headers. Content-Type and Accept headers control input and output format.

Authentication

ApiKeyAuth

Security Scheme Type API Key
Header parameter name: Authorization

Payment

Generate card data token

header Parameters
X-Request-ID
string

Unique ID of request

Request Body schema: application/json
number
required
string (Card number) [ 12 .. 19 ] characters
expirationYear
required
string (Card expiration year) 2 characters
expirationMonth
required
string (Card expiration month) 2 characters
cvv
string (Card secure code) [ 3 .. 4 ] characters
cardHolder
string (Cardholder full name) [ 1 .. 64 ] characters
zip
string (Zip code) [ 1 .. 16 ] characters

Responses

Request samples

Content type
application/json
{
  • "number": "4024007179366348",
  • "expirationYear": "25",
  • "expirationMonth": "12",
  • "cvv": "009",
  • "cardHolder": "John Smith",
  • "zip": "14000"
}

Response samples

Content type
application/json
{
  • "token": "d86bdcbb-c369-46d9-a9d0-9c5010e3bfdb",
  • "expireAt": 1611735028
}

Pay

Authorizations:
header Parameters
X-Request-ID
string

Unique ID of request

Request Body schema: application/json
required
Credit card (object) or Sepa (object) or Soforbanking (object) or Onlinebanking (object) or Paysafecard (object) or Giropay (object) or Ideal (object) or PPS (object) or Gash (object) or Przelewy24 (object) or Bancontact (object) or Eps (object) or Mybank (object) or Consumer saved payment data (object) or Concrete payment account of customer with CVV number (object) or Concrete payment account of customer (object) or Token of tokenized card data (object) or Crypto (object)
required
SKU object with site id (object) or SKU object with SKU name (object) or SKU object with SKU name and custom prices (object)
required
object
object
metadata
object (Metadata)

Used for storing additional structured information associated with payment

emailOptions
object (Email Options)

Responses

Callbacks

Request samples

Content type
application/json
{
  • "paymentSource": {
    },
  • "sku": {
    },
  • "consumer": {
    },
  • "metadata": {
    },
  • "emailOptions": {
    }
}

Response samples

Content type
application/json
{
  • "payment": {
    },
  • "consumer": {
    },
  • "subscription": {
    },
  • "metadata": {
    }
}

Callback payload samples

Callback
POST: Payment status callback
Content type
application/json
{
  • "payment": {
    },
  • "consumer": {
    },
  • "subscription": {
    },
  • "metadata": {
    }
}

Credit

Authorizations:
path Parameters
id
required
string

Transaction that should be credited

header Parameters
X-Request-ID
string

Unique ID of request

Request Body schema: application/json
amount
required
number <double> (Amount of operation)
reason
required
string (Reason of operation) [ 3 .. 64 ] characters

Responses

Request samples

Content type
application/json
{
  • "amount": 9.99,
  • "reason": "Retention offer"
}

Response samples

Content type
application/json
{
  • "payment": {
    }
}

Payout

Payout

Authorizations:
header Parameters
X-Request-ID
string

Unique ID of request

Request Body schema: application/json
consumerId
required
string [ 5 .. 36 ] characters
paymentAccountId
string <uuid>
parameters
object

List of additional payout parameters

amount
required
number <double> (Amount of operation)
currency
required
string <iso3> (Currency (ISO 4217))
object
metadata
object (Metadata)

Used for storing additional structured information associated with payment

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{
  • "payment": {
    },
  • "consumer": {
    },
  • "metadata": {
    }
}

Subscription

Get subscription

Authorizations:
path Parameters
id
required
string (Subscription ID) [ 5 .. 36 ] characters

Subscription ID

header Parameters
X-Request-ID
string

Unique ID of request

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "status": "active",
  • "type": "trial",
  • "cycle": 0,
  • "skuName": "TEST_EN",
  • "siteId": "983759353",
  • "renewalDate": "2020-04-17 13:43:02",
  • "cancelDate": "2020-11-17 13:43:02",
  • "consumerId": "string"
}

Change subscription recurrent plan

Authorizations:
path Parameters
id
required
string (Subscription ID) [ 5 .. 36 ] characters

Subscription ID

header Parameters
X-Request-ID
string

Unique ID of request

Request Body schema: application/json
Array of objects (Price)

Responses

Request samples

Content type
application/json
{
  • "price": [
    ]
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "status": "active",
  • "type": "trial",
  • "cycle": 0,
  • "skuName": "TEST_EN",
  • "siteId": "983759353",
  • "renewalDate": "2020-04-17 13:43:02",
  • "cancelDate": "2020-11-17 13:43:02",
  • "consumerId": "string"
}

Cancel subscription

Authorizations:
path Parameters
id
required
string (Subscription ID) [ 5 .. 36 ] characters

Subscription ID

header Parameters
X-Request-ID
string

Unique ID of request

Request Body schema: application/json
cancelDate
string or null <date-time> (Date of cancel)

In case if cancelDate is not passed or null, subscription will canceled immediately

Responses

Request samples

Content type
application/json
{
  • "cancelDate": "2020-11-17 13:43:02"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "status": "active",
  • "type": "trial",
  • "cycle": 0,
  • "skuName": "TEST_EN",
  • "siteId": "983759353",
  • "renewalDate": "2020-04-17 13:43:02",
  • "cancelDate": "2020-11-17 13:43:02",
  • "consumerId": "string"
}

Recover already canceled subscription

Authorizations:
path Parameters
id
required
string (Subscription ID) [ 5 .. 36 ] characters

Subscription ID

header Parameters
X-Request-ID
string

Unique ID of request

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "status": "active",
  • "type": "trial",
  • "cycle": 0,
  • "skuName": "TEST_EN",
  • "siteId": "983759353",
  • "renewalDate": "2020-04-17 13:43:02",
  • "cancelDate": "2020-11-17 13:43:02",
  • "consumerId": "string"
}

Site

Create site

Authorizations:
header Parameters
X-Request-ID
string

Unique ID of request

Request Body schema: application/json
name
string (Site name)

URL without protocol prefix

externalId
string (Merchant site ID) [ 3 .. 36 ] characters
ipnUrl
string <url> (URL)

Callback Notification will be sent to this URL after purchase

redirectUrl
string <url> (URL)

User will be redirect to this URL after purchase

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{}

Get site

Authorizations:
path Parameters
id
required
string (Centrobill's site id) [ 5 .. 36 ] characters
Example: 983759353
header Parameters
X-Request-ID
string

Unique ID of request

Responses

Response samples

Content type
application/json
{}

Update site

Authorizations:
path Parameters
id
required
string (Centrobill's site id) [ 5 .. 36 ] characters
Example: 983759353
header Parameters
X-Request-ID
string

Unique ID of request

Request Body schema: application/json
name
string (Site name)

URL without protocol prefix

externalId
string (Merchant site ID) [ 3 .. 36 ] characters
ipnUrl
string <url> (URL)

Callback Notification will be sent to this URL after purchase

redirectUrl
string <url> (URL)

User will be redirect to this URL after purchase

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{}

Product

Create product (SKU)

Authorizations:
header Parameters
X-Request-ID
string

Unique ID of request

Request Body schema: application/json
title
required
string (Product (SKU) description) [ 3 .. 128 ] characters

Description will be displayed on payment page

externalId
string (Merchant SKU ID) [ 3 .. 36 ] characters
type
required
any (Type of product (SKU))
Enum: "one-time" "subscription"
type description
one-time single payment
subscription recurrent payments
required
Amount of operation (number) or Array of Price (objects) (Price)

Use "Amount of product" definition for "one-time" type, "Price object" for "subscription" type

currency
string <iso3> (Currency (ISO 4217))

Responses

Request samples

Content type
application/json
{
  • "title": "Annual subscription",
  • "externalId": "7f9s7f9sfs9",
  • "type": "one-time",
  • "price": 9.99,
  • "currency": "USD"
}

Response samples

Content type
application/json
{
  • "name": "TEST_EN",
  • "siteId": "983759353",
  • "externalId": "14253ms92m0as",
  • "title": "string",
  • "type": "one-time",
  • "price": 9.99,
  • "currency": "USD",
  • "createdAt": "2020-04-17 13:43:02",
  • "updatedAt": "2020-11-17 13:43:02"
}

Get product (SKU)

Authorizations:
path Parameters
name
required
string (Centrobill SKU) [ 5 .. 36 ] characters
Example: TEST_EN
header Parameters
X-Request-ID
string

Unique ID of request

Responses

Response samples

Content type
application/json
{
  • "name": "TEST_EN",
  • "siteId": "983759353",
  • "externalId": "14253ms92m0as",
  • "title": "string",
  • "type": "one-time",
  • "price": 9.99,
  • "currency": "USD",
  • "createdAt": "2020-04-17 13:43:02",
  • "updatedAt": "2020-11-17 13:43:02"
}

Update product (SKU)

Authorizations:
path Parameters
name
required
string (Centrobill SKU) [ 5 .. 36 ] characters
Example: TEST_EN
header Parameters
X-Request-ID
string

Unique ID of request

Request Body schema: application/json
title
required
string (Product (SKU) description) [ 3 .. 128 ] characters

Description will be displayed on payment page

externalId
string (Merchant SKU ID) [ 3 .. 36 ] characters
type
required
any (Type of product (SKU))
Enum: "one-time" "subscription"
type description
one-time single payment
subscription recurrent payments
required
Amount of operation (number) or Array of Price (objects) (Price)

Use "Amount of product" definition for "one-time" type, "Price object" for "subscription" type

currency
string <iso3> (Currency (ISO 4217))

Responses

Request samples

Content type
application/json
{
  • "title": "Annual subscription",
  • "externalId": "7f9s7f9sfs9",
  • "type": "one-time",
  • "price": 9.99,
  • "currency": "USD"
}

Response samples

Content type
application/json
{
  • "message": "Bad Request",
  • "errors": {
    }
}

Consumer

Create consumer (user)

Authorizations:
header Parameters
X-Request-ID
string

Unique ID of request

Request Body schema: application/json
externalId
required
string (Merchant consumer id) [ 3 .. 36 ] characters
username
string (Consumer username) [ 1 .. 255 ] characters
email
string <email> (Consumer email)
firstName
string (Consumer first name) [ 1 .. 32 ] characters
lastName
string (Consumer last name) [ 1 .. 32 ] characters
country
string <iso3> (Consumer's country)
groupId
any (Consumer group ID)
Enum: 1 2 3 4 5
id description
1 whitelist
2 blacklist
3 junior
4 senior
5 expert

Responses

Request samples

Content type
application/json
null

Response samples

Content type
application/json
{
  • "id": "string",
  • "externalId": "14253ms92m0as",
  • "username": "string",
  • "email": "jonny.sonny@google.com",
  • "firstName": "string",
  • "lastName": "string",
  • "country": "string",
  • "groupId": 1
}

Get consumer (user)

Authorizations:
path Parameters
id
required
string (Consumer ID) [ 5 .. 36 ] characters
header Parameters
X-Request-ID
string

Unique ID of request

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "externalId": "14253ms92m0as",
  • "username": "string",
  • "email": "jonny.sonny@google.com",
  • "firstName": "string",
  • "lastName": "string",
  • "country": "string",
  • "groupId": 1
}

Change group of consumer (user)

Authorizations:
path Parameters
id
required
string (Consumer ID) [ 5 .. 36 ] characters
header Parameters
X-Request-ID
string

Unique ID of request

Request Body schema: application/json
groupId
any (Consumer group ID)
Enum: 1 2 3 4 5
id description
1 whitelist
2 blacklist
3 junior
4 senior
5 expert

Responses

Request samples

Content type
application/json
{
  • "groupId": 1
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "externalId": "14253ms92m0as",
  • "username": "string",
  • "email": "jonny.sonny@google.com",
  • "firstName": "string",
  • "lastName": "string",
  • "country": "string",
  • "groupId": 1
}

Service

Get the list of IP addresses that requests may come from

Responses

Response samples

Content type
application/json
[
  • "52.58.234.180",
  • "18.185.38.173",
  • "18.185.208.231",
  • "18.185.208.83"
]

Get test payment data by ID

path Parameters
id
required
any

Test payment data ID

Responses

Response samples

Content type
application/json
{
  • "id": 1234,
  • "type": "visa",
  • "emulate3ds": true,
  • "number": "4024007179366348",
  • "balance": 44,
  • "blocked": true,
  • "allowedIps": [ ],
  • "createdAt": "2022-01-27 10:11:39",
  • "updatedAt": "2022-01-27 10:11:39"
}

Get list of the test payment data

query Parameters
limit
integer

Per page limit

type
string

Type of the test payment data

Responses

Response samples

Content type
application/json
{
  • "id": 1234,
  • "type": "visa",
  • "emulate3ds": false,
  • "number": "4024007179366348",
  • "balance": 44,
  • "blocked": false,
  • "allowedIps": [ ],
  • "createdAt": "2022-01-27 10:11:39",
  • "updatedAt": "2022-01-27 10:11:39"
}

Update balance of the test payment data

Request Body schema: application/json
balance
integer [ 1 .. 6 ] characters

Desired balance of the test payment data

Responses

Request samples

Content type
application/json
{
  • "balance": 0
}

Response samples

Content type
application/json
{
  • "id": 1234,
  • "type": "visa",
  • "emulate3ds": true,
  • "number": "4024007179366348",
  • "balance": 44,
  • "blocked": true,
  • "allowedIps": [ ],
  • "createdAt": "2022-01-27 10:11:39",
  • "updatedAt": "2022-01-27 10:11:39"
}

Create test payment details

Request Body schema: application/json
type
required
string [ 5 .. 36 ] characters

Type of the test payment data

emulate3ds
boolean

True if needs to emulate also 3Ds for this test payment data

balance
integer [ 1 .. 4 ] characters

Balance of the test payment details

allowedIps
array

Allowed IPs array

Responses

Request samples

Content type
application/json
{
  • "type": "visa",
  • "emulate3ds": "true",
  • "balance": "44"
}

Response samples

Content type
application/json
{
  • "id": 1234,
  • "type": "visa",
  • "emulate3ds": true,
  • "number": "4024007179366348",
  • "balance": 44,
  • "blocked": true,
  • "allowedIps": [ ],
  • "createdAt": "2022-01-27 10:11:39",
  • "updatedAt": "2022-01-27 10:11:39"
}

Delete test payment data

Responses

Response samples

Content type
application/json
{
  • "message": "Internal server error"
}

Block test payment data

path Parameters
id
required
any

Test payment data ID

Responses

Response samples

Content type
application/json
{
  • "id": 1234,
  • "type": "visa",
  • "emulate3ds": true,
  • "number": "4024007179366348",
  • "balance": 44,
  • "blocked": true,
  • "allowedIps": [ ],
  • "createdAt": "2022-01-27 10:11:39",
  • "updatedAt": "2022-01-27 10:11:39"
}

Unblock test payment data

path Parameters
id
required
any

Test payment data ID

Responses

Response samples

Content type
application/json
{
  • "id": 1234,
  • "type": "visa",
  • "emulate3ds": true,
  • "number": "4024007179366348",
  • "balance": 44,
  • "blocked": true,
  • "allowedIps": [ ],
  • "createdAt": "2022-01-27 10:11:39",
  • "updatedAt": "2022-01-27 10:11:39"
}

Emulate 3Ds for the test payment data

path Parameters
id
required
any

Test payment data ID

Request Body schema: application/json
emulate3ds
boolean

Should be True if emulate 3Ds and False when not emulate

Responses

Request samples

Content type
application/json
{
  • "emulate3ds": true
}

Response samples

Content type
application/json
{
  • "message": "Unauthorized`"
}

Not emulate 3Ds for the test payment data

path Parameters
id
required
any

Test payment data ID

Request Body schema: application/json
emulate3ds
boolean

Should be True if emulate 3Ds and False when not emulate

Responses

Request samples

Content type
application/json
{
  • "emulate3ds": true
}

Response samples

Content type
application/json
{
  • "message": "Internal server error"
}

Verification

Get available channels of code verification

Authorizations:
path Parameters
phone
string (Consumer's phone number) [ 7 .. 16 ] characters
Example: +1987353539
header Parameters
X-Request-ID
string

Unique ID of request

Responses

Response samples

Content type
application/json
[
  • "sms",
  • "telegram",
  • "whatsapp"
]

Send message with verification code

Authorizations:
path Parameters
channel
required
string

Channel of message

header Parameters
X-Request-ID
string

Unique ID of request

Request Body schema: application/json
phone
required
string (Consumer's phone number) [ 7 .. 16 ] characters
from
string [ 3 .. 16 ] characters

Responses

Request samples

Content type
application/json
{
  • "phone": "+1987353539",
  • "from": "Centrobill"
}

Response samples

Content type
application/json
{
  • "message": "Bad Request",
  • "errors": {
    }
}

Check verification code

Authorizations:
path Parameters
phone
required
string (Consumer's phone number) [ 7 .. 16 ] characters
Example: +1987353539
code
required
string

Verification code

header Parameters
X-Request-ID
string

Unique ID of request

Responses

Response samples

Content type
application/json
{
  • "message": "Bad Request",
  • "errors": {
    }
}

Currency exchange rates

Get list of currency exchange rates

Authorizations:
header Parameters
X-Request-ID
string

Unique ID of request

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get exchange rate by iso3

Authorizations:
path Parameters
iso3
required
string <iso3> (Currency (ISO 4217))
Example: USD
header Parameters
X-Request-ID
string

Unique ID of request

Responses

Response samples

Content type
application/json
{
  • "iso3": "EUR",
  • "usdPerUnit": 0.88,
  • "unitPerUsd": 1.13
}

Payment page

Create URL to payment page

Authorizations:
header Parameters
X-Request-ID
string

Unique ID of request

Request Body schema: application/json
required
Array of SKU object with site id (object) or SKU object with SKU name (object) or SKU object with SKU name and custom prices (object)
object (Consumer)
object (Template)
object (Payment)
metadata
object (Metadata)

Used for storing additional structured information associated with payment

ttl
integer (Lifetime in seconds of payment page. By default 600)
emailOptions
object (Email Options)

Responses

Callbacks

Request samples

Content type
application/json
{
  • "sku": [
    ],
  • "consumer": {
    },
  • "payment": {
    },
  • "metadata": {
    },
  • "emailOptions": {
    },
  • "ttl": 1200
}

Response samples

Content type
application/json

Callback payload samples

Callback
POST: Payment status callback
Content type
application/json
{
  • "payment": {
    },
  • "consumer": {
    },
  • "subscription": {
    },
  • "metadata": {
    }
}