Read a payment
GET
/payments/{paymentId}
const url = 'https://hub.stablezact.com/api/v1/payments/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0';const options = {method: 'GET', headers: {'X-Public-Key': '<X-Public-Key>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://hub.stablezact.com/api/v1/payments/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \ --header 'X-Public-Key: <X-Public-Key>'Full detail, including the related merchant, network and token records. Requires your own credentials and only returns your own payments.
An id that does not exist returns 500, not 404. That is not
intended, and changing it is a breaking change under the versioning
policy, so it stands in v1.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”paymentId
required
string format: uuid
Responses
Section titled “Responses”The payment.
Media typeapplication/json
object
success
boolean
payment
object
Examplegenerated
{ "success": true, "payment": {}}Missing or invalid credentials.
Media typeapplication/json
object
success
boolean
error
required
Short machine-ish reason.
string
message
Longer explanation, when there is one.
string
Example
{ "error": "API credentials required. Use x-public-key header or x-api-key and x-api-secret headers."}Returned both for a genuine server error and for an id that does not exist. Check the id before treating it as an outage.
Media typeapplication/json
object
success
boolean
error
required
Short machine-ish reason.
string
message
Longer explanation, when there is one.
string
Example
{ "success": false, "error": "Failed to query payment status"}