We recommend checking out the introductory section
to understand the basics of direct charge first. This guide assumes you’ve
read that.
Prerequisites
To start your integration, you need the following:- Check that your account is live and verified.
- Request to enable this feature on your account.
Integration TipFor assistance with any of your requests, contact our support team via email at hi@flutterwavego.com.
Payment Flow
1Voucher payments go through three (3) stages before completion:- Initiation - The merchant initiates the payment on behalf of the customer using the customer’s information and transaction details.
- PIN Validation - After the transaction is initiated, we charge the voucher PIN for the transaction and issue a new PIN to the customer for future transactions.
- Confirmation - The merchant confirms the transaction status. If successful, they can provide value or reinitiate the payment if unsuccessful.
Step 1: Initiating the Charge
To initate the payment, collect your customer’s information -email and phone_number. Pass the customer information with the transaction details i.e. reference, currency and amount to the 1Voucher charge endpoint.
Integration TipRead the 1Voucher API reference for the full list of supported parameters.
Step 2: Retrieving the new Voucher PIN
When the voucher is charged, the current PIN becomes invalid, and a new one is generated. In the charge response, we provide the new PIN asdata.meta_data.pin.
Integration TipIt’s best practice to display the current balance and expiry of the voucher to the customer. You can achieve this by returning the balance (
meta_data.amount) and expiry(meta_data.expiry) along with the new PIN.Step 3: Verifying your transaction
Once the transaction is completed, you need to determine it’s final status. There are two ways to query the transaction’s final status.- Query the verified transaction endpoint.
- Use the final status from your transaction webhook.
Integration TipIt is very important to confirm the customer’s name, transaction status and amount before providing value for your transaction.
Sample Webhook