Recurring payments
Example:
1. For card registration the following request is sent via the API:/recarring/reg
{
}
Response:
{
"status": 1,
"id": 11021,
"url": "https://test.vepay.online/pay/form/11021"
}
2. The customer is redirected to the test payment page (the URL parameter in the response) to enter card details that will be saved in the system.
![платежный виджет широкий для сайта.png платежный виджет широкий для сайта.png](/upload/medialibrary/a38/a38098340a781cc156c8efa0891b3fce.png)
3. ter completion of the payment, a request for the card token is sent via the API:
/recarring/get
{
"id": 11021
}
Response:
{
"status": 1,
"card": {
"id": 72,
"num": "411111******1111",
"exp": "12/19"
}
}
The card details must be saved to use them for further payments.
4. The saved token can be used to make a payment:
/recarring/pay
{
"card": 72,
"amount": 10.00,
"extid": "331"
}
Response:
{
"status": 1,
"id": 14954,
"message": ""
}
5. After completion of the payment, its status must be checked:
/recarring/state
{
"id": 14954
}
Response:
{
"status": 1,
"message": "Успешно"
}