API integration

How to get started?

As a result of a successful payment, the user is redirected to the Success URL specified in the shop settings. The redirect is sent as a POST request to the Success URL.

Request parameters

Parameter name Required parameter Type Possible values Example Description
InvId Yes string payment-19238465 order_id field passed when creating the bill
OutSum Yes decimal 380.55 Payment amount
CurrencyIn Yes enum USD
RUB
EUR
RUB The currency in which the bill was paid
custom No string additional_information Custom field, passed when creating a bill
SignatureValue Yes string DC32D403CE6BD2E54D4D213278DB286C Request signature. It is formed as follows: strtoupper(md5($OutSum . ":" . $InvId . ":" . $apiToken))

Request example

curl -X POST 'https://cardlink.link/redirect/payment/success' \
-H 'Authorization: Bearer 72|oBCB7Z3SmUm1gvkpEdRcSR2q1ERHpG4vD3DNBmuT' \
-d 'InvId=123' \
-d 'OutSum=12345' \
-d 'CurrencyIn=RUB' \
-d 'custom=custom_information' \
-d 'SignatureValue=398320589F8E31ACE27CC681BCBD8BDA'
As a result of an unsuccessful payment, the user is redirected to the Fail URL specified in the shop settings. The redirection is in the form of a POST request to the Fail URL.

Request parameters

Parameter name Required parameter Type Possible values Example Description
InvId Yes string payment-19238465 order_id field passed when creating the bill
OutSum Yes decimal 380.55 Payment amount
CurrencyIn Yes enum USD
RUB
EUR
RUB The currency in which the bill was paid
custom No string additional_information Custom field, passed when creating a bill
SignatureValue Yes string DC32D403CE6BD2E54D4D213278DB286C Request signature. It is formed as follows: strtoupper(md5($OutSum . ":" . $InvId . ":" . $apiToken))

Request example

curl -X POST 'https://cardlink.link/redirect/payment/fail' \
-H 'Authorization: Bearer 72|oBCB7Z3SmUm1gvkpEdRcSR2q1ERHpG4vD3DNBmuT' \
-d 'InvId=123' \
-d 'OutSum=12345' \
-d 'CurrencyIn=RUB' \
-d 'custom=custom_information' \
-d 'SignatureValue=398320589F8E31ACE27CC681BCBD8BDA'

Bill

Payment

Balance

Payout

Refund

Postback

Additional