Transactions in Test Mode
Fund your Atlas test wallet, initiate test payouts, and switch between test and live environments using the Atlas sandbox and test API keys.
When your account is in test mode real transactions won't work. That includes funding your Atlas account from a real bank account or initiating a payment to external bank account. This page provides guidance on how you can perform transactions that mimic real ones in test mode. You can simulate two kinds of transaction: an inflow (money into your Atlas account) by funding your business account directly or completing a checkout payment, or a payout (money out of your account) using the Create Payout endpoint.
Fund your business account
To fund your account in test mode, you need to make a POST request to the Fund Business Test Wallet endpoint. This endpoint requires three parameters.
- The virtual account details on your Atlas dashboard.
- Your Business ID located at the "Developer" section of the Atlas settings page.
- The amount.
For example:
import axios from "axios";
try {
const response = await axios.post(
"https://atlas.tryduplo.com/api/v1/wallet/fund-wallet",
{
business_id: "YOUR_BUSINESS_ID",
account_number: "1234567890",
amount: 1000,
},
{
headers: {
Authorization: "Bearer YOUR_ACCESS_TOKEN",
},
},
);
console.log(response.data);
} catch (error) {
console.error(error.response?.data || "Request failed");
}On a successful request you will get the response below and an IN_FLOW_SUCCESS_EVENT webhook sent to your configured URL.
{
"requestId": "abcd1234-5678-90ef-ghij-1234567890kl",
"requestTimestamp": "2025-07-16 09:15:00",
"message": "Wallet funded successfully",
"statusCode": 200
}Note
The test funds take approximately 120 secs to reflect on your account.
Checkout
To simulate a checkout payment in test mode, use the Checkout Simulator or complete a checkout in your browser using the test credentials for the payment method you want to try. Atlas checkout supports the payment methods below, and each has its own set of test credentials.
Payment links resolve to the same hosted checkout page, so these testing steps also apply when testing a payment link in test mode. Open the link in your browser while in test mode and complete the payment using the test credentials for your chosen method. To learn how to create and share payment links, see the Payment Links guide .
Card
You can test the checkout by card using these card details. The gateway response is controlled by the expiry date and CVV you provide, not the card number itself.
Tip
You can use any four-digit number as the card PIN when prompted during checkout.
Additional Visa numbers: 4012000033330026
Additional Mastercard numbers: 2223000000000007, 5111111111111118, 2223000000000023
Simulating responses by expiry date
Use the expiry dates below to trigger specific gateway responses regardless of the card number you use.
| Expiry | Gateway response |
|---|---|
01/39 | APPROVED |
05/39 | DECLINED |
04/27 | EXPIRED_CARD |
08/28 | TIMED_OUT |
01/37 | ACQUIRER_SYSTEM_ERROR |
02/37 | UNSPECIFIED_FAILURE |
05/37 | UNKNOWN |
Simulating responses by CVV
Use the CVV values below to simulate specific card verification responses.
| CVV | Response |
|---|---|
100 | MATCH |
101 | NOT_PROCESSED |
102 | NO_MATCH |
Bank transfer
To simulate an account number (bank transfer) payment through checkout, enter the account number and amount in the form below. You can also open the Checkout Simulator as a standalone page.
Simulate a checkout payment
Opay
When a customer selects Opay at checkout, Atlas redirects them to OPay's hosted checkout page, where they choose one of OPay's own payment methods, such as OPay Wallet or bank card. Use the test credentials below for the method you want to simulate.
Note
Before the OPay checkout page loads, OPay prompts for a phone number to proceed. In test mode, any 11-digit phone number works.
OPay Wallet
Enter the test phone number, PIN, and OTP below. The OTP you enter determines whether the payment succeeds or fails.
| Phone number | PIN | OTP | Result |
|---|---|---|---|
1259257649 | 123456 | 315632 | Success |
1259257649 | 123456 | 315633 | Failure |
Opay bank card
Enter the test card below, then authorize with its PIN and OTP. The card you use determines whether the payment succeeds or fails.
Authorize each card with its PIN and OTP:
| Card ending | PIN | OTP |
|---|---|---|
105 | 1105 | 543210 |
108 | 1108 | 245678 |
Payouts
A payout is money leaving your Atlas account. You can initiate payouts in test mode the same way you would in live mode: a POST request to the Create Payout endpoint with the recipient's bank details and the amount you want to transfer.
For example:
const axios = require("axios");
const initiatePayout = async () => {
try {
const response = await axios.post(
"https://atlas.tryduplo.com/api/v1/payout",
{
amount: 50000,
bank_code: "099858",
account_number: "0123456789",
account_name: "John Doe",
narration: "Payment for services rendered",
reference: "payout_12345",
},
{
headers: {
Authorization: "Bearer your_api_key",
"Content-Type": "application/json",
Accept: "application/json",
},
},
);
console.log(response.data);
} catch (error) {
console.error(error.response.data);
}
};
initiatePayout();Info
Learn more about payouts and how they work in the Payout Guide
Switching to live mode
Once you've finished testing your integration, switch to live mode by toggling the environment selector in your Atlas dashboard. Replace your test API keys with live keys, and your application will process real transactions.
Related guides
How is this guide?
Last updated on