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."
}


Changing your API token

If you need to change your API token, you can do that on the API integration page by pressing the Refresh API token. As soon as you change your token, the old one will stop being active. Make sure to change it in all of your projects.

Token

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
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 yes string     LXZv3R7Q8B Unique shop ID.
currency_in optional enum RUB
USD
EUR
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.
custom optional string     Any string You can send any string value in this field and it will be returned within postback.
payer_pays_commission optional enum 1   1 or 0 Decides who will pay fees for incoming payment.
name optional string     Any string Please specify the purpose of the payment. It will be shown on the payment form.
payment_method optional enum BANK_CARD
SBP
SBP If this parameter is specified, then when you go to the payment form, this method will be selected automatically, without the possibility of selecting another method.

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.invalid_amount Invalid amount
403 api:error.merchant_banned Merchant is blocked
403 api:error.merchant_not_found Merchant is not found in the System
403 api:error.merchant_subscription_inactive Subscription is not active on your account
403 api:error.merchant_subscription_not_found You account doesn't have subscription
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.rate-not-found Invalid currency or country
422 Invalid data in request
500 api:error.general_error Internal error

POST /bill/toggle_activity

You can deactivate and activate bills using this APO.
Use your merchant token for the authentication.

Request parameters

Name Mandatory Type Format Possible value Example Deacription
id Yes string

LXZv3R7Q8B Unique bill id
active Yes bool
0
1
0 0 - deactivate bill
1 - activate bill

Response params

Name Type Format Possible value Example Deacription
id string

jZqmaPvl9W Unique bill id
active bool
true/false true Bill activity flag
status enum
NEW
PROCESS
UNDERPAID
SUCCESS
OVERPAID
FAIL
NEW Bill status
amount decimal

24600.05 Bill amount
type enum
MULTI
NORMAL
MULTI Type of bill. NORMAL is for onetime payments and MULTI is for infinity number of payments
created_at datetime Y-m-d H:i:s
2020-10-19 17:00:00 Bill creation date and time
currency_in enum
USD
RUB
EUR
USD Currency
success bool
true/false true This flag indicates status of request

Request example

curl -X POST 'https://cent.app/api/v1/bill/toggle_activity' \
-H 'Authorization: Bearer 5|gdzr815Z5EO2nGSVFBGdTG6APuj7tngYCqk59RbdPKYkTfK4LZg3rgakKWx8JIO7kKEFLZGwijI' \
-d 'id=LXZv3R7Q5B' \
-d 'active=1'

Response

{
 "id": "LXZv3R7Q5B",
 "activity": "false",
 "status": "NEW",
 "type": "MULTI",
 "amount": 100.05,
 "currency_in": "USD",
 "created_at": "2020-11-11 14:46:20",
 "success": true
}

Possible errors

Error code Error key Deacription
401 Unauthenticated Invalid API token
403 api:error.merchant_banned Access is forbidenn
422 api:error.bill_not_found Bill doesn't exist
403 api:error.merchant_subscription_inactive Subscription is not active
403 api:error.merchant_subscription_not_found Merchant doesn't have a subscription
403 api:error.merchant_not_found Merchant is not found
403 api:error.bill_is_finished Bill is paid in case of NORMAL bill
422 Invalid data in request
500 api:error.general_error Internal error. Please contact the Support

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
UNDERPAID
SUCCESS
OVERPAID
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
currency_in enum RUB RUB Payment 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",
    "currency_in": "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",
    "currency_in": "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",
    "currency_in": "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
UNDERPAID
SUCCESS
OVERPAID
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.
currency_in enum RUB RUB Payment 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,
  "currency_in": "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
UNDERPAID
SUCCESS
OVERPAID
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
currency_in enum RUB RUB Payment 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",
 "currency_in": "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

GET /api/v1/merchant/balance

You can request information about your current balance state using this API.Use your merchant token for the authentication.

Request parameters

No

Response parameters

