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 merchantOrderNo 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.

Request Fields ​

FieldLocationTypeLengthRequiredDescription
X-Merchant-IdHeaderstring64YesMerchant ID, read from the request header.
X-TimestampHeaderint19YesUnix request timestamp in seconds, used for request freshness validation.
X-NonceHeaderstring64YesRandom string for request anti-replay protection.
DigestHeaderstring52YesDigest of the request body; when a GET request has no body, it is computed over empty bytes. Format: SHA-256=<Base64Digest>.
AuthorizationHeaderstring-YesES256 request signature, where keyId is the merchant key version.
merchantOrderNoQuerystring64ConditionalMerchant order number; provide at least one of this or e2eId.
e2eIdQuerystring64ConditionalPix end-to-end transaction ID; provide at least one of this or merchantOrderNo.

Query Rules ​

  • If neither field is provided or both are blank, the request is rejected; each provided field must not exceed 64 bytes.
  • If only merchantOrderNo 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, merchantOrderNo 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.
  • merchantOrderNo must match the merchant order number used when the order was created. 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 merchantOrderNo.

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?merchantOrderNo=CASHIN202608160001 HTTP/1.1

Response Fields ​

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.

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

Current query result limitations

In the current version, some scenarios where the order is not found, the payment record is missing, or the query fails may still return a success response code while the order fields are empty or the information is incomplete. Check data.merchantOrderNo, 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 existing local payment results must not be overwritten with empty values or default amounts.

FieldTypeLengthReturnedDescription
statusint4YesResponse code
msgstring128YesCorresponds to status
dataobjectN/ANocashin order query result; may be absent when the request fails at the signature verification or protocol parsing stage.
data.attachstring128YesThe attach value passed by the merchant when the original cashin order was created; returned as-is if provided at order creation, empty otherwise.
data.merchantOrderNostring64ConditionalMerchant order number, corresponding to the merchantOrderNo used at order creation.
data.platOrderNostring64ConditionalPlatform order number.
data.e2eIdstring64ConditionalPix end-to-end transaction ID, corresponding to the bank-side payment reference number.
data.orderStatusstring16YesCurrent status of the cashin order.
data.amountdecimal(25,2)25,2YesOrder amount / amount due.
data.payAmountdecimal(25,2)25,2YesActual paid amount.
data.feedecimal(25,2)25,2YesFee; defaults to BRL in Brazil.
data.payerNamestring128NoPayer name; usually returned on success.
data.payerTaxNostring64NoPayer tax ID; CPF is 11 digits, CNPJ is 14 digits; usually returned on success.
data.payTimeint19ConditionalPayment time, Unix timestamp in seconds.
data.expireTimeint19ConditionalOrder expiration time, Unix timestamp in seconds.
data.dataStatusint-YesResponse code
data.dataMsgstring128YesCorresponds to dataStatus

orderStatus Enum ​

Enum ValueDescriptionFinal State
PENDINGAwaiting payment or being processed; keep querying or wait for the asynchronous notification.No
SUCCESScashin succeeded.Yes
FAILEDcashin failed.Yes

Response Examples ​

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