API reference · Types
SandboxTestPurchaseResponse
Part of the response of POST /sandbox/test-purchases and GET /sandbox/test-purchases/{ref}.
Type: object
Example
{
"success": true,
"data": {
"test_purchase_ref": "tpr_3f2c0b9d8e7a6f5c4b3a29180f7e6d5c",
"checkout_id": "chk_4e1f7a2b9c3d",
"status": "processing",
"order_ids": [],
"failure": null
}
}Fields
successboolean requiredWhether the operation completed as requested.
Constraints: allowed values:
trueExampletruedataSandboxrequiredTest Purchase The operation or event payload.
Show child fieldsHide child fields
data.string requiredtest_purchase_ref Stable for the Idempotency-Key that started the purchase.
Example
tpr_3f2c0b9d8e7a6f5c4b3a29180f7e6d5cdata.string requiredcheckout_id The checkout the sandbox buyer paid through.
Example
chk_4e1f7a2b9c3ddata.string requiredstatus processinguntil the payment is captured and the order exists, thensucceeded.failedwhen the payment did not complete.Constraints: allowed values:
processing,succeeded,failedExampleprocessingdata.array of string requiredorder_ids The orders the purchase created, as
order_idvalues. Empty untilsucceeded.Field example
[]data.object or null requiredfailure Why the purchase failed, or null.
Show child fieldsHide child fields
data.string requiredfailure. code The stable machine-readable code for this result.
Constraints: allowed values:
TEST_PAYMENT_FAILED,TEST_PURCHASE_NOT_AVAILABLEdata.string requiredfailure. message A human-readable explanation of the result.