Cancel pending payment

Step 2B: Cancels a pending purchase that was previously registered. IMPORTANT: Always expects HTTP 200 OK response with inline error codes in the body.

POST
/api/v1/purchase/cancel
stash-hmac-signature<token>

HMAC signature generated by signing the request body with the Egress API key from Stash Studio. Used for secure server-to-server communication between game backends and Stash services.

In: header

Request to cancel a pending purchase that was previously registered.

playerIdstring

The user canceling the purchase

transactionIdstring

Transaction identifier to cancel

checkoutLinkId?string

Optional checkout link identifier if purchase was made through a checkout link

itemsarray<Canceled Item>

List of items in this canceled purchase

Response Body

curl -X POST "https://loading/api/v1/purchase/cancel" \  -H "Content-Type: application/json" \  -d '{    "playerId": "string",    "transactionId": "string",    "items": [      {        "guid": "string",        "productId": "string",        "quantity": 0,        "cents": 0      }    ]  }'
{
  "status": "PURCHASE_CANCELLATION_STATUS_UNSPECIFIED",
  "message": "string"
}
{
  "code": 0,
  "message": "string",
  "details": [
    {
      "@type": "string",
      "property1": null,
      "property2": null
    }
  ]
}

How is this guide?