Skip to content

Query Payment by Order SN ​

Query payment status by merchant order number.

Endpoint ​

GET /cashin/check

Authentication ​

Merchant Credential. See Authentication.

Background ​

Merchants can query the current status, amount, payer information, and Pix transaction details of their own cashin orders by merchant order number mchOrderNo or Pix end-to-end transaction ID e2eId (bank transaction reference number).

This API supports queries by merchant order number or E2E ID; see the rules and examples below. A successful query response does not mean the cashin succeeded; the actual transaction result is determined by orderStatus. When the order number or status is empty, the response cannot be used to confirm that the order exists or that the payment succeeded.

WARNING

If the request times out or orderStatus is unavailable, do not infer any order status. Always verify payAmount (the actual paid amount) before crediting.

Request Fields ​

For authentication headers, see Authentication; they are not listed in the table below.

FieldLocationTypeLengthRequiredDescription
mchOrderNoQuerystring32ConditionalMerchant order number, identical to the mchOrderNo submitted when the order was created; provide at least one of this or e2eId.
e2eIdQuerystring64ConditionalPix end-to-end transaction ID (bank transaction reference number); provide at least one of this or mchOrderNo.

Query Rules ​

  • If neither field is provided or both are blank, the request is rejected.
  • If only mchOrderNo is passed, the query is performed by the merchant order number under the current merchant.
  • If only e2eId is passed, the payment record is located by the bank transaction reference number, and then the order associated with it under the current merchant is queried.
  • If both are passed, mchOrderNo takes precedence: e2eId is not checked for a match, and e2eId is not used as a fallback if the merchant order number query fails. Pass only one query condition at a time.
  • platOrderNo is returned only in the response and is not supported as a query condition for this API.
  • If the bank transaction reference number is not yet available, query with mchOrderNo.

Request Examples ​

http
GET /cashin/check?e2eId=E1234567820260816000000000000001 HTTP/1.1
Content-Type: application/json
X-Merchant-Id: 92315566000120
X-Timestamp: 1786867200
X-Nonce: 550e8400-e29b-41d4-a716-446655440000
Digest: SHA-256=<Base64Digest>
Authorization: Signature keyId="v1",alg="ES256",headers="(request-target) x-timestamp x-nonce digest",signature="<ES256_SIGNATURE_BASE64>"

When querying by merchant order number, use the same authentication headers and recompute the signature:

http
GET /cashin/check?mchOrderNo=CASHIN202608160001 HTTP/1.1

Response Fields ​

The API uses a unified status, msg, data response structure. A successful query response does not mean the cashin succeeded; the actual transaction result is determined by orderStatus.

Business status: dataStatus is an integer; dataStatus = 200 indicates the business succeeded, in which case dataMsg = "SUCCESS". Any value other than 200 indicates a business error; see dataMsg for the reason.

Current query result limitation

In the current version, in some scenarios such as an order not being found, a missing payment record, or a query error, a success response code may still be returned with empty or incomplete order fields. Check data.mchOrderNo, data.platOrderNo, and data.orderStatus together; when the order number or status is empty, the response cannot be used to confirm that the order exists or that the payment succeeded, and empty values or default amounts must not overwrite a payment result already stored locally.

FieldTypeLengthReturnedDescription
statusint4YesResponse code.
msgstring128YesMessage corresponding to status; sucesso on success.
dataobjectN/ANocashin order query result; may be absent when the request fails at the signature verification or protocol parsing stage.
data.orderStatusstring16YesCurrent status of the cashin order; see the enum below.
data.amountdecimal(25,2)25,2YesOrder amount / amount due, i.e. the amount at order creation.
data.payAmountdecimal(25,2)25,2YesActual paid amount, i.e. what the payer actually paid; compare it with the order amount before crediting.
data.feedecimal(25,2)25,2YesFee, in BRL.
data.mchOrderNostring32ConditionalMerchant order number, corresponding to the mchOrderNo used at order creation.
data.platOrderNostring64ConditionalPlatform order number.
data.e2eIdstring64ConditionalPix end-to-end transaction ID, corresponding to the bank-side payment reference number; returned once the payment is made.
data.payerNamestring128NoPayer name; usually returned on success.
data.payerDocumentstring14NoPayer tax ID: CPF is 11 digits, CNPJ is 14 digits; usually returned on success.
data.applyTimeint19YesOrder application time (when Adopay accepted the order), Unix timestamp in seconds.
data.payTimeint19ConditionalPayment completion time, Unix timestamp in seconds; no valid value before payment.
data.expireTimeint19ConditionalOrder expiration time, Unix timestamp in seconds.
data.attachstring128NoThe attach value passed by the merchant when the order was created; returned as-is if provided at order creation, empty otherwise.
data.dataStatusint-NoResponse code
data.dataMsgstring128NoCorresponds to dataStatus

orderStatus Enum ​

Enum ValueDescriptionFinal State
PENDINGAwaiting payment or being processed; keep querying or wait for the asynchronous notification.No
SUCCESScashin succeeded; if a refund occurs later, the order status changes to REFUND.Yes
FAILEDcashin failed.Yes
REFUNDRefunded: a refund has occurred on this cashin payment. It can only be reached from SUCCESS, and it does not mean the order has been fully refunded; see the notes below.Yes

REFUND status notes

  1. State transition: REFUND can only be reached from SUCCESS. After a refund occurs, the order moves from SUCCESS to REFUND; orders in PENDING or FAILED never enter REFUND.
  2. Not necessarily a full refund: REFUND only means that a refund has occurred on the order. A cashin order can be partially refunded several times, and the order status is REFUND after a partial refund as well. To check whether the order has been fully refunded, compare the cumulative refunded principal refundTotalAmount (see Cashin Refund Webhook and Query Refund) with the order's payAmount.
  3. Refund results come from the refund order: the result of each refund is given by the refund status status (PENDING / SUCCESS / FAILED); do not use the order's orderStatus to judge it.

Response Examples ​

json
{
  "status": 200,
  "msg": "sucesso",
  "data": {
    "attach": "order-source=checkout",
    "mchOrderNo": "CASHIN202608160001",
    "platOrderNo": "BAS202608160000000001",
    "e2eId": "E1234567820260816000000000000001",
    "orderStatus": "SUCCESS",
    "amount": 100.00,
    "payAmount": 100.00,
    "fee": 0.60,
    "payerName": "Maria Oliveira",
    "payerDocument": "12345678901",
    "applyTime": 1786886800,
    "payTime": 1786887025,
    "expireTime": 1786901100,
    "dataStatus": 200,
    "dataMsg": "SUCCESS"
  }
}