Sandbox Mode

Overview OXI Pay provides a sandbox environment to facilitate testing of payment transactions without processing real payments. This document outlines how to use the sandbox mode when requesting a payment link.


Endpoint: POST https://pay.oxichange.com/payment

Headers:

  • X-SANDBOX: true (Required to enable sandbox mode)

Sandbox Mode Behavior: When X-SANDBOX is set to true, the system generates a prefixed token (SANDBOX-<token>) and returns a sandbox-specific payment link:

  • Base URL: https://pay.oxichange.com/sandbox/invoice

  • Payment Link: https://pay.oxichange.com/sandbox/invoice?token=SANDBOX-<token>

Example Response in Sandbox Mode:

{
    "transaction_id": "PYD1713456789",
    "token": "SANDBOX-abcdef123456",
    "base_url": "https://pay.oxichange.com/sandbox/invoice",
    "payment_link": "https://pay.oxichange.com/sandbox/invoice?token=SANDBOX-abcdef123456"
}

Error Codes in Sandbox Mode:

Status Code

Message

Description

-1

"Invalid Merchant ID."

The provided Merchant ID is incorrect.

-2

"Website status is not approved."

The merchant's website is not in an approved state.

-3

"Invalid currency type."

The specified currency is not supported.


Conclusion: By utilizing the X-SANDBOX header, developers can safely test transactions in the sandbox mode before moving to production. Ensure that real transactions omit the sandbox flag for proper processing.

Last updated