Parameter name Type Format Possible value Example Description
balances array Balance
check Balance desription Balance information
success bool
true/false true Request result

Balance

Parameter name Type Format Possible value Example Description
currency enum
USD
RUB
EUR
RUB Currency of balance
balance_available decimal

1000.01 Available balance
balance_locked decimal

900.09 Locked balance for payout
balance_hold decimal

200.02 Fees

Example

curl -X GET 'https://cent.app/api/v1/merchant/balance' \
-H 'Authorization: Bearer 1|gdzr1215Z5EO3nGSVFBGdTG4APuG5tngYCqk69RbdPKYkTfK1LZg2rgakKWx3JI14kKEFLZGwijI'

Response

{
  "success": "true",
  "balances": [
   {
    "currency": "RUB",
    "balance_available": "93988.37000000",
    "balance_locked": "0.00000000",
    "balance_hold": "0.00000000"
   }
  ]
}

Possible errors

Response code Error key Error description
401 Unauthenticated Invalid API Token
403 api:error.merchant_banned Denied access
422 api:error.bill_not_found Bill does not exist
403 api:error.merchant_subscription_inactive Subscription is inactive
403 api:error.merchant_subscription_not_found You account doesn't have subscription
403 api:error.merchant_not_found Account is not found in the system
422 Invalid request data

POST /api/v1/payout/personal/create

In order to withdraw money you need to create a payout. The amount of payout can be split depending on payout account type. In this case you will get a list with payouts.

Request paramters

Parameter name Mandatory? Type Format Possible value Example Description
amount Yes decimal

193.85 Payout amount
payout_account_id Yes string

LXZv3R7Q8B Unique ID of payout account. Money will be send to this account
order_id No string

18364 Unique order ID of payout.

Request paramets

Name Type Format Possible value Example Description
data array Payout
Check Payout description Payout information
success bool
true/false true Result of request

Payout

Parameter name Type Format Possible value Example Description
id string

jZqmaPvl9W Unique ID of payment account
status enum
NEW
MODERATING
PROCESS
SUCCESS
FAIL
ERROR
DECLINED
NEW Payout status
amount decimal
24600.05 Payout amount
commission decimal

10 Fees
account_identifier string
671254******7272 Unique ID of payout account. Money will be send to this account
currency enum RUB RUB Payout currency
created_at datetime Y-m-d H:i:s
2020-10-19 17:00:00 Date and time

Request example

curl -X POST 'https://cent.app/api/v1/payout/personal/create' \
-H 'Authorization: Bearer 5|gdzr815Z5EO2nGSVFBGdTG6APuj7tngYCqk59RbdPKYkTfK4LZg3rgakKWx8JIO7kKEFLZGwijI' \
-d 'amount=1500' \
-d 'payout_account_id=EG8Rz'

Response

{
 "data": [
  {
    "id": "gY37jYr2b6",
    "status": "MODERATING",
    "amount": 1500,
    "commission": 100,
    "account_identifier": "676454******7272",
    "currency": "RUB",
    "created_at": "2020-10-19 17:00:00"
  },
 ],
 "success": true
}

Possible errors

Response code Error key
401 Unauthenticated Incorrect API Token
400 api:error.invalid_amount Invalid amount
400 api:error.merchant_banned Merchant is blocked
400 api:error.merchant_not_found Merchant is not found
400 api:error.merchant_subscription_inactive Subscription is innactive
400 api:error.merchant_subscription_not_found Merchant doesn't have subscription
400 api:error.payout_account_not_found Payout account is not found
400 api:error.payout_account_banned Payout account is blocked
400 api:error.daily_payout_limit_exceeded Exceeded daily limit
400 api:error.monthly_payout_limit_exceeded Exceeded monthly limit
400 api:error.balance_not_enough Not enough balance for payout
400 api:error.direction_not_available Account is unavailable for payout
400 api:error.merchant_not_verified Merchant doesn't have Verified status
422 Invalid data in request
500 api:error.general_error Internal error

