Przejdź do głównej zawartości

List Payments

GET
/payments/

Returns a paginated list of all payments for your merchant account with filtering options.

Authentication

Requires OAuth 2.0 authentication with read and write scopes.

Query Parameters

ParameterTypeRequiredDescription
limitintegerNoResults per page (1-100, default: 20)
offsetintegerNoNumber of results to skip for pagination
statusstringNoFilter by status: waiting, confirming, confirmed, sending, completed, expired, failed
currencystringNoFilter by combined currency code (e.g., "USDTTRC20")
blockchainstringNoFilter by blockchain network (e.g., "TRON", "ETH")
tokenstringNoFilter by token symbol (e.g., "USDT", "USDC")

Example Request

curl -X GET "{{BASE_URL}}/payments/?limit=20&offset=0&status=completed&currency=USDTTRC20" \
-H "Authorization: Bearer your_access_token"

Response

Success Response (200 OK)

{
"count": 156,
"total": 156,
"offset": 0,
"limit": 20,
"results": [
{
"transaction_id": "550e8400-e29b-41d4-a716-446655440000",
"blockchain": "TRX",
"currency": "USDTTRC20",
"status": "completed",
"amount_usd": "100.00",
"amount_crypto": "100.050000",
"address": "TYN2WuEqttM5JjGk4ynGkxcnMRR9SZcvVx",
"token": "USDT",
"order_id": "ORDER-12345",
"created_at": "2026-01-15T10:00:00Z",
"updated_at": "2026-01-15T10:20:00Z"
},
{
"transaction_id": "660e8400-e29b-41d4-a716-446655440001",
"blockchain": "ETH",
"currency": "USDCERC20",
"status": "waiting",
"amount_usd": "50.00",
"amount_crypto": "50.025000",
"address": "0x95aD61b0a150d79219dCF64E1E6Cc01f0B64C4cE",
"token": "USDC",
"order_id": "ORDER-12346",
"created_at": "2026-01-15T11:00:00Z",
"updated_at": "2026-01-15T11:00:00Z"
}
]
}

Response Fields

FieldTypeDescription
countintegerTotal number of payments matching the query
totalintegerTotal number of payments
offsetintegerCurrent offset
limitintegerCurrent page size limit
resultsarrayArray of payment objects

Payment Object Fields (TransactionListSerializer)

FieldTypeDescription
transaction_iduuidUnique payment identifier
blockchainstringBlockchain network (e.g., "TRX", "ETH")
currencystringCombined currency code (e.g., "USDTTRC20")
statusstringCurrent payment status
amount_usddecimalAmount in price currency (USD)
amount_cryptostringCryptocurrency amount
addressstringBlockchain address for the payment
tokenstringToken symbol (e.g., "USDT")
order_idstringYour order identifier
created_atdatetimeISO 8601 creation timestamp
updated_atdatetimeISO 8601 last update timestamp

Pagination

The API uses offset-based pagination:

  • Use limit to control results per page (max 100, default 20)
  • Use offset to skip results
  • Total count is provided in the count field
  • To get the next page, increment offset by the limit value

Pagination Example

# First page
curl -X GET "{{BASE_URL}}/payments/?limit=20&offset=0" \
-H "Authorization: Bearer your_access_token"

# Second page
curl -X GET "{{BASE_URL}}/payments/?limit=20&offset=20" \
-H "Authorization: Bearer your_access_token"

Filtering Examples

Get completed USDT payments on TRON

curl -X GET "{{BASE_URL}}/payments/?status=completed&blockchain=TRON&token=USDT" \
-H "Authorization: Bearer your_access_token"

Get all waiting payments

curl -X GET "{{BASE_URL}}/payments/?status=waiting" \
-H "Authorization: Bearer your_access_token"

Error Responses

400 Bad Request

{
"error": {
"code": "invalid_request",
"message": "Invalid filter parameters",
"details": {
"limit": ["Ensure this value is less than or equal to 100."]
}
}
}

Notes

  • The list endpoint returns a summarized view of each payment (TransactionListSerializer)
  • For full payment details including transaction_hash, callback_url, etc., use POST /payments/status/
  • Use filters to reduce result set size for better performance
  • Consider using webhooks for real-time updates instead of polling this endpoint

Next Steps