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}/receiptRequires 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_idstringrequiredThe id of the payment.
Response
200A signed link to the receipt.
Returns the Receipt object.
Errors
| Status | Code | Example message |
|---|---|---|
| 401 | invalid_api_key | Invalid API key provided. |
| 403 | insufficient_scope | This API key does not have the 'payments:write' permission. |
| 403 | account_disabled | This store is suspended or disabled. |
| 403 | live_mode_not_enabled | Complete business verification to take live payments. |
| 404 | payment_not_found | No such payment. |
| 429 | rate_limit_exceeded | Too many requests. Slow down and retry after the delay in the Retry-After header. |
| 500 | internal_error | Something went wrong on our side. Quote the request id to support. |
| 503 | gateway_unavailable | The payment gateway is temporarily unavailable. Please try again later. |
Every error has the same envelope. See Errors.