Skip to content

Payments

Retrieve the receipt of a payment

Returns a signed link (valid for 15 minutes) to the PDF receipt of a paid payment of your store: the payer, the items, the card used (masked), the approval code and any refunds.

GET/v1/payments/{payment_id}/receipt

Requires the payments:read scope.

The receipt is in the language of the payment page; a sandbox payment's receipt is clearly marked as a test. Only payments that were paid (paid, partially_refunded, refunded) have a receipt: any other payment, a payment of another store or of the other environment (sandbox vs live) answers 404. The receipt is regenerated after a refund, so the link always shows the current state.

curl https://api.rais.app/v1/payments/5b1c2f4e-9d3a-4c61-8a7e-0f2d6b9e1a33/receipt \
  -H "Authorization: Bearer rais_sk_test_..."
Response200
{
  "object": "receipt",
  "url": "https://files.example.com/storage/receipts/Rais-receipt-1042.pdf?signature=...",
  "expires_at": 1793000900
}

Request

Path parameters

payment_idstringrequired

The id of the payment.

Response

200A signed link to the receipt.

Returns the Receipt object.

Errors

StatusCodeExample message
401invalid_api_keyInvalid API key provided.
403insufficient_scopeThis API key does not have the 'payments:write' permission.
403account_disabledThis store is suspended or disabled.
403live_mode_not_enabledComplete business verification to take live payments.
404payment_not_foundNo such payment.
429rate_limit_exceededToo many requests. Slow down and retry after the delay in the Retry-After header.
500internal_errorSomething went wrong on our side. Quote the request id to support.
503gateway_unavailableThe payment gateway is temporarily unavailable. Please try again later.

Every error has the same envelope. See Errors.