API

Authorization

In order to use different API's endpoints you need to pass a special Header that contains API Token:

Authorization: Bearer <token>

You will get 401 Unauthorized error if you don't pass correct API Token in the Header.

API Token can be found on the API Integration page

Request example: API Token

curl-X GET https://cent.app/api/v1/payment/status?id=lGPmp4mYeE \
--header 'Authorization: Bearer 72|oBCB7Z3SmUm1gvkpEdRcSR2q1ERHpG4vD3DNBmuT'

Possible errors

Response codes Message Description
401 Unauthenticated Invalid API Token

Response example: authorization error

{
  "message": "Unauthenticated."
}

POST /api/v1/bill/create

How to create a bill.

Request example

Parameters Required Type Format Possible value Example Description
amount yes decimal     193.85 Payment amount
card optional string card   4242424242424242 The card where payout will be sent. If skipped, one of the linked cards will be used.
order_id optional string     18364 Unique order ID. Will be sent within Postback.
description optional string     Order #123 Description of payment
type optional enum   normal
multi
normal Type of payment link shows how many payments it could receive. 'normal' type means that only one successful payment could be received for this link. 'multi' type means that many payments could be received with one link.
shop_id optional string     LXZv3R7Q8B Unique shop ID.
currency_in No enum RUB RUB Currency that customer sees during payment process. If you skip this parameter in your request, the default currency of your Shop will be used during the payment process. In case where shop_id doesn't exist, customer will pay in RUB.
currency_out No enum RUB RUB It's currency in which you will recive money to your card. If you skip this parameter in your request, the default currency of your Shop will be used during the payment process. In case where shop_id doesn't exist, RUB will be a default currency.
custom optional string     Any stringYou can send any string value in this field and it will be returned within postback.

Response Parameters

Parameters Type Format Possible value Example Description
success bool   true/false true Payment status
link_url string URL   https://cent.app/link/5QWlqB2kKJ Link to the page with QR-code
link_page_url string URL   https://cent.app/transfer/5QWlqB2kKJ Link to the payment page
bill_id string     5QWlqB2kKJ Unique bill ID

Request example

curl -X POST 'https://cent.app/api/v1/bill/create'
-H 'Authorization: Bearer 72|oBCB7Z3SmUm1gvkpEdRcSR2q1ERHpG4vD3DNBmuT' \
-d 'amount=100.05' \
-d 'description=Some desc' \
-d 'order_id=15' \
-d 'type=multi' \
-d 'shop_id=EG8Rz' \
-d 'custom=123'

Response

{
  "success": "true",
  "link_url": "https://cent.app/link/GkLWvKx3",
  "link_page_url": "https://cent.app/transfer/GkLWvKx3",
  "bill_id": "GkLWvKx3"
}

Possible errors

Response codes Message Description
401 Unauthenticated Invalid API Token
403 api:error.merchant_not_found Merchant is not found in the System
403 api:error.merchant_no_cards_attached Merchant doesn't have linked cards
403 api:error.merchant_cards_have_no_limit_left Payment is exceeding limits for linked card
403 api:error.card_not_linked_to_merchant Card is not linked to merchant
403 api:error.card_out_country_not_supported Card is not supported
403 api:error.invalid_amount Invalid amount
403 api:error.merchant_banned Merchant is blocked
403 api:error.shop_not_found Shop is not found in the System
403 api:error.shop_not_enabled Merchant is deactivated
403 api:error.access_denied Merchant doesn't have access to the shop
403 api:error.no_payment_rate Payment is not availible for given currency_in, currency_out and card
403 api:error.no_payout Can't payout in the given currency
422 api:error.card_not_supported Card is not supported
500 api:error.general_error Internal error

GET /api/v1/bill/payments

Get information about payments for one bill.

Request parameters

Parameters

Required

Type

Format

Possible value

Example

Description

id yes string

LXZv3R7Q8B Unique bill ID

Response example

Parameters Type Format Possible value Example Description
data array Payment
Please, check the Payment description Information about payments
success bool
true/false true Result

Payment

Name of parameter Type Format Possible value Example Description
id string

