PaystationdocsPaystation

List your charges, newest first ​

GET /v1/charges

List your charges, newest first

GET/v1/charges

Autenticação

  • Chave secretask_…, só no seu servidor

Envie a chave no cabeçalho Authorization: Bearer <chave>.

Parâmetros

  • limitstring · query

    1 to 100; defaults to 20.

  • starting_afterstring · query (uuid)

    The last `id` of the previous page.

  • statusstring · query
  • created_gtestring · query (date-time)
  • created_ltestring · query (date-time)
  • offerstring · query (uuid)
  • metadataobject · query

Resposta

200OK

  • dataarray of objectobrigatório
    Mostrar campos de data
    • 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.

  • has_morebooleanobrigatório

Erros

401Missing or invalid key, or a public key (`secret_key_required`).
422A query parameter is invalid (`invalid_param`, `unknown_parameter`).
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.