Ir al contenido

Create a public link to the receipt

POST/payments/{id}/receipt-linksProbar
Parámetros de ruta

La llamada la hace tu navegador, contra el servidor que elijas arriba. Si la documentación no está servida desde el mismo origen que la API, el navegador puede bloquear la respuesta por CORS: en ese caso abre estas páginas desde la propia API (/docs) o usa el curl de arriba.

POST
/payments/{id}/receipt-links
curl --request POST \
--url http://localhost:3000/v1/payments/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/receipt-links \
--header 'Content-Type: application/json' \
--header 'x-api-key: <x-api-key>' \
--data '{ "expires_in_days": 7 }'

Scope payments:write. A public link your customer can open without an account: https://<host>/receipt#<token>. The token travels only in the URL fragment (#), so browsers never send it to any server log, proxy or Referer; we only store its hash. The url is shown only in this response. If you send an Idempotency-Key, a replay returns the same link with url: null: we never store the token, not even for idempotency.

Only for a payout that is settled right now (409 receipt_not_available otherwise). It expires after expires_in_days (1 to 30, 7 by default), can be revoked, and stops working if your account is suspended. Up to 20 live links per payout (409 receipt_link_limit_reached). Any expired, revoked or unknown link returns the same 404 receipt_not_found.

id
required
string format: uuid
Media typeapplication/json
object
expires_in_days
integer
default: 7 >= 1 <= 30
Example
{
"expires_in_days": 7
}

Link created

Media typeapplication/json
object
id
string format: uuid
url

Shown only once. The token is in the fragment (#). null in an Idempotency-Key replay: the token is never stored.

string
nullable
expires_at
string format: date-time
Example
{
"id": "0b6a9f8e-3f2c-4c7a-9a43-1d2e5f6a7b8c",
"url": "https://qa.bolivarconnect.com/receipt#3f9c0e5b6a7d4c2e1f0a9b8c7d6e5f4a3b2c1d0e9f8a7b6c5d4e3f2a1b0c9d8e",
"expires_at": "2026-09-07T19:06:44.120Z"
}
Cache-Control
string
Example
no-store

Error con código estable

Media typeapplication/json
object
error
object
meta

Contexto estructurado del error cuando lo hay: qué límite se superó y de cuánto, qué campo es inválido, cuánto saldo había. No aparece en errores internos.

object
key
additional properties
any
type
string
Allowed values: invalid_request_error authentication_error rate_limit_error upstream_error api_error
code

Código ESTABLE. Programa contra esto.

string
message
string
request_id
string
Example
{
"error": {
"type": "invalid_request_error",
"code": "insufficient_balance",
"request_id": "req_8a0312ba896772bc441134cd"
}
}

Error con código estable

Media typeapplication/json
object
error
object
meta

Contexto estructurado del error cuando lo hay: qué límite se superó y de cuánto, qué campo es inválido, cuánto saldo había. No aparece en errores internos.

object
key
additional properties
any
type
string
Allowed values: invalid_request_error authentication_error rate_limit_error upstream_error api_error
code

Código ESTABLE. Programa contra esto.

string
message
string
request_id
string
Example
{
"error": {
"type": "invalid_request_error",
"code": "insufficient_balance",
"request_id": "req_8a0312ba896772bc441134cd"
}
}

Error con código estable

Media typeapplication/json
object
error
object
meta

Contexto estructurado del error cuando lo hay: qué límite se superó y de cuánto, qué campo es inválido, cuánto saldo había. No aparece en errores internos.

object
key
additional properties
any
type
string
Allowed values: invalid_request_error authentication_error rate_limit_error upstream_error api_error
code

Código ESTABLE. Programa contra esto.

string
message
string
request_id
string
Example
{
"error": {
"type": "invalid_request_error",
"code": "insufficient_balance",
"request_id": "req_8a0312ba896772bc441134cd"
}
}