Before you get started, check out this article on how to create a DirectPay app in test mode.
To test DirectPay in sandbox mode, enter the payment link generated from the Initiate Payment endpoint in your browser. This will take you to the DirectPay widget in sandbox mode. Click the "Click to continue" button to get started.
Next, select your bank from the list of banks displayed.
Then click on the button marked to fill in the widget with the sandbox credentials.
Depending on the bank you selected, you may be asked to provide a secret answer and/or token:
Secret answer - lagos
Token - 123456
Note: These tokens are used to test DirectPay payments only.
You can confirm your payment using the token above and this completes the transaction.
After the payment process has been completed, a success message will be displayed!