POST /api/v1/payout/regular/create

Attention: You need to request access to this API method from Support Team.

Payout to cards using your account balance.
You request can be split if amount is too large. In this case you will see a list of payouts.

Request parameters

Parameter name Mandatory? Type Format Possible value Example Description
amount Yes decimal

193.85 Payout amount
currency Yes enum
RUB RUB Currency
account_type Yes enum
credit_card
sbp
credit_card Account type for payout
account_identifier Yes string
671254******7272 Account ID. You should use next type of parameters:
Card Number - if account_type=credit_card;
Phone Number - if account_type=sbp;
account_bank Yes integer
100000000032 Member ID of bank. Only for account_type=sbp. You can receive list of available banks here
card_holder Yes string
JOHN DOE Cardholder name. Only for account_type=credit_card. Should be the same as on the card.
order_id No string

18364 Unique order ID of payout.

Response parameters

Parameter name Type Format Possible value Example Description
data array Payout
Check Payout description Payout information
success bool
true/false true Result of request

Payout

Parameter name Type Format Possible value Example Description
id string

jZqmaPvl9W Unique payout ID
status enum
NEW
MODERATING
PROCESS
SUCCESS
FAIL
ERROR
DECLINED
NEW Status of payout request
amount decimal
24600.05 Payout amount
commission decimal

10 Fees
account_identifier string
671254******7272 Payout account ID
currency enum RUB RUB Currency
created_at datetime Y-m-d H:i:s
2020-10-19 17:00:00 Date and time

Request example

curl -X POST 'https://cent.app/api/v1/payout/regular/create' \
-H 'Authorization: Bearer 5|gdzr815Z5EO2nGSVFBGdTG6APuj7tngYCqk59RbdPKYkTfK4LZg3rgakKWx8JIO7kKEFLZGwijI' \
-d 'amount=1500' \
-d 'account_type=credit_card'\
-d 'account_identifier=4242424242424242'

Response

{
 "data": [
  {
    "id": "gY37jYr2b6",
    "status": "MODERATING",
    "amount": 1600,
    "commission": 100,
    "account_identifier": "676454******7272",
    "currency": "RUB",
    "created_at": "2020-10-19 17:00:00"
  },
 ],
 "success": true
}

Possible errors

Response code Error key
401 Unauthenticated Invalid API Token
400 api:error.invalid_amount Invalid amount
400 api:error.merchant_banned Merchant is blocked
400 api:error.merchant_not_found Merchant is not found
400 api:error.merchant_subscription_inactive Subscription is not active
400 api:error.merchant_subscription_not_found Merchant doesn't have subscription
400 api:error.payout_account_not_found Payout account is not found
400 api:error.payout_account_banned Payout account is blocked
400 api:error.daily_payout_limit_exceeded Exceeded daily limit
400 api:error.monthly_payout_limit_exceeded Exceeded monthly limit
400 api:error.balance_not_enough Not enough balance for payout
400 api:error.direction_not_available Account doesn't support this payout operation
400 api:error.merchant_not_verified Merchant doesn't have Verified status
422 Invalid request data
403 This action is unauthorized Merchant doesn't have access for API. Please contact Support Team.
500 api:error.general_error Internal error

GET /api/v1/payout/status

You can request a status of any payout operation.

Request parameters

Parameter name Mandatory? Type Format Possible value Example Description
id Yes, if order_id has not been submitted string

LXZv3R7Q8B Unique payout ID
order_id Yes, if id has not been submitted string

18364 Unique order ID of payout.

Response parameters

Payout

Parameter name Type Format Possible value Example Description
id string

jZqmaPvl9W Unique ID
status enum
NEW
MODERATING
PROCESS
SUCCESS
FAIL
ERROR
DECLINED
NEW Status
amount decimal
24600.05 Payout amount
commission decimal

