# Recurring Payments

Using this payment method will allow you to schedule periodically payments.

First you will need to call our API and request a payment. This should be done from your back-end to prevent users from accessing your application credentials.

To do this you need to send a POST request to the following url

https://api.vendreo.com/v1/request-payment

curl --location --request POST 'https://api.vendreo.com/v1/request-payment' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer {AUTH_TOKEN}' \
  --data-raw '{
    "application_key": "{APPLICATION_KEY}",
    "amount": "120",
    "frequency": "monthly",
    "number_of_payments": "12",
    "country_code": "GB",
    "currency": "GBP",
    "description" : "Product Description",
    "options": "optional string ",
    "payment_type": "periodic",
    "redirect_url": "https://example.com/redirect",
    "failed_url": "https://example.com/failed",
    "reference_id": 12312312
  }'

# Header Parameters :

Header Value
Content-Type application/json
Authorization Bearer {application_secret}
(this will be included in the JSON object downloaded after creating the application. Details)

# Query Parameters :

Key Value
application_key Required - String
This will be included in the JSON object downloaded after creating the application. Details
amount Required - Integer
Amount to charge in pence e.g.: 150 for £1.5. This will be the charge for the first payment
frequency Required - String
The frequency of the recurring payment. Accepted: monthly
number_of_payments Required - Integer
The number of payments to take. 0 is 24 payments
country_code Required - String
ISO code (accepted GB)
currency Required - String
ISO CURRENCY code (accepted GBP)
description Required - String
Short Description of the payment. This will appear on the payment summary
payment_type Required - String
For single payments the value needs to be single
redirect_url Required - URL
This is the URL where the user will be redirected after completing the payment
failed_url Optional - URL
This is the URL where the user will be redirected if the payment fails
reference_id Required - String
This will be a unique reference you your system (sessionid, paymentid). This param will be passed to all the requests to Application Callback URL and will help you identify the payment request
options Optional - String
Any optional parameters which will be passed to all the requests to Application Callback URL

WARNING

Not all the banks will allow the first payment to be different from the initial payment. We highly recommend to use the same values for amount and recurring_amount.

Not all the banks will allow the daily and weekly payments, they will only allow monthly recurring payments!

# Response

{
"redirect_url": "https://pay.vendreo.com/payment/c005b8a6-d611-326f-bfa7-03385da5a181",
"payment_request_id": 536
}

User will be redirected to redirect_url where the payment process will start.

Single Payment Start Single Payment Scan Single Payment Login Single Payment Complete

TIP

Sandbox Credentials
You can use the same credentials as for the Single Payments

As soon as the payment process is complete (success/fail), the user will be redirected to the redirect_url provided on request-payment API request.

Vendreo will attempt to inform your system about the status of a payment by making a series of API requests to your Application callback URL. See API Callbacks Section