Transfer Flow
- Overview
-
In order to transfer Ven from a user's account, you first need to authenticate them with your app and obtain an
access_token.Once an
access_tokenhas been obtained, you're ready to initialise a request_transfer. - Initialise a
request_transfer -
When a user authenticates & grants your app access to their Ven account, they set a confirmation limit for transactions.
Provided there is sufficient credit, any requests for a transfer amount under this limit are accepted automatically, any above it require additional confirmation.i. Automatic acceptance
A transfer request where all arguments are valid, the user has sufficient balance, and the
amountis below the confirmation limit will be automatically accepted.This acceptance will come in the form of the response given to your
request_transfercall:{"request_key":"8df6e4c0240365e425d6cf4839e5266e","code":987654,"expires":1292790082}ii. Redirect for acceptance
For various reasons, the transfer may not be automatically accepted.
In this case, you will need to redirect the user to Ven Currency in order for them to top up/accept the request:{"request_key":"8df6e4c0240365e425d6cf4839e5266e","code":false,"failure_code":210,
"failure_message":"Insufficient Balance","expires":1292790082}Now, use the
request_keyand redirect the user to:https://www.vencurrency.com/confirm/transfer/?request_key=8df6e4c0240365e425d6cf4839e5266eIf and when the user accepts the request/tops up, they will be redirected to the
callback_urlspecified in therequest_transfercallhttp://myapp.com/accept/?request_key=8df6e4c0240365e425d6cf4839e5266e&code=987654&status=OKNote the variables
request_keyandcodeappended to the URL. Use them. - Using a
request_key&codeto charge -
Now you have a
request_keyand acode, either through automatic acceptance or redirection, the transfer can be finalised: 'charged'1. Create a hash
Concatenate your
request_key,code, and appclient_secretthen take the md5 of the result:<?php $hash = md5($request_key . $code . $client_secret); ?>2. Call the /ven/charge method
Follow the instructions on the method page.
Both the recipient and sender will receive an email confirming the success of the transaction