PaystationdocsPaystation

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ório
  • objectstringobrigatório

    Valores: charge

  • statusstringobrigatório

    Valores: processingpendingpaidrefund_pendingrefundedchargedbackdeclined

  • amountintegerpode ser nullobrigatório

    Integer cents.

  • payment_methodstringobrigatório

    Valores: cardpixboleto

  • acquirerstringpode ser nullobrigatório
  • paymentobjectobrigatório

    Pix: `qr_code`, `expiration_at`. Boleto: `boleto_url`, `boleto_barcode`, `expiration_date`. Card: empty.

    Mostrar campos de payment
    • qr_codestring
    • expiration_atstring
    • boleto_urlstring
    • boleto_barcodestring
    • expiration_datestring
  • created_atstringpode ser nullobrigatório
  • customerobjectpode ser nullobrigatório

    Masked unless the key is secret; always masked on creation.

    Mostrar campos de customer
    • namestringpode ser nullobrigatório
    • emailstringpode ser nullobrigatório
    • documentstringpode ser nullobrigatório
    • document_typestringpode ser nullobrigatório

      Valores: cpfcnpjpassport

    • phonestringpode ser nullobrigatório
  • subscriptionstringpode ser null

    The subscription this purchase opened (`sub_…`), or `null`. Answered on creation and on `GET /v1/charges/{id}` only.

  • metadataobjectpode ser null

    The `metadata` sent on creation, or `null`. Answered on creation and to the secret key; left out of a public key's reads.

Erros

400The request path could not be decoded (`malformed_path`).
401Missing or invalid key.
404Not found, not yours, or not a well-formed id.
429Rate limited.
500Unexpected 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.