jZqmaPvl9W Unique payment ID
status enum
NEW
PROCESS
SUCCESS
FAIL
NEW Status of payment/td>
amount decimal decimal(10,2)
24600.05 Total payment amount
amount_received decimal decimal(10,2)
24500.05 Received amount
from_card string card
671254******7272 Payer's card
to_card string card
230120******7609 Card number where the payment was sent
currency_in enum RUB RUB Payment currency
currency_out enum RUB RUB Payout currency
created_at datetime Y-m-d H:i:s
2020-10-19 17:00:00 Creation date and time

Request example 

curl -X GET 'https://cent.app/api/v1/bill/payments?id=LXZv3R7Q8B' \
-H 'Authorization: Bearer 72|oBCB7Z3SmUm1gvkpEdRcSR2q1ERHpG4vD3DNBmuT'

Response

{
 "data": [
  {
    "id": "PQX2XD25a0",
    "bill_id": "5QWlqB2kKJ",
    "status": "SUCCESS",
    "amount": 35400,
    "amount_received": 33875.6,
    "from_card": "676454******7272",
    "to_card": "676454******7272",
    "currency_in": "RUB",
    "currency_out": "RUB",
    "created_at": "2020-10-19 17:00:00"
  },
  {
    "id": "zeAmwP2d5Q",
    "bill_id": "5QWlqB3kKJ",
    "status": "NEW",
    "amount": 3200,
    "amount_received": 3062.2,
    "from_card": "676454******7272",
    "to_card": "676454******7272",
    "currency_in": "RUB",
    "currency_out": "RUB",
    "created_at": "2020-10-18 17:00:00"
  },
  {
    "id": "NDa7lNmdzx",
    "bill_id": "5QWlqB4kKJ",
    "status": "FAIL",
    "amount": 26100,
    "amount_received": 24976.08,
    "from_card": "553691******4442",
    "to_card": "220220******7109",
    "currency_in": "RUB",
    "currency_out": "RUB",
    "created_at": "2020-10-01 17:00:00"
  }
 ],
 "success": true
}

Possible errors

Response codes Message Description
400 api:error.too_many_payments You are trying to get too many payments in one request.
401 Unauthenticated Invalid API Token
403 api:error.merchant_not_found Merchant is not found
403 api:error.merchant_banned Merchant is blocked
403 api:error.bill_not_found Bill is not found

GET /api/v1/bill/status

Get bill info and status.

Request parameters

Parameter Required Type Format Possible value Example Description
id Yes string

LXZv3R7Q8B Unique bill ID

Response parameters

Parameters Type Format Possible value Example Description
id string

jZqmaPvl9W Unique bill ID
status enum
NEW
PROCESS
SUCCESS
FAIL
NEW Bill Status
amount decimal decimal(10,2)
24600.05 Bill amount 
type enum
MULTI
NORMAL
MULTI Bill type. 'Normal' type accepts only one payment. 'Multi' type accepts unlimited number of payments.
to_card string card
424242******7609Card number where the payment was sent.
currency_in enum RUB RUB Payment currency
currency_out enum RUB RUB Payout currency
created_at datetime Y-m-d H:i:s
2020-10-19 17:00:00 Creation date and time
success bool
true/false truePayment status

Request example

curl-X GET 'https://cent.app/api/v1/bill/status?id=lGPmp4mYeE' \
--header 'Authorization: Bearer 72|oBCB7Z3SmUm1gvkpEdRcSR2q1ERHpG4vD3DNBmuT'

Response

{
  "id": "LXZv3R7Q5B",
  "status": "NEW",
  "type": "MULTI",
  "amount": 100.05,
  "to_card": "424242******4242",
  "currency_in": "RUB",
  "currency_out": "RUB",
  "created_at": "2020-11-11 14:46:20",
  "success": true
}

Possible errors

Response codes Message Description
401 Unauthenticated Invalid API Token
403 api:error.merchant_banned Merchant is blocked
422 api:error.bill_not_found Bill is not found

GET /api/v1/payment/status

Get status of payment.

Request parameters 

Parameters Required Type Format Possible value Example Description
id Yes string

LXZv3R7Q8B Unique payment ID

Response example

Parameters Type Format Possible value Example Description
id string

