Test environments

Sandbox

Afterpay provides a sandbox environment for development and testing. Your Afterpay account manager will provide you with sandbox credentials.

Accounts created within an Afterpay sandbox only exist within the sandbox. When you make a transaction in the sandbox, no money actually moves.

API calls in the sandbox use the base URL https://global-api-sandbox.afterpay.com.

Sandbox Business Hub

Contact your Afterpay account manager or delivery manager to request access to the sandbox Business Hub. The sandbox Business Hub provides the same functionality as the production Business Hub.

You can log into the sandbox Business Hub at https://portal.sandbox.afterpay.com/merchant/

You can view all sandbox orders and settlement files, but no settlements are made to your bank account.

Test customer accounts

You can create test customer accounts in the sandbox environment within your test checkout flow. Each customer account requires a unique email address and phone number.

No SMS messages are sent in the sandbox. Use 111111 as the verification code.

Test credit cards

For card payments, the sandbox capture response (approved/declined) is determined by the CVV value. Use 000 for approval and 051 for decline.

You can use any dummy Visa or Mastercard number and future expiry date, as long as it passes a mod 10 check and hasn’t already been used by a different sandbox customer account. You can also use these dummy cards:

Card TypeCard NumberExpiryCCVResponse
Visa4111 1111 1111 111101/28000Approved
Visa4111 1111 1111 111101/28051Declined
Mastercard5215 0977 9282 665901/28000Approved
Mastercard5215 0977 9282 665901/28051Declined

Test Pay Monthly responses

For US sandbox merchants, the cart total determines the Pay Monthly test response. Use these values to test an approved offer or decline scenario. They are sandbox controls, not production approval rules or a customer’s available-to-spend amount.

Before you test:

  • Use a US sandbox merchant and customer account with Pay Monthly enabled.
  • Set the merchant’s maximum order amount above the cart total.
  • Pay off active Pay Monthly orders. One active order can return a too-many-orders response.
  • Use an address outside Wisconsin unless you are testing a credit freeze. A Wisconsin address can trigger that response independently of the amount.
  • Promotional offers vary by merchant configuration.
  • The $10,000.01‑$12,000.00 USD range does not have a defined response.

Approved offers

All amounts are USD. Terms are in months.

  • 3 or 6; no down payment: $100.00‑$150.00
  • 3 or 6; 20% down payment: $150.01‑$199.99
  • 6; no down payment: $200.00‑$440.00
  • 6; alternate APR: $440.01‑$450.00
  • 6 or 12; no down payment: $450.01‑$470.00, $1,300.01‑$1,800.00, $3,500.01‑$3,800.00, or $12,000.01‑$14,000.00
  • 6 or 12; promotional offer: $470.01‑$480.00, $1,075.01‑$1,080.00, or $3,800.01‑$4,000.00
  • 6 or 12; 20% down payment: $480.01‑$500.00 or $14,000.01‑$15,000.00
  • 3, 6, or 12; 20% down payment: $1,800.01‑$2,000.00
  • 6, 12, or 24; no down payment: $2,000.01‑$2,200.00
  • 3, 6, 12, or 24; no down payment: $4,000.01‑$7,000.00 or $18,000.01‑$20,000.00
  • 3, 6, 12, or 24; 20% down payment: $7,000.01‑$10,000.00
  • 3, 6, or 12; no down payment: $15,000.01‑$17,000.00
  • 6, 12, or 24; 20% down payment: $17,000.01‑$18,000.00

Decline scenarios

All amounts are USD.

  • No credit file found: $500.01‑$525.00 or $1,100.01‑$1,150.00
  • Limit exceeded: $525.01‑$550.00 or $2,200.01‑$3,500.00
  • Credit file reports the customer as deceased: $550.01‑$600.00
  • Credit report frozen: $600.01‑$650.00
  • Bankruptcy record found: $650.01‑$700.00 or $1,150.01‑$1,200.00
  • Underwriting decline: $700.01‑$1,050.00 or $1,200.01‑$1,250.00
  • No eligible offer: $1,050.01‑$1,075.00
  • Extended fraud alert: $1,080.01‑$1,100.00 is declined before identity verification. Amounts from $1,085.01‑$1,100.00 can be approved after verification.
  • Too many orders: $1,250.01‑$1,300.00

These controls affect the Pay Monthly decision, not the card capture response described in Test credit cards. If a range stops returning the expected response, ask your Afterpay account manager to confirm current behavior.

Postman collection

You can test the Afterpay API using Postman, a free-to-download tool for making HTTP requests. To start using Postman, create an account on postman.com.

To test the Afterpay API using postman:

  1. Go to the Afterpay Online API V2 public workspace.
  2. Fork the collection.
  3. Choose a label, workspace, and environment for your fork.
  4. Regularly pull the latest changes to update your forked collection.