Retrieve a charge
GET /v1/charges/{id}
Retrieve a charge
GET/v1/charges/{id}
Autenticação
- Chave públicapk_…, pode ir para o navegador
- Chave secretask_…, só no seu servidor
Envie a chave no cabeçalho Authorization: Bearer <chave>.
Parâmetros
idstring · path (uuid)obrigatório
Resposta
200OK
idstring (uuid)obrigatórioobjectstringobrigatórioValores:
chargestatusstringobrigatórioValores:
processingpendingpaidrefund_pendingrefundedchargedbackdeclinedamountintegerpode ser nullobrigatórioInteger cents.
payment_methodstringobrigatórioValores:
cardpixboletoacquirerstringpode ser nullobrigatóriopaymentobjectobrigatórioPix: `qr_code`, `expiration_at`. Boleto: `boleto_url`, `boleto_barcode`, `expiration_date`. Card: empty.
Mostrar campos de
paymentqr_codestringexpiration_atstringboleto_urlstringboleto_barcodestringexpiration_datestring
created_atstringpode ser nullobrigatóriocustomerobjectpode ser nullobrigatórioMasked unless the key is secret; always masked on creation.
Mostrar campos de
customernamestringpode ser nullobrigatórioemailstringpode ser nullobrigatóriodocumentstringpode ser nullobrigatóriodocument_typestringpode ser nullobrigatórioValores:
cpfcnpjpassportphonestringpode ser nullobrigatório
subscriptionstringpode ser nullThe subscription this purchase opened (`sub_…`), or `null`. Answered on creation and on `GET /v1/charges/{id}` only.
metadataobjectpode ser nullThe `metadata` sent on creation, or `null`. Answered on creation and to the secret key; left out of a public key's reads.
Erros
| 400 | The request path could not be decoded (`malformed_path`). |
| 401 | Missing or invalid key. |
| 404 | Not found, not yours, or not a well-formed id. |
| 429 | Rate limited. |
| 500 | Unexpected error, or `api_unavailable`. |
Todo erro vem no mesmo envelope: error.type, error.code, error.message e error.request_id, também devolvido no cabeçalho X-Request-Id.