jZqmaPvl9W Unique payment ID
status enum
NEW
PROCESS
SUCCESS
FAIL
NEW Status of payment
amount decimal decimal(10,2)
24600.05 Payment amount
amount_received decimal decimal(10,2)
24500.05 Received amount
from_card string card
671254******7272 Payer's card number
to_card string card
230120******7609 Card number where the payment was sent         
currency_in enum RUB RUB Payment currency
currency_out enum RUB RUB Payout currency
created_at datetime Y-m-d H:i:s
2020-10-19 17:00:00 Creation date and time
success bool
true/false true Status

Request example

curl-X GET 'https://cent.app/api/v1/payment/status?id=lGPmp4mYeE' \
--header 'Authorization: Bearer 72|oBCB7Z3SmUm1gvkpEdRcSR2q1ERHpG4vD3DNBmuT'

Response

{
 "id": "LXZv3R7Q8B",
 "bill_id": "do5G93m",
 "status": "NEW",
 "amount": 0,
 "amount_received": 100,
 "from_card": "676454******7272",
 "to_card": "424242******4242",
 "currency_in": "RUB",
 "currency_out": "RUB",
 "created_at": "2020-11-03 06:43:36",
 "success": true
}

Possible errors

Response codes Message
401 Unauthenticated Invalid API Token
403 api:error.merchant_banned Merchant is blocked
422 api:error.payment_not_found Payment is not found

Postback notifications

If you added a shop and set a result url in shop settings, you will get a POST request with information about payments.

Parameters Type Format Possible value Example Description
InvId string

193 Unique order ID that you sent when you created a bill
OutSum decimal 18364 Payment amount
Commission decimal 12 Transaction fees
Currency enum RUB RUB Currency of payment
TrsId string

LXZv3R7Q8B Unique transaction ID
Status enum
SUCCESS
FAIL
SUCCESS Payment status
CurrencyIn enum RUB RUB Payment currency
custom string

additional_information If you sent something in 'custom' filed when you created a bill, you will get this information back in the postback
SignatureValue string strtoupper(md5($OutSum . ":" . $InvId . ":" . $apiToken))
BACBC4AE7C964A591B131EF5D5553A3A Signature. You can verify the postback that you received

Request example

{
 "InvId": 193,
 "OutSum": 18364,
 "CurrencyIn": "RUB",
 "Commission": 12,
 "TrsId": "LXZv3R7Q8B",
 "Status": "SUCCESS",
 "custom": "additional_information",
 "SignatureValue": "BACBC4AE7C964A591B131EF5D5553A3A"
}

Fail POST request

After a failed payment, user will be redireceted to Fail URL that you set in Shop's settings. The redirect works like a POST request to Fail URL.

Request parameters

Parameter name Type Format Possible value Example Description
InvId string

193 Unique Order ID that was sent at bill creation
OutSum decimal

18364 Payment amount
CurrencyIn enum RUB RUB Currency of payment
custom string additional_information Custom field that was sent at a bill creation
SignatureValue string strtoupper(md5($OutSum . ":" . $InvId . ":" . $apiToken)) BACBC4AE7C964A591B131EF5D5553A3A Signature

Example

{
 "InvId": 193,
 "OutSum": 18364,
 "custom": "additional_information",
 "CurrencyIn": "RUB",
 "SignatureValue": "BACBC4AE7C964A591B131EF5D5553A3A"
}

Success POST request

After a success payment, user will be redireceted to Success URL that you set in Shop's settings. The redirect works like a POST request to Success URL.

Request parameters

Parameter name Type Format Possible value Example Description
InvId string

193 Unique Order ID that was sent at bill creation
OutSum decimal

18364 Payment amount
CurrencyIn enum RUB RUB Currency of payment
custom string additional_information Custom field that was sent at a bill creation
SignatureValue string strtoupper(md5($OutSum . ":" . $InvId . ":" . $apiToken)) BACBC4AE7C964A591B131EF5D5553A3A Signature

Example

{
 "InvId": 193,
 "OutSum": 18364,
 "custom": "additional_information",
 "CurrencyIn": "RUB",
 "SignatureValue": "BACBC4AE7C964A591B131EF5D5553A3A"
}

In order to gain access to cent.app affiliate program, please request.

Fill out the form and we will definitely contact you.