Payment Request
To obtain a Payment Request 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 payment profile credentials.
To do this you need to send a POST request to the following url
https://api.vendreo.com/v1/request-payment (Full example: docs)
Single Payments
For single payments see the example below.
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",
"country_code": "GB",
"currency": "GBP",
"description" : "Product Description",
"options": "optional string ",
"payment_type": "single",
"redirect_url": "https://example.com/success",
"failed_url": "https://example.com/failed",
"reference_id": 12312312
}'
Users will be redirected to redirect_url where the payment process will start.
Recurring Payments
For recurring payments see the example below.
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
}'
Not all 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 banks will allow the daily and weekly payments, they will only allow monthly recurring payments!
Users will be redirected to redirect_url where the payment process will start.