Tokenised Debit order payments
Overview
Debit order details are tokenised when a customer makes a payment and adds his bank details for future payments.
When creating a new future purchase to charge a customer for, you need to specify a due
date that is two days in the future to cater for industry debit order cut-off dates. The purchase status will remain in pending_charge status until the due date, at which point the status will change to pending_execute in waiting for the customer's bank to process the payment.
You can also tokenise a customer's bank details for EFT debit order payment processing without an upfront payment or with an R0 amount.
curl -X 'POST' \
'https://gate.reviopay.com/api/v1/purchases/' \
-H 'Authorization: Bearer {{Your Revio Bearer token}}' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"client_id": "{{Your customers Revio client_id}}",
"payment_method_whitelist":["eft"],
"purchase": {
"currency": "ZAR",
"language": "en",
"products": [
{
"name": "My product or service fixed payment 1",
"price": 15000
}
],
"payment_method_details": {
"direct_debit": {
"profile_code": "{{Revio profile code}}",
"abbreviated_name": "{{Merchant MID/Abbreviated name}}",
"account_number": "{{Merchant clearing account}}",
"deduction_day": 1,
"period_units": "months"
}
}
},
"brand_id": "{{Your Revio brand_id}}",
"force_recurring": true
}
'
curl -X 'POST' \
'https://gate.reviopay.com/api/v1/purchases/' \
-H 'Authorization: Bearer {{Your Revio Bearer token}}' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"client_id": "{{Your customers Revio client_id}}",
"purchase": {
"currency": "ZAR",
"language": "en",
"products": [
{
"name": "My produce or service charge",
"price": 15000
}
]
},
"due": 1663600356,
"brand_id": "{{Your Revio brand_id}}"
}'
curl -X 'GET' \
'https://gate.reviopay.com/api/v1/clients/33671895-54e4-4664-9c3a-f4b1dd4b6934/recurring_tokens/' \
-H 'Authorization: Bearer {{Your Revio Bearer token}}' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json'
curl -X 'POST' \
'https://gate.reviopay.com/api/v1/purchases/b7b12cbd-6411-40b4-8be8-c48edfebad24/charge/' \
-H 'Authorization: Bearer {{Your Revio Bearer token}}' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"recurring_token": "4a328161-24d1-47c5-9169-f1c37d85c582"
}'
A client can have multiple recurring tokens stored against their id.
{
"next": null,
"previous": null,
"results": [
{
"payment_method": "eft",
"description": "dc6e28f0-74dc-4c0d-8d18-a167dca1a97b",
"created_on": 1663426626,
"updated_on": 1663426626,
"type": "client_recurring_token",
"id": "7731c687-84ea-4291-9207-b3b2e22f35fa"
},
{
"payment_method": "eft",
"description": "22a5d1de-727f-4d25-9769-841e17ca910d",
"created_on": 1660818893,
"updated_on": 1660818893,
"type": "client_recurring_token",
"id": "4a328161-24d1-47c5-9169-f1c37d85c582"
}
]
}
Amending Debit order tokens
Amending a customer's Debit orders details is as simple as:
- Creating a new Purchase
- Charging the purchase with the new Debit order details E.g. New Bank account to tokenise
- Store and use the new token for future charges
Recurring tokens no longer required can be deleted using the Delete Recurring Token endpoint.
Updated over 1 year ago