Overview
This endpoint retrieves the current status of a payment or invoice, including confirmation count, current balance, and payment state. This is a public endpoint that does not require authentication.
Use this endpoint to check if a payment has been received and confirmed.
Path Parameters
The unique payment or invoice ID Example: "cmh123abc456def"
Response
The payment identifier Example: "cmh123abc456def"
Current payment status Options: PENDING, COMPLETED, EXPIRED,
FAILED Example: "PENDING"
Amount received so far in cryptocurrency Example: "29.99"
Number of blockchain confirmations received Example: 3
Total amount required for this payment Example: "29.99"
The cryptocurrency for this payment Example: "USDT_BEP20"
Payment address (if currency has been selected) Example:
"0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb"
Payment expiration timestamp (ISO 8601) Example:
"2024-01-01T12:30:00.000Z"
Payment creation timestamp (ISO 8601) Example:
"2024-01-01T12:00:00.000Z"
Payment completion timestamp (ISO 8601, only present if completed)
Example: "2024-01-01T12:15:00.000Z"
Payment Status Values
Status Description
PENDINGWaiting for payment to be received or confirmed COMPLETEDPayment received and confirmed on blockchain EXPIREDPayment window expired without receiving full amount FAILEDPayment failed due to an error
Example Request
cURL
JavaScript/TypeScript
Python
curl -X GET https://api.inventpay.io/v1/invoice/cmh123abc456def/status
Example Response
{
"paymentId" : "cmh123abc456def" ,
"status" : "PENDING" ,
"currentBalance" : "0" ,
"confirmations" : 0 ,
"requiredAmount" : "29.99" ,
"currency" : "USDT_BEP20" ,
"address" : "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb" ,
"expiresAt" : "2024-01-01T12:30:00.000Z" ,
"createdAt" : "2024-01-01T12:00:00.000Z"
}
{
"paymentId" : "cmh123abc456def" ,
"status" : "COMPLETED" ,
"currentBalance" : "29.99" ,
"confirmations" : 12 ,
"requiredAmount" : "29.99" ,
"currency" : "USDT_BEP20" ,
"address" : "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb" ,
"expiresAt" : "2024-01-01T12:30:00.000Z" ,
"createdAt" : "2024-01-01T12:00:00.000Z" ,
"completedAt" : "2024-01-01T12:15:00.000Z"
}
{
"paymentId" : "cmh123abc456def" ,
"status" : "EXPIRED" ,
"currentBalance" : "0" ,
"confirmations" : 0 ,
"requiredAmount" : "29.99" ,
"currency" : "USDT_BEP20" ,
"address" : "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb" ,
"expiresAt" : "2024-01-01T12:30:00.000Z" ,
"createdAt" : "2024-01-01T12:00:00.000Z"
}
{
"success" : false ,
"error" : "Payment not found" ,
"statusCode" : 404
}
Confirmation Requirements
Different cryptocurrencies require different numbers of confirmations:
Cryptocurrency Required Confirmations
BTC 3 confirmations ETH 12 confirmations LTC 6 confirmations USDT (ERC20) 12 confirmations USDT (BEP20) 15 confirmations
Payments are marked as COMPLETED once they receive the required number of
confirmations for their respective blockchain.
Polling Best Practices
If you’re not using webhooks, you can poll this endpoint to check payment status:
Recommended interval: 30-60 seconds
Stop polling when: Status becomes COMPLETED, EXPIRED, or FAILED
Better alternative: Use webhooks for real-time notifications
Polling too frequently may result in rate limiting. We strongly recommend
using webhooks instead of polling.
Error Codes
Status Code Description
200 Status retrieved successfully 404 Payment not found 429 Rate limit exceeded 500 Internal server error