Part of the response of POST /sandbox/test-purchases and GET /sandbox/test-purchases/{ref}.

Type: object

Example

Schema example: from the POST /sandbox/test-purchases response
{
  "success": true,
  "data": {
    "test_purchase_ref": "tpr_3f2c0b9d8e7a6f5c4b3a29180f7e6d5c",
    "checkout_id": "chk_4e1f7a2b9c3d",
    "status": "processing",
    "order_ids": [],
    "failure": null
  }
}

Fields

success boolean required

Whether the operation completed as requested.

Constraints: allowed values: true Example true

data SandboxTestPurchase required

The operation or event payload.

Show child fieldsHide child fields
data.test_purchase_ref string required

Stable for the Idempotency-Key that started the purchase.

Example tpr_3f2c0b9d8e7a6f5c4b3a29180f7e6d5c

data.checkout_id string required

The checkout the sandbox buyer paid through.

Example chk_4e1f7a2b9c3d

data.status string required

processing until the payment is captured and the order exists, then succeeded. failed when the payment did not complete.

Constraints: allowed values: processing, succeeded, failed Example processing

data.order_ids array of string required

The orders the purchase created, as order_id values. Empty until succeeded.

Field example[]
data.failure object or null required

Why the purchase failed, or null.

Show child fieldsHide child fields
data.failure.code string required

The stable machine-readable code for this result.

Constraints: allowed values: TEST_PAYMENT_FAILED, TEST_PURCHASE_NOT_AVAILABLE

data.failure.message string required

A human-readable explanation of the result.

Used by