10 Fees
account_identifier string
671254******7272 Payout account ID
currency enum RUB RUB Валюта
created_at datetime Y-m-d H:i:s
2020-10-19 17:00:00 Date and time

Request example

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

Response

{
 "id": "lGPmp4mYeE",
 "status": "MODERATING",
 "amount": 1600,
 "commission": 100,
 "account_identifier": "676454******7272",
 "currency": "RUB",
 "created_at": "2020-10-19 17:00:00"
 "success": true
}

Possible errors

Response code Error key
401 Unauthenticated Invalid API Token
403 api:error.merchant_banned Merchant is blocked
403 api:error.merchant_subscription_inactive Subscription is innactive
403 api:error.merchant_subscription_not_found Merchant doesn't have subscription
403 api:error.merchant_not_found Merchant is not found
422 api:error.payout_not_found Payout is not found
422 Invalid request parameters

GET /api/v1/payout/dictionaries/sbp_banks

You can request list of active SBP banks using this API. Use your merchant token for the authentication.

Request parameters

No

Response parameters

Parameter name Type Format Possible value Example Description
data array SBP bank
check SBP bank description List of active SBP banks
success bool
true/false true Request result

SBP Bank

Parameter name Type Format Possible value Example Description
member_id integer

100000000032 SBP bank member id
name string

Ренессанс Кредит Name of the bank in russian
name_en string

Renaissance Credit Name of the bank in english
bic integer

44525135 Bic of SBP bank

Example

curl -X GET 'https://cent.app/api/v1/payout/dictionaries/sbp_banks' \
-H 'Authorization: Bearer 1|gdzr1215Z5EO3nGSVFBGdTG4APuG5tngYCqk69RbdPKYkTfK1LZg2rgakKWx3JI14kKEFLZGwijI'

Response

{
  "success": "true",
  "data": [
   {
    "member_id": 100000000202,
    "name": "Норвик Банк",
    "name_en": "Norvik Bank",
    "bic": 43304728
   },
   {
    "member_id": 100000000032,
    "name": "Ренессанс Кредит",
    "name_en": "Renaissance Credit",
    "bic": 44525135
   }
  ]
}

Possible errors

Response code Error key Error description
401 Unauthenticated Invalid API Token
403 api:error.merchant_banned Denied access
422 Invalid request data

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
UNDERPAID
OVERPAID
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"
}

Payout postback notifications

If you set a payout webhook url in Webhooks, you will get a POST request with information about payouts.

Parameters Type Format Possible value Example Description
TrsId string

ZqmawDQ9B7l Unique payout ID
Amount decimal

50010.00 Payout amount
IsAuto boolean
true
false
true If payout is created automatically
Status enum
DECLINED
SUCCESS
FAIL
SUCCESS Status of payout request
Currency enum
USD
RUB
EUR
USDT
RUB Currency
Commission decimal
10.00 Fees
AccountType enum
QIWI
BANK_CARD
BANK_CARD Payout account type
AccountNumber string
671254******7272
+79999999999
Payout account ID. The field depends on AccountType:
BANK_CARD - masked pan
QIWI - phone number
BalanceAmount decimal
50010.00 Amount debited from the balance
BalanceCommission decimal
10.00 Fees in balance currency
BalanceCurrency enum
USD
RUB
EUR
USD Balance currency
CommissionApplyType enum
sender
recipient
sender Who paid fees
SignatureValue string strtoupper(md5($Amount . ":" . $TrsId . ":" . $apiToken)) 5FC958AE222AF2E49881DEB815B8E8A2 Signature. You can verify the postback that you received

Example

{
 "TrsId": "ZqmawDQ9B7l",
 "Amount": "50010.00000000",
 "IsAuto": false,
 "Status": "SUCCESS",
 "Currency": "RUB",
 "Commission": "10.00000000",
 "AccountType": "QIWI",
 "AccountNumber": "+79999999999",
 "BalanceAmount": "50010.00000000",
 "SignatureValue": "5FC958AE222AF2E49881DEB815B8E8A2",
 "BalanceCurrency": "RUB",
 "BalanceCommission": "10.00000000",
 "CommissionApplyType": "sender"
}

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"
}

