Step 1: Build an FPX Online Banking Source Request object
Build an FPX Online Banking source request object. An FPX Online Banking Source Request object requires the following fields:
Field
Value
type
fpxOnlineBanking
sessionid
The payment session identifier.
owner
fpxOnlineBanking
FPX Online Banking Source Details Object
{"returnUrl":"https://example.com",}
Field
Required/Optional
Description
returnUrl
Required
If you choose to use the full redirect flow, this is where you will redirect your customer to after authorizing or canceling within the FPX Online Banking experience.
Step 2: Create an FPX Online Banking source using DigitalRiver.js
Use the DigitalRiver.js library to create and mount elements to the HTML container.
When you create an FPX Online Banking source, the shopper is redirected to a bank selector page and chooses their preferred bank. They are then redirected to their online bank, where they sign in and review their transaction. The shopper will then complete the transaction by authorizing it with an SMS code. You can accomplish this by redirecting the customer to FPX Online Banking.
Redirecting the customer for FPX Online Banking authorization
To redirect your customer use the redirectUrl parameter in your createSource response.
The shopper's online bank will present the transaction details to the shopper, where they can authorize or cancel the transaction. The shopper will then complete the transaction by authorizing it with an SMS code to complete the order. A successful authorization redirects the customer to the FPX Online Banking Return URL parameter you specified when you created the source.
Once authorized, the source state will change to chargeable.