Cardlink
Find transactions Sign in Sign up

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://cardlink.link/api/v1/payment/status?id=lGPmp4mYeE \
--header 'Authorization: Bearer 69|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.

POST /api/v1/bill/create

How to create a bill.

Request example

Parameters Required Type Format Possible value Example Description
amount yes decimal     123.45 Payment amount







order_id optional string     12345 Unique order ID. Will be sent within Postback.
description optional string     Order 12345 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 No enum RUB
USD
EUR
KZT
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 stringYou can send any string value in this field and it will be returned within postback.
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://cardlink.link/link/5QWlqB2kKJ Link to the page with QR-code
link_page_url string URL   https://cardlink.link/transfer/5QWlqB2kKJ Link to the payment page
bill_id string     5QWlqB2kKJ Unique bill ID

Request example

curl -X POST 'https://cardlink.link/api/v1/bill/create'
-H 'Authorization: Bearer 69|oBCB7Z3SmUm1gvkpEdRcSR2q1ERHpG4vD3DNBmuT' \
-d 'amount=123.45' \
-d 'description=Some desc' \
-d 'order_id=123' \
-d 'type=multi' \
-d 'shop_id=EG8vrGXmLR' \
-d 'custom=Text'

Response

{
  "success": "true",
  "link_url": "https://cardlink.link/link/GkLWvKx3",
  "link_page_url": "https://cardlink.link/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.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_payout Can't payout in the given currency



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
RUB
USD
EUR
KZT
USD Currency
success bool
true/false true This flag indicates status of request

Request example

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

Ответ

{
 "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
USD
EUR
KZT
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://cardlink.link/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
USD
EUR
KZT
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://cardlink.link/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
555555******4444 Payer's card number






currency_in enum RUB
USD
EUR
KZT
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://cardlink.link/api/v1/payment/status?id=lGPmp4mYeE' \
--header 'Authorization: Bearer 72|oBCB7Z3SmUm1gvkpEdRcSR2q1ERHpG4vD3DNBmuT'

Response

{
 "id": "AbxvAM6vJk",
 "bill_id": "lx286Wo4vK",
 "status": "NEW",
 "amount": 0,

 "from_card": "555555******4444",
 "amount_received": 1000,
 "currency_in": "RUB",
 "created_at": "2021-01-02 01:02:03",
 "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://cardlink.link/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://cardlink.link/api/v1/payout/personal/create' \
-H 'Authorization: Bearer 10|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://cardlink.link/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://cardlink.link/api/v1/payout/status?id=lGPmp4mYeE' \
--header 'Authorization: Bearer 72|oBCB7Z3SmUm1gvkpEdRcSR2q1ERHpG4vD3DNBmuT'

Ответ

{
 "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://cardlink.link/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

POST /api/v1/refund/full/create

Important: API is available upon request via support.

Used to make a full refund.

Request parameters

Parameter name Required parameter Type Format Possible values Example Description
payment_id yes string

LXZv3R7Q8B Unique identifier of payment

Response parameters

Parameter name Type Format Possible values Example Description
id string

5QWlqB2kKJ Unique refund identifier
status string
NEW
PROCESS
SUCCESS
FAIL
NEW Refund status
amount decimal

1355.91 Refund amount
currency enum
RUB
USD
EUR
RUB Currency
entity_type string
payment payment Refund type
entity_id string
payment LXZv3R7Q8B Unique identifier of the payment for which the refund is made
created_at datetime Y-m-d H:i:s
2020-10-19 17:00:00 Refund creation date and time
success bool
true
false
true Request success flag

Request example

curl -X POST 'https://cardlink.link/api/v1/refund/full/create' \
-H 'Authorization: Bearer 5|gdzr815Z5EO2nGSVFBGdTG6APuj7tngYCqk59RbdPKYkTfK4LZg3rgakKWx8JIO7kKEFLZGwijI' \
-d 'payment_id=LXZv3R7Q8B'

Response

{
 "id": "5QWlqB2kKJ",
 "status": "NEW",
 "amount": 1355.91,
 "currency": "RUB",
 "entity_type": "payment",
 "entity_id": "LXZv3R7Q8B",
 "created_at": "2020-10-19 17:00:00",
 "success": true
}

Possible errors

Response code Error key Error description
400 api:error.balance_not_enough There are not enough funds on the balance
401 Unauthenticated Invalid API Token
403 api:error.merchant_banned Access for merchant is prohibited
403 api:error.merchant_not_found Merchant not found
403 This action is unauthorized API is not available to the merchant. Please contact support.
422 Input validation error
500 api:error.general_error Internal error

POST /api/v1/refund/partial/create

Important: API is available upon request via support.

Used to make a partial refund.

Request parameters

Parameter name Required parameter Type Format Possible values Example Description
payment_id yes string

LXZv3R7Q8B Unique identifier of payment
amount yes decimal

1355.91 Amount of partail refund

Response parameters

Parameter name Type Format Possible values Example Description
id string

5QWlqB2kKJ Unique refund identifier
status string
NEW
PROCESS
SUCCESS
FAIL
NEW Refund status
amount decimal

1355.91 Refund amount
currency enum
RUB
USD
EUR
RUB Currency
entity_type string
payment payment Refund type
entity_id string
payment LXZv3R7Q8B Unique identifier of the payment for which the refund is made
created_at datetime Y-m-d H:i:s
2020-10-19 17:00:00 Refund creation date and time
success bool
true
false
true Request success flag

Request example

curl -X POST 'https://cardlink.link/api/v1/refund/partial/create' \
-H 'Authorization: Bearer 5|gdzr815Z5EO2nGSVFBGdTG6APuj7tngYCqk59RbdPKYkTfK4LZg3rgakKWx8JIO7kKEFLZGwijI' \
-d 'payment_id=LXZv3R7Q8B'

Response

{
 "id": "5QWlqB2kKJ",
 "status": "NEW",
 "amount": 1355.91,
 "currency": "RUB",
 "entity_type": "payment",
 "entity_id": "LXZv3R7Q8B",
 "created_at": "2020-10-19 17:00:00",
 "success": true
}

Possible errors

Response code Error key Error description
400 api:error.balance_not_enough There are not enough funds on the balance
401 Unauthenticated Invalid API Token
403 api:error.merchant_banned Access for merchant is prohibited
403 api:error.merchant_not_found Merchant not found
403 This action is unauthorized API is not available to the merchant. Please contact support.
422 Input validation error
500 api:error.general_error Internal error

GET /api/v1/refund/status

Get refund status.

Request parameters

Parameter name Required parameter Type Format Possible values Example Description
payment_id yes string

LXZv3R7Q8B Unique identifier of payment

Response parameters

Parameter name Type Format Possible values Example Description
id string

5QWlqB2kKJ Unique refund identifier
status string
NEW
PROCESS
SUCCESS
FAIL
NEW Refund status
amount decimal

1355.91 Refund amount
currency enum
RUB
USD
EUR
RUB Currency
entity_type string
payment payment Refund type
entity_id string
payment LXZv3R7Q8B Unique identifier of the payment for which the refund is made
created_at datetime Y-m-d H:i:s
2020-10-19 17:00:00 Refund creation date and time
success bool
true
false
true Request success flag

Request example

curl -X GET 'https://cardlink.link/api/v1/refund/status?id=5QWlqB2kKJ' \
-H 'Authorization: Bearer 5|gdzr815Z5EO2nGSVFBGdTG6APuj7tngYCqk59RbdPKYkTfK4LZg3rgakKWx8JIO7kKEFLZGwijI'

Response

{
 "id": "5QWlqB2kKJ",
 "status": "NEW",
 "amount": 24600.05,
 "currency": "RUB",
 "entity_type": "payment",
 "entity_id": "LXZv3R7Q8B",
 "created_at": "2020-10-19 17:00:00",
 "success": true
}

Possible errors

Response code Error key Error description
401 Unauthenticated Invalid API Token
403 api:error.merchant_banned Access for merchant is prohibited
403 api:error.merchant_not_found Merchant not found
403 This action is unauthorized API is not available to the merchant. Please contact support.
422 Input validation error
500 api:error.general_error Internal error

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

123 Unique order ID that you sent when you created a bill
OutSum decimal 12345 Payment amount
Commission decimal 12 Transaction fees
TrsId string

LXZv3R7Q8B Unique transaction ID
Status enum
SUCCESS
UNDERPAID
OVERPAID
FAIL
SUCCESS Payment status
CurrencyIn enum RUB
USD
EUR
KZT
RUB Payment currency
custom string

custom_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))
KWE3FDF98UEWMS7733SWQWPCPL1LA10Y Signature. You can verify the postback that you received

Request example

{
 "InvId": 123,
 "OutSum": 12345,
 "CurrencyIn": "RUB",
 "Commission": 123,
 "TrsId": "AbxvAM6vJk",
 "Status": "SUCCESS",
 "custom": "custom_information",
 "SignatureValue": "KWE3FDF98UEWMS7733SWQWPCPL1LA10Y"
}

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

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

12345 Payment amount
CurrencyIn enum RUB
USD
EUR
KZT
RUB Currency of payment
custom string custom_information Custom field that was sent at a bill creation
SignatureValue string strtoupper(md5($OutSum . ":" . $InvId . ":" . $apiToken)) KWE3FDF98UEWMS7733SWQWPCPL1LA10Y Signature

Example

{
 "InvId": 123,
 "OutSum": 12345,
 "custom": "custom_information",
 "CurrencyIn": "RUB",
 "SignatureValue": "KWE3FDF98UEWMS7733SWQWPCPL1LA10Y"
}

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

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

12345 Payment amount
CurrencyIn enum RUB
USD
EUR
KZT
RUB Currency of payment
custom string custom_information Custom field that was sent at a bill creation
SignatureValue string strtoupper(md5($OutSum . ":" . $InvId . ":" . $apiToken)) KWE3FDF98UEWMS7733SWQWPCPL1LA10Y Signature

Example

{
 "InvId": 123,
 "OutSum": 12345,
 "custom": "custom_information",
 "CurrencyIn": "RUB",
 "SignatureValue": "KWE3FDF98UEWMS7733SWQWPCPL1LA10Y"
}

Write off from CARDLINK but didn't buy anything?

CARDLINK is a payment link creation tool for accepting payments. If you see CARDLINK in your bank statement, then the funds were debited using the payment link created using our service.

We will help you deal with this payment. Please fill out the form and we will answer you within 48 hours.

Your application will be processed soon. It usually takes up to 48 hours