Skip to content

Sandbox Transaction Simulation

Pyng provides a sandbox-only API that allows partners to simulate final transaction states without using the Pyng App.

URL path - /checkout/sandbox-simulator/{siteId}/transaction-status

Method - POST

Overview

Use this endpoint in the sandbox environment to force a payment intent into a final state for testing.

Request Headers

Header Name Header Value Notes
Content-Type application/json
Authorization Bearer access_token Access token must have an appropriate scope to access resource

Path Parameters

Parameter Key Parameter Data Type Notes
siteId string Unique site id assigned to the Partner's site by Pyng

Body Parameters

Parameter Key Parameter Data Type Required Notes
paymentIntentId string Y Unique id of the payment intent
status string Y Desired transaction status: Settled or Declined

Response

Status Code - 204 No Content

Examples

Request

POST /checkout/sandbox-simulator/{siteId}/transaction-status HTTP/1.1
Host: sample.pyng.com.au
Authorization: Bearer access_token
Content-Type: application/json

{
  "status": "Settled",
  "paymentIntentId": "57688c4d-bf47-4cd0-a4db-b9d3e77a0269"
}

Response

HTTP/1.1 204 No Content

Error Response

HTTP/1.1 400 Bad Request
Content-Type: application/json;charset=UTF-8

{
  "errors": [
    {
      "message": "status must be one of Settled or Declined"
    }
  ],
  "traceId": "6b54f8d3-04eb-479b-9929-3645ce27dedc",
  "timestamp": 1731821436160
}

Notes

  • This endpoint is intended for sandbox use only.
  • The supported simulation statuses are Settled and Declined.