Sandbox helpers

Simulate a sandbox transaction outcome

Sandbox only; returns 403 in production. Completes a pending sandbox deposit or payout with the outcome you choose, and your balance and transaction webhook behave as they would in production. The transaction must still be PENDING, PROCESSING or UNKNOWN: a deposit waiting for an OTP must be authorized first. Use it for a payment method whose account number, phone number or card ends in 0003, which stays pending until simulated, or to complete any other pending sandbox transaction early. Only sandbox transactions that are still pending can be simulated. The result arrives by webhook shortly after this call returns. Your business must have a webhook URL set, otherwise the request is rejected with a 400.

post/api/v1/transaction/{transactionId}/simulate

Request

Path parameters

transactionIdstring required

The unique identifier of the transaction

Request body

outcome'success' | 'failed' required

The status to finalize the transaction to.

Response

Accepted. The transaction as it stands before it is finalized.

Example response

{
  "data": {
    "meta": {
      "failureReason": {
        "code": "AFX_VELOCITY_LIMIT_EXCEEDED"
      }
    }
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.