PayAgency Logo

Status API

The Status API allows you to fetch the status of a specific transaction using either the `transaction_id` or `order_id`. This endpoint provides real-time information about the transaction, including its status, amount, currency, and customer details.


API Endpoint

GET https://backend.pay.agency/api/live/status/{id}

Example:

  • https://backend.pay.agency/api/live/status/PA01862809 (using transaction_id)
  • https://backend.pay.agency/api/live/status/order67890 (using order_id)

Request Parameters

ParameterTypeRequiredDescription
transaction_idStringYesThe unique ID of the transaction to retrieve its status.
order_idStringNoThe order ID, if provided during the transaction.

Headers

Header NameDescription
Content-TypeSpecifies the content type. Always set to application/json.
AuthorizationBearer token for authentication.

Success Response

Important

The response format differs based on the payment method:

  • Card & APM Transactions: Standard response with refund and chargeback information.
  • Crypto Payin Transactions: Enhanced response with additional cryptocurrency-specific fields like crypto_currency, crypto_network, crypto_payment_status, and payment amounts.

Card & APM Transactions

If the request is successful and a valid transaction_id or order_id is provided for a card or APM transaction, the API will return the following response:

{
  "status": "SUCCESS",
  "message": "Transaction processed successfully!.",
  "data": {
    "amount": "100",
    "currency": "INR",
    "order_id": null,
    "transaction_id": "PA7663692011084535",
    "customer": {
      "first_name": "Tushar",
      "last_name": "vashishth",
      "email": "test@gmail.com"
    },
    "refund": {
      "status": false,
      "refund_date": null
    },
    "chargeback": {
        "status": false,
        "chargeback_date": null
    }
  }
}

Crypto Payin Transactions

For Crypto Payin transactions, the API returns additional fields specific to cryptocurrency payments:

Note

This response format is specifically for Crypto Payin transactions only. Other crypto payment types may have different response structures.

{
  "status": "SUCCESS",
  "message": "Transaction processed successfully!.",
  "data": {
    "amount": 10,
    "currency": "USD",
    "order_id": null,
    "transaction_id": "PA7945391549251682",
    "customer": {
      "first_name": "James",
      "last_name": "doe",
      "email": "james@gmail.com"
    },
    "refund": {
      "status": false,
      "refund_date": null
    },
    "crypto_currency": "TRX",
    "crypto_network": "TRON",
    "crypto_payment_status": "UNDERPAID",
    "crypto_amount": 10,
    "crypto_paid_amount": 6.4
  }
}

Additional Crypto Fields:

FieldTypeDescription
crypto_currencyStringThe cryptocurrency used for the payment (e.g., TRX, BTC, ETH, USDT).
crypto_networkStringThe blockchain network used for the transaction (e.g., TRON, Ethereum).
crypto_payment_statusStringThe status of the crypto payment. Possible values: FULLPAID, UNDERPAID, OVERPAID.
crypto_amountNumberThe expected cryptocurrency amount for the transaction.
crypto_paid_amountNumberThe actual cryptocurrency amount paid by the customer.

Crypto Payment Status

  • FULLPAID: The exact crypto amount was received. Transaction is successful.
  • UNDERPAID: Less than the required amount was received. Transaction may fail.
  • OVERPAID: More than the required amount was received. Excess amount handling depends on your configuration.

Failed Response

{
  "message": "Authentication token is missing."
}
{
  "message": "Invalid Secret Key."
}

On this page