Using the buyer wallet
In order to use the buyer wallet, make a call to the Web ServiceCharge/CreatePayment.
- Use the same fields as for a single payment and modify the values of the fieldformActionusing one of the vales below:
Field valuesformAction Description CUSTOMER_WALLET Proposes to add the payment method in the buyer wallet and allows to use already registered payment methods. Thecustomer.referencefield becomes mandatory.
The billing details (billingDetails object) transmitted during the registration of the payment method is automatically applied to the transactions made with the buyer wallet.
However, if the merchant transmits the billing details in the Charge/CreatePayment request, then the request data is used for the transaction.
In this case, the buyer details associated with the payment method are not updated.
Request example
POST https://api.secure.osb.pf/api-payment/V4/Charge/CreatePayment
{ "amount": 10000, "currency": "XPF", "formAction": "CUSTOMER_WALLET", "customer": { "reference": "104123487", "email": "sample@example.com", "billingDetails": { "category": "PRIVATE", "firstName": "Moana", ... }
- Then use the formToken present in the response to display the embedded form on your payment page.
If no payment methods are associated with the buyer wallet, the form will prompt you to enter the card details:
If a payment method is associated with a buyer wallet, the fields are pre-populated. The buyer will also have the possibility to add a new card:
- Once the card details are entered, or after the pre-populated details are confirmed, the buyer is prompted to authenticate hi or herself.
- After authentication, the gateway proceeds to the authorization request.