<aside> 🚧 Please note this is an early release and is no longer supported. Please refer to the latest version here.
</aside>
Payments and Disbursements are offered through RubyPay through a simple few-step integration. Once integrated, both payments and disbursements can be made to an end customers compatible stored payment methods. See more about this in Payment methods.
The payment flow can be split into a number of steps, allowing a customisable UI that suits your integration needs, and gives you the option to customise the look and feel of your payment flow.
The core payment sequence
The payment flow steps are:
The customer selects (or enters) the payment amount, along with the payment type (e.g. Credit/Debit card, Bank transfers) support by your client account. Please contact Vivamo support if you are unsure about available payment types.
If the customer has previously stored a payment method (known as “tokens” in RubyPay), you can retrieve these and display them according to your UI flow. If the customer does not exist, a Client not found
error is returned. You may perform a payment and store the customer record in the final stage of this flow.
If the customer has not stored any payment methods previously or if this is their first payment, the payment method capture flow should be initiated. This will result in the payment method being available for a one off payment, or submitted to RubyPay to be stored for future use.
The payment flow requires the capture of a payment method i.e. a token, before continuing.
The customer selects a payment method, whether previously saved or entered as a new method above.
For newly entered payment methods and if you would like to support the customer storing their payment method for future use, the token should be submitted to the RubyPay API for storage against the customer record. Note the token can also be stored during the payment execution step below to reduce the amount of calls necessary.
With all of the information gathered in previous steps (amount, Customer, method) execute the actual payment request
Like payments, the disbursements can be broken into multiple parts, and looks nearly exactly the same as the payment flow.
The core disbursement flow
Disbursement steps:
The customer selects (or enters) the disbursement amount, along with the method (e.g. Debit card, Bank transfer) support by your client account. Please contact Vivamo support if you are unsure about available disbursement types.
If the customer has previously stored a payment method (known as “tokens” in RubyPay), you can retrieve these and display them according to your UI flow. If the customer does not exist, a Client not found
error is returned. You may perform a payment and store the customer record in the final stage of this flow.
If the customer has not stored any payment methods previously or if this is their first payment, the payment method capture flow should be initiated. This will result in the payment method being available for a one off payment, or submitted to RubyPay to be stored for future use.
The payment flow requires the capture of a payment method i.e. a token, before continuing.
The customer selects a payment method, whether previously saved or entered as a new method above.
For newly entered payment methods and if you would like to support the customer storing their payment method for future use, the token should be submitted to the RubyPay API for storage against the customer record. Note the token can also be stored during the payment execution step below to reduce the amount of calls necessary.
With all of the information gathered in previous steps (amount, Customer, method) execute the actual disbursement request
Because there isn’t a final status update returned from the previous step, a webhook needs to be configured to receive updates for the disbursement status.
When you have defined your webhook function, please supply the RubyPay technical team with the details for configuration (🚧 this is currently a manual configuration, however self-service customisation will be provided later).
The required details are:
{
"url": "https://your_webhook_url.com",
"headers": [
{"key": "Authorization", "value": "secret_key"} // your custom secret key to validate message is sent from RubyPay
e
}