Skip to content

Get Invoice Payment

This method retrieves the invoice payment.

shell
GET: {{endpoint}}/v1/payment/info

Headers

KeyTypeValueDescription
x-api-keystringkey_xxxxxxxxxxxxxxxxxxxxAPI Key string
x-signaturestringSHA256The HMAC SHA256 signature.
x-timestampstring1730998051892Timestamp of the request

Request Body

KeyTypeDescription
idstring(required) the id of the payment
Example Request
JSON
// Params: query
{
  "id": "ccec5d2e-abb3-4633-b2ca-41b4a41bd66e"
}

Response Parameters

The final response in the stream also includes additional data about the generation:

  • payment
    • id: the id of the payment
    • seq_num: the sequence number of the payment
    • order_id: the order id
    • chain: the chain-id
    • network: the network
    • from_fiat_currency: the from fiat currency
    • to_crypto_currency: the to crypto currency
    • amount: the amount
    • payment_amount: the payment amount
    • payer_paid_currency: the payer paid currency
    • payer_paid_amount: the payer paid amount
    • merchant_amount: the merchant amount
    • txid: the txid
    • address: the address
    • from_address: the from address
    • auto_convert: the auto convert
    • convert_to: the convert to
    • payment_url: the payment url
    • url_return: the return url
    • url_success: the success url
    • url_failed: the failed url
    • is_multiple_order: the is multiple order
    • lifetime: the lifetime
    • expired_at: the expired at
    • fee_subtract: the fee subtract
    • fee_percent: the fee percent
    • discount_percent: the discount percent
    • discount_amount: the discount amount
    • accuracy_percent: the accuracy percent
    • additional_data: the additional data
    • support_currencies: the support currencies
    • except_currencies: the except currencies
    • exchange_rate: the exchange rate
    • exchange_rate_source: the exchange rate source
    • payment_status: the payment status
    • payment_match_type: the payment match type
    • is_completed: the is completed
    • status: the status
    • created_at: the created at
    • owned_by_group: the owned by group
    • agent_id: the agent id
  • transaction: the transaction
    • id: the id of the transaction
    • seq_num: the sequence number of the transaction
    • tx_type: the type of the transaction
    • from_wallet_id: the id of the wallet that sent the transaction
    • to_wallet_id: the id of the wallet that received the transaction
    • unique_hash: a unique hash for the transaction
    • asset: the asset of the transaction
    • symbol: the symbol of the transaction
    • coin_type: the coin type of the transaction
    • chain: the chain of the transaction
    • testnet: whether the transaction is on the testnet
    • tx_id: the transaction id
    • from_address: the address that sent the transaction
    • to_address: the address that received the transaction
    • amount: the amount of the transaction
    • fee: the fee of the transaction
    • realized_amount: the realized amount of the transaction
    • fx_rate: the fx rate of the transaction
    • tx_value: the transaction value
    • block_number: the block number of the transaction
    • latest_block_number: the latest block number of the transaction
    • block_confirmation: the block confirmation of the transaction
    • finalized_confirmed: the finalized confirmed of the transaction
    • is_completed_confirmed: whether the transaction is completed confirmed
    • is_spent: whether the transaction is spent
    • status: the status of the transaction
    • created_at: the created at date of the transaction
    • webhook_id: the webhook id of the transaction
    • sweep_id: the sweep id of the transaction
    • owned_by_group: the owned by group
    • agent_id: the agent id
    • pending_transaction_id: the pending transaction id of the transaction
    • payment_id: the payment id of the transaction
Example Response
json
{
  "data": {
    "payment": {
      "id": "25e2c615-c90c-4868-b24d-0c1e3b81f92e",
      "seq_num": 43,
      "order_id": "391",
      "chain": "tron",
      "network": "testnet",
      "from_fiat_currency": "USD",
      "to_crypto_currency": "USDT",
      "amount": "2",
      "payment_amount": 2.006488233020612,
      "payer_paid_currency": null,
      "payer_paid_amount": null,
      "merchant_amount": 0,
      "txid": null,
      "address": "TZAiamSzmrrTz5RnP8D8B96XAR2GsUvtw1",
      "from_address": null,
      "auto_convert": false,
      "convert_to": "USDT",
      "payment_url": "https://xpays.life/pay/25e2c615-c90c-4868-b24d-0c1e3b81f92e",
      "url_return": "https://example.com/deposit",
      "url_success": "",
      "url_failed": "",
      "is_multiple_order": true,
      "lifetime": 900,
      "expired_at": "2024-11-25T06:53:21.256Z",
      "fee_subtract": 0,
      "fee_percent": 0.4,
      "discount_percent": 0,
      "discount_amount": 0,
      "accuracy_percent": 0.5,
      "additional_data": {},
      "support_currencies": null,
      "except_currencies": null,
      "exchange_rate": 0.9967663737499999,
      "exchange_rate_source": "COINGECKO",
      "payment_status": "PAYMENT_CANCELED",
      "payment_match_type": "EXACTLY",
      "is_completed": true,
      "status": "CANCELED",
      "created_at": "2024-11-25T06:38:21.260Z",
      "owned_by_group": "8e393308-28a9-4a6e-a689-0d7760483c7e",
      "agent_id": "aacc3472-f3c3-49bb-9040-d5a6aff283bf"
    },
    "transaction": null
  }
}
json
{
  "error": "Error message"
}
json
{
  "error": "Forbidden"
}