SelectwinSelectwin

Search transactions by buyer

POST/v1/transactions/search

Authenticate with the header SelectKey: a sk_test_ key works in the sandbox, a sk_live_ key in production.

Request body

  • sortstring

    Order of the list by creation: createdAt (or ascending) for the oldest first; any other value keeps the default, newest first (-createdAt).

  • limitinteger

    Page size (items per page).

  • methodstring

    Only charges with this payment method.

    Values:creditpixbilletnupay
  • offsetinteger

    Offset of the first item (0-based).

  • sourcestring

    Only the charges from this source.

  • statusstring

    Only charges with this status.

    Values:pendingpre-authorizedapprovedfailedrefusedcanceledrefundedchargebackdisputefraud-reviewanalyzingawaiting
  • customerobjectrequired

    Who bought: the charges of a buyer that matches ANY of these (e-mail OR document OR phone). At least one.

    +3 fields in customer
    • emailstring (email)

      The buyer's e-mail (compared without case).

    • phonestring

      The buyer's phone, digits only, with the country code (e.g. 5511988887777).

    • documentstring

      The buyer's document: CPF or CNPJ, digits only.

  • daterangegtestring (date-time)

    Created at or after this instant (inclusive).

  • daterangeltestring (date-time)

    Created at or before this instant (inclusive).

Responses

200OK
  • dataobject[]required

    The items of this page.

    +23 fields in data
    • idstringrequired

      Public identifier (tra_/trx_…)

    • netintegerrequired

      What you receive: amount − fees, in cents.

    • feesintegerrequired

      Total fees, in cents.

    • titlestringrequirednullable

      What was bought: the description of the charge or, without one, the name of its first item; null when it has neither.

    • amountstringrequired

      Amount charged, in cents (as a string).

    • imagesstring[]required

      Image URLs of the items.

    • methodstringrequired

      Payment method.

    • sourcestringrequirednullable

      Where the sale came from: direct (the checkout page of your site), link (a payment link), api, checkout, subscription, upsell, platform-billing, or the text your integration sent; null when it was not recorded (old sales).

    • statusstringrequired

      Status of the charge.

    • currencystringrequired

      Currency (ISO 4217).

    • customIdstringrequirednullable

      Your custom id of the charge; null on old charges.

    • customerone ofrequired

      The buyer, in short (the full block, with the document and the phone, is on the read); null when the charge has none.

      Shape 1
      • idstringrequired

        The buyer.

      • namestringrequirednullable

        The buyer's name; null when unknown.

      • emailstringrequirednullable

        The buyer's e-mail; null when unknown.

      null
    • deliveryone ofrequired

      The delivery of the sale, in short (the full block is on the read); null when the sale has no physical item.

      Shape 1
      • statestringrequired

        shipped (tracking recorded), pending (approved less than 5 days ago, no tracking) or late (approved 5+ days ago, no tracking).

        Values:pendingshippedlate
      • trackingCodestringrequirednullable

        The tracking code recorded in shipping.trackingCode; null when none.

      null
    • cardBrandstringrequirednullable

      Card brand; null for the other methods.

    • createdAtstringrequired

      When the resource was created (ISO 8601, UTC).

    • updatedAtstringrequired

      When the resource was last updated (ISO 8601, UTC).

    • approvedAtstringrequirednullable

      When the charge was approved; null otherwise.

    • customerIdone ofrequired

      The buyer.

      string
      null
    • installmentsone ofrequired

      Number of installments.

      integer
      null
    • paymentLinkIdstringrequirednullable

      The payment link the sale came from; null when it did not come from one.

    • originalAmountstringrequired

      Amount before discounts, in cents (as a string).

    • refundedAmountintegerrequired

      How much of this charge was already refunded, in cents (the settled refunds).

    • checkoutSessionIdstringrequirednullable

      The checkout session the sale came from; null when it did not come from one.

  • pageobjectrequired

    Paging cursors of the list.

    +3 fields in page
    • totalintegerrequired

      Total number of pages.

    • offsetobjectrequired

      The offset to request the first, previous, next and last pages.

      +4 fields in offset
      • lastintegerrequired

        Offset of the last page.

      • nextintegerrequired

        Offset of the next page (stays on this page when it is the last one).

      • previntegerrequired

        Offset of the previous page (0 on the first page).

      • firstintegerrequired

        Offset of the first page.

    • currentintegerrequired

      Current page number (1-based).

  • limitintegerrequired

    Page size, as requested.

  • totalintegerrequired

    Total number of items that match the filters.

  • _linksobject

    Links to related operations, keyed by action (self, create, update, delete, list…).

  • offsetintegerrequired

    Offset of the first item of this page, as requested.

  • hasMorebooleanrequired

    true when there are more items after this page.

  • merchantobject

    The account that owns the resource (the merchant of record).

    +3 fields in merchant
    • namestringrequirednullable

      Trading name of the account that owns the resource.

    • merchantIdstringrequirednullable

      Public id of the account that owns the resource (bus_…).

    • isSubAccountbooleanrequired

      true when the resource belongs to a sub-account operated by a marketplace platform.

  • searchedBystring[]required

    The buyer identifiers this search used: email, document and/or phone.

    Values:emaildocumentphone
400Bad request (validation failed)
  • errorobjectrequired
    +8 fields in error
    • codestringrequired
    • paramsobject[]
    • statusstringrequired
    • detailsstring
    • messagestringrequired
    • categorystringrequired
      Values:validationauthenticationauthorizationpaymentclientserverrate_limitpending
    • resourcestringrequired
    • statusCodeintegerrequired
401Unauthorized (missing or invalid credential)
  • errorobjectrequired
    +8 fields in error
    • codestringrequired
    • paramsobject[]
    • statusstringrequired
    • detailsstring
    • messagestringrequired
    • categorystringrequired
      Values:validationauthenticationauthorizationpaymentclientserverrate_limitpending
    • resourcestringrequired
    • statusCodeintegerrequired
403Forbidden (no permission)
  • errorobjectrequired
    +8 fields in error
    • codestringrequired
    • paramsobject[]
    • statusstringrequired
    • detailsstring
    • messagestringrequired
    • categorystringrequired
      Values:validationauthenticationauthorizationpaymentclientserverrate_limitpending
    • resourcestringrequired
    • statusCodeintegerrequired
404Not found
  • errorobjectrequired
    +8 fields in error
    • codestringrequired
    • paramsobject[]
    • statusstringrequired
    • detailsstring
    • messagestringrequired
    • categorystringrequired
      Values:validationauthenticationauthorizationpaymentclientserverrate_limitpending
    • resourcestringrequired
    • statusCodeintegerrequired
500Internal server error
  • errorobjectrequired
    +8 fields in error
    • codestringrequired
    • paramsobject[]
    • statusstringrequired
    • detailsstring
    • messagestringrequired
    • categorystringrequired
      Values:validationauthenticationauthorizationpaymentclientserverrate_limitpending
    • resourcestringrequired
    • statusCodeintegerrequired

Preferências de cookies

Hoje o site usa só cookies essenciais: nenhuma ferramenta de medição ou de anúncios está ligada, e nada é compartilhado com terceiros. Se isso mudar, você decide aqui antes de qualquer coisa ser carregada.

  • Mantêm o site funcionando: segurança, a sua escolha sobre cookies e preferências como o idioma e a versão da documentação. Não dependem de consentimento.

    Sempre ativos