Card Payment
A form for making a payment using a card token. The request body must include the customer
identifier customer_key and the linked card token customer_card_token.
URL
Method: GET or POST
- Production:
https://customer.pay.kvell.group/payment/card - Stage:
https://customer.stage.kvell.group/payment/card
Request parameters
Name |
Data type | Required | Description |
|---|---|---|---|
api_key |
string | Yes | Unique shop identifier |
customer_key |
string | Yes | Customer identifier in the merchant's system |
customer_card_token |
string | Yes | Linked card token |
transaction |
string | Yes | Unique transaction number on the merchant's side |
amount |
string | Yes | Amount in kopecks |
description |
string | Yes | Transaction description |
success_url |
string | Yes | Redirect link after a successful payment |
fail_url |
string | Yes | Redirect link after a failed payment |
auto_return |
string | No | Automatic redirect to success_url or fail_url after payment. Specified in seconds. If a value greater than 0 is passed, the redirect happens after N seconds. If the value is 0, the redirect happens immediately. |
signature |
string | Yes | Signature |
extra_data |
json | No | Additional information |
fiscal_data |
json | No | Receipt fiscalization under 54-FZ |
Generating the signature
The signature is generated by concatenating api_key, customer_key, customer_card_token,
transaction, amount, success_url, fail_url, and secret_key.
sha256 is computed from the resulting string:
sha256({api_key}{customer_key}{customer_card_token}{transaction}{amount}{success_url}{fail_url}{secret_key})
where secret_key is the secret key found in the merchant's shop settings.
Request examples
GET request
https://customer.stage.kvell.group/payment/card?api_key={api_key}&customer_key={customer_key}&customer_card_token={customer_card_token}&transaction={transaction}&description={description}&amount={amount}&signature={signature}&success_url={success_url}&fail_url={fail_url}
https://customer.stage.kvell.group/payment/card?api_key=b4aea11e-f94a-47ac-9687-633f3f8167fc&customer_key=bind_card_test&customer_card_token=CFAVTwnLWp2QvVIr97ognZlHh62Q3HnbQiS3CHll5ln&transaction=c829f8c1-6409-4ce5-b6fa-ec5dcef37dc8&description=Goody+goods&amount=909&signature=40907938777ae11db7ea55127891ecfd23e285b0b66a814714f10dc244ac92cf&success_url=http%3A%2F%2F127.0.0.1%3A5500&fail_url=http%3A%2F%2F127.0.0.1%3A5500&callback_url=http%3A%2F%2F127.0.0.1%3A5500
POST request
<form action="https://customer.stage.kvell.group/payment/card" method="POST">
<input type="hidden" name="api_key" value="3a8c82d6-d2c6-4165-9a6b-ab3f14d965ae">
<input type="hidden" name="transaction" value="fbfe9f88-d5c7-4994-aed6-ee8003f4f342">
<input type="hidden" name="customer_key" value="bind_card_test">
<input type="hidden" name="customer_card_token" value="CFAVTwnLWp2QvVIr97ognZlHh62Q3HnbQiS3CHll5ln">
<input type="hidden" name="amount" value="10000">
<input type="hidden" name="description" value="Product No. 1">
<input type="hidden" name="signature" value="afc09ed74d83849d44c1f1906b10d20c147bf0eb25da940c020c980b3b44ca38">
<input type="hidden" name="success_url" value="http://yoursite.com/success">
<input type="hidden" name="fail_url" value="http://yoursite.com/fail">
<input type="submit" value="Pay">
</form>