kamiPay LogokamiPay Docs

Charge

This endpoints should be used for manual inspection of different transactions.

Charge Status

kamiPay will automatically send webhooks for status update notifications but we recommend all integration to have this endpoint configured in case webhook was not properly received.

The main information about status progress will be found within the "data" key in the response.

So main status will be "ok" meaning, we acknowledge that we have that transaction and then within the data key you will have specific details of that transaction.

If at the top, the status says "failed" it means we don't have this transaction in our records yet. It may eventually be processed or received shortly after.

Path Parameters

NameTypeDescription
targetstringRequired. tx_id or operation_id
typestringRequired. When you are receiving a payment is 'charge'
idstringRequired. Transaction hash or operation id
chainstringRequired. 'polygon' | 'tron'

Example Request

const target = "tx_id"
const type = "charge"
const id = "0x36**************b2d3"
const chain = "polygon"
 
const url = `${baseURL}/v2/status/tx_status?target=${target}&type=${type}&id=${id}&chain=${chain}`
 
const response = await fetch(url, {
    method: "GET",
    headers: {
      Authorization: `Bearer ${access_token}`,
      "Content-Type": "application/json",
    },
});

Response

There will be cases where a transaction is returned to the payor. When this happens, it'll occur within a few seconds and you will receive a response with "status": "ok" at the top level, but inside the data object there will be "status": "failed" as shown in the (Returned) example below. This means the money was successfully returned to the payor.

{
  "status": "ok",
  "msg": "Request ok",
  "data": {
    "status": "done",
    "txid": "<<TxId>>",
    "operation_id": "1692110031865",
    "bank_txid": "E607Q5A3F-1572",
    "bank_account_nr": "690-5813-004",
    "internal_pix_id": "kk6g23**********aby004",
    "amount_brl": "188.16",
    "amount_usdt": "37.632000",
    "address_in": "kk6g232xxxxx13k550931",
    "address_out": "0x29edfcexxxxxfh13e3",
    "name": "PAULO SERGIO"
  }
}

On this page