Basic integration using API

For basic integration with cent.app you need to work with /bill/create API and process postbacks.



The main API is


https://cent.app/api/v1/bill/create


Request example


curl --location --request POST 'https://cent.app/api/v1/bill/create' \


--header 'Authorization: Bearer 123|q4uNcWNKMNZoSFSY1XTxp36nsM0kUMSu0otSA95' \


--form 'amount="16"' \


--form 'order_id="Order #123"' \


--form 'description="Description for the link"' \


--form 'type="normal"' \


--form 'shop_id="G1vrEyX0LR"' \


--form 'currency_in="RUB"' \


--form 'custom="custom field"' \


--form 'payer_pays_commission="1"' \


--form 'name="Payment"'


Response example


{


    "success": "true",


    "link_url": "https://cent.app/link/3P1p2rgW7Y",


    "link_page_url": "https://cent.app/transfer/3P1p2rgW7Y",


    "bill_id": "3P1p2rgW7Y"


}


You need to show "link_page_url" URL to the customer or you can add this link to "Pay" button on your site or you can redirect him to the payment page.


The best way is to redirect customer to the payment page using link like this


https://cent.app/transfer/3P1p2rgW7Y


After redirect you need to wait when customer will redirect back to Success URL of Fail URL and you also need to get a postback and process it.



Request example for Success URL or Fail URL


{


    "OutSum": "18.54",


    "SignatureValue": "5A41374P24C99A2156D1D306C800B53C",


    "CurrencyIn": "RUB",


    "InvId": "Order #123",


    "custom": "custom field"


}

 

After redirect to Success or Fail URL you should show a message with a status to the customer.


You can get "order_id" back if you sent it. It's "InvId" in the example above.

You can show your customers following message for Success


"Your payment for order "InvId" is success. Thanks for the payment!"


and for Fail payment you can use this message


"You payment for order InvId has failed. Please try again or contact Support."


You will get postback to Result URL with these parameters


{


    "Status": "SUCCESS",


    "InvId": "Order #123",


    "Commission": "2.54",


    "CurrencyIn": "RUB",


    "OutSum": "18.54",


    "TrsId": "3P1p2rgW7Y",


    "custom": "custom field",


    "SignatureValue": "4A41373E24C99A2656D1D306C800B53C"


}


Using the postback you need to update status of order in your CMS/CRM or site.


In case where you got "SUCCESS" Status, you change order state in your datat base to "PAID".


If you got "FAIL" Status, you change order state to "FAILED PAYMENT".


This instruction should be enough to start working with our system.

Extended use of API

You can extend your integration and automate some actions.


For example, if you didn't get a postback for some reason and don't have payment status you can request information using this method


http://cent.app/api/v1/bill/payments?id=XVmbAYjjvG



In response you will get a list of payments for the given bill ID


{


    "data": [


        {


            "id": "DR2PwBNdmw",


            "bill_id": "XVmbAYjjvG",


            "status": "SUCCESS",


            "amount": 16,


            "currency_in": "RUB",


            "from_card": "553691******8680",


            "created_at": "2021-08-11 19:42:27"


        }


    ],


    "success": true


}



If you need information about all payments for a period of time, you can request a list of bills using


http://cent.app/api/v1/bill/search?start_date=2021-08-10&finish_date=2021-08-11


Response will contain a list of bills


{


    "data": [


        {


            "id": "rP2B4qA1vE",


            "status": "NEW",


            "type": "MULTI",


            "amount": 16,


            "currency_in": "RUB",


            "created_at": "2021-08-11 19:36:57"


        },


        {


            "id": "XVmbAYjjvG",


            "status": "NEW",


            "type": "MULTI",


            "amount": 16,


            "currency_in": "RUB",


            "created_at": "2021-08-11 19:36:31"


        },


        {


            "id": "oa3QqP8j0A",


            "status": "NEW",


            "type": "MULTI",


            "amount": 10,


            "currency_in": "EUR",


            "created_at": "2021-08-11 19:33:03"


        }


    ],


    "success": true


}


