# Single Payments

Single payments are very fast and usually the payment confirmation is instant.

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",
    "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
  }'

# 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
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 paymnets 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

# 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

# Sandbox Credentials:

Bank How to login
AIB GB Sandbox Click on the login link. Authorisation will complete immediately and you will be redirected.
Natwest Sandbox Customer Number: 123456789012

When prompted to enter your PIN and Password, Natwest Sandbox will display the values to enter above each text box. Please enter these values in each box before selecting 'Continue'
Royal Bank Of Scotland Customer Number: 123456789012

When prompted to enter your PIN and Password, Natwest Sandbox will display the values to enter above each text box. Please enter these values in each box before selecting 'Continue'
Modelo Sandbox Username: mits
Passwords: mits

WARNING

For Sandbox environment, Vendreo recommends using Modelo Sandbox bank for testing your API integration.

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.