Recurring Card Payments
This guide explains how to implement recurring card payments. This type of payments allow to tokenize a card and later charge it based on agreed terms without customer participation.
All process consists of two main steps:
- Step 1: Card tokenization
- Step 2: Charging received token
Step 1: Card tokenization
During card tokenization step customer enters card data and gives a consent to charge it later based on agreed terms. If you would like just to tokenize a card without a payment, then it is possible to use 0.00 EUR
amount. You could also tokenize a card with any other amount if your business logic requires that - for example paying for first month subscription and giving a consent to charge monthly.
Card tokenization is possible only by using our Iframe js for Card Payments. Follow that guide, and pay attention to such details:
- When using
POST Create Transaction
endpoint pass"recurring_required": true
. - When loading
chekout.min.js
userecurringTitle
,recurringDescription
andrecurringConfirmation
options where you should clearly describe the terms customer should agree upon to be charged in the future. Usage of these options will result in the following view:

After transaction is COMPLETED
make sure you are storing token id returned in token_return
message. This token id will be needed to make recurring payment.
Step 2: Charging received token
When you have a token, you could charge it without customer participation by following such process:
- Use
POST Create Transaction
endpoint to create a transaction and receive it’s id - Use
POST Create Payment
endpoint with received transaction id in the path and token id in the body - Handle transaction status, if payment succeeded:
- a. Response of
POST Create Payment
will containtransaction
object andstatus
parameter inside it. Follow documentation of Transaction statuses. - b. Your system will receive asynchronous
payment_return
message tonotifications_url
as explained here.
- a. Response of
- Handle transaction status, if payment failed:
- a. Response of
POST Create Payment
will have 400 HTTP status and body with structure which provided bellow. For all codes check Possible error codes for POST Create Payment..
{
"code": 1034,
"message": "Insufficient funds"
}- b. Your system will receive asynchronous
payment_return
message tonotifications_url
as explained here.
- a. Response of
Keep in mind that each token has it’s valid_until
parameter which is returned during Step 1 with token_return
message. After that date it won’t be possible to charge that token and you will need to invite customer to tokenize a new card.
To avoid fraud, our system has a logic to make token inactive after a certain amount of failed charge attempts or after specific fraud related declines.
Possible error codes for POST Create Payment
Code | Message |
---|---|
1011 | Shop not active |
1012 | Card payments not enabled for this shop |
1013 | Recurring disabled for shop |
1021 | Transaction in wrong status |
1031 | Payment in wrong status |
1032 | Cannot make payment (transaction status violation) |
1033 | Card expired |
1034 | Not sufficient funds |
1035 | Payment declined |
1036 | Authorization failed |
1061 | Invalid transaction |
1062 | Transaction conflict |
1064 | Token expired |
1065 | Token in wrong status |