And not you can request payments for each bill using


http://cent.app/api/v1/bill/payments?id=bill_id



You can also check your balance using this API method


https://cent.app/api/v1/merchant/balance


The reponse will look like this


{


    "success": "true",


    "balances": [


        {


            "currency": "RUB",


            "balance_available": "0.12000000",


            "balance_locked": "0.00000000",


            "balance_hold": "0.00000000"


        }


    ]


}



If you want to request a withdrawal using API, we have a method for this


https://cent.app/api/v1/payout/personal/create


In the reuest you need to send payout_account_id and you can find it on the page https://cent.app/merchant/withdraw/methods.


The request is very simle and you only need to send payout_account_id and amount.


You send this parameters to


https://cent.app/api/v1/payout/personal/create


and in response you will information about created withdrawal request.

Next you can track it status using this API


https://cent.app/api/v1/payout/status?id=Z0maWVk7l9


Response contains information about amount and status


{


    "id": "Z0maWVk7l9",


    "status": "SUCCESS",


    "amount": "150.00000000",


    "commission": "50.00000000",


    "currency": "RUB",


    "account_identifier": "411111******1234",


    "created_at": "2021-09-06 06:43:40",


    "success": true


}


If you don't have withdrawal ID, you can get a list of all withdrawals.


Ypu can send request with start date and end date to URL


https://cent.app/api/v1/payout/search


In response you will get a list of all withdrawals with statuses


{


    "data": [


        {


            "id": "4NvoJw17AD",


            "status": "SUCCESS",


            "amount": "60.00000000",


            "commission": "10.00000000",


            "currency": "RUB",


            "account_identifier": "+79998887766",


            "created_at": "2021-09-16 11:08:00"


        },


        {


            "id": "JDmGW9VmQ0",


            "status": "SUCCESS",


            "amount": "110.00000000",


            "commission": "10.00000000",


            "currency": "RUB",


            "account_identifier": "+79998887766",


            "created_at": "2021-09-06 07:01:06"


        },


        {


            "id": "ZqmaWVk7l9",


            "status": "SUCCESS",


            "amount": "150.00000000",


            "commission": "50.00000000",


            "currency": "RUB",


            "account_identifier": "411111******1234",


            "created_at": "2021-09-06 06:43:40"


        },


        {


            "id": "QX2X83r25a",


            "status": "SUCCESS",


            "amount": "110.00000000",


            "commission": "10.00000000",


            "currency": "RUB",


            "account_identifier": "+79998887766",


            "created_at": "2021-09-01 17:56:23"


        },


        {


            "id": "nrmdPggmVL",


            "status": "SUCCESS",


            "amount": "110.00000000",


            "commission": "10.00000000",


            "currency": "RUB",


            "account_identifier": "+79998887766",


            "created_at": "2021-09-01 17:56:04"


        },


        {


            "id": "5PvgD6km09",


            "status": "DECLINED",


            "amount": "50.00000000",


            "commission": "1.45000000",


            "currency": "RUB",


            "account_identifier": "+79998887766",


            "created_at": "2021-08-19 14:05:00"


        },


        {


            "id": "Gxm9r8V28A",


            "status": "DECLINED",


            "amount": "50.00000000",


            "commission": "50.00000000",


            "currency": "RUB",


            "account_identifier": "+79998887766",


            "created_at": "2021-08-19 14:00:18"


        },


        {


            "id": "W4ovy4Q7e8",


            "status": "DECLINED",


            "amount": "100.00000000",


            "commission": "99.00000000",


            "currency": "RUB",


            "account_identifier": "411111******1234",


            "created_at": "2021-05-06 16:08:04"


        }


    ],


    "success": true


}