Skip to main content
GET
Get payment event by ID

Authorizations

x-stash-hmac-signature
string
header
required

Versioned HMAC-SHA256 signature authenticating server-to-server SDK requests (your backend calling Stash), as opposed to client-side SDK operations. Recommended over the deprecated X-Stash-Api-Key for the best security. Header format: v1;{appId};{unixMillisTimestamp};{base64Signature} (semicolon-delimited). {base64Signature} is the base64-encoded HMAC-SHA256 of the string {unixMillisTimestamp}.{requestBody} using your app ingress secret (the ingress secret is shown base64-encoded in Studio; base64-decode it to the raw bytes used as the HMAC key), where {requestBody} is the request body exactly as you send it for POST and PUT requests (the compact canonical request JSON is also accepted) and empty for GET requests. A signature over the exact bytes verifies for bodies of up to 18 KiB (18,432 bytes); a larger body may be refused with 401 even when correctly signed. The timestamp must be within 5 minutes of Stash server time. Your appId is your immutable app identifier, shown in Stash Studio under Project Settings > App details; your ingress secret is under Project Settings > API Secrets.

Path Parameters

id
string
required

Response

A successful response.

status
enum<string>
default:PAYMENT_STATUS_UNSPECIFIED
required
  • PAYMENT_STATUS_PAYMENT_ABANDONED: Terminal: buyer never completed; swept by the abandonment job.
Available options:
PAYMENT_STATUS_UNSPECIFIED,
PAYMENT_STATUS_PAYMENT_PENDING,
PAYMENT_STATUS_PAYMENT_SUCCESS,
PAYMENT_STATUS_PAYMENT_FAILURE,
PAYMENT_STATUS_REFUND_SUCCESS,
PAYMENT_STATUS_REFUND_FAILURE,
PAYMENT_STATUS_UNKNOWN,
PAYMENT_STATUS_PAYMENT_CANCELLED,
PAYMENT_STATUS_PAYMENT_ABANDONED
timeMillis
string<int64>
required

Payment timestamp in milliseconds since epoch

currency
string
required

ISO-4217 currency code (e.g., USD, EUR)

items
object[]

List of items in the payment

region
string

ISO 3166-1 alpha-2 country code of the payer. Absent when not available.

total
string

Total payment amount as string

tax
string

Tax amount as string

taxInclusive
boolean

Whether tax is already included in the item prices. Returned only for shops that Stash has opted in to this field; for every other shop it is always omitted, whatever the payment's tax mode. Even for an opted-in shop it can occasionally be missing, so treat a missing value as unknown, never as false. When true, total equals the sum of pricePerItem × quantity and tax is the share inside it. When false, tax is added on top. For an opted-in shop, this field is not set when Stash cannot tell how the payment was taxed, or when this response's total does not include tax added on top, whatever tax says; otherwise it is false when tax is 0 or not set. To check: total, minus tax when taxInclusive is false, equals the sum of pricePerItem × quantity. total and tax are whole amounts in the currency's minor units in CLDR version 32 (for a few currencies, such as COP with 0 decimals there, fewer decimals than ISO 4217 or later CLDR versions list), while pricePerItem is the exact item price, so when item prices are finer than those units, total (minus tax when taxInclusive is false) can differ from the sum by less than one such unit per item purchased, plus one when tax is added on top; allow that difference. Purchases with a cash coupon also need the discount, which this response does not carry. Some payments return no items; their total cannot be checked from this response.

bonusItems
object[]

List of bonus items included with the purchase