Przejdź do głównej zawartości

Get Payment Details

Retrieve detailed information about a specific payment.

Endpoint

GET /payments/{transaction_id}/

Description

This endpoint returns comprehensive details about a payment transaction, including its current status, payment history, and all associated metadata.

Authentication

Requires Bearer token with read scope.

Path Parameters

ParameterTypeRequiredDescription
transaction_idstring (UUID)YesThe payment's unique identifier

Response

Success Response

Code: 200 OK

Content:

{
"transaction_id": "550e8400-e29b-41d4-a456-426614174000",
"status": "completed",
"amount_usd": "100.00",
"amount_crypto": "100.00000000",
"blockchain": "TRX",
"token": "USDT",
"currency": "USDTTRC20",
"address": "TXYZabc123...",
"transaction_hash": "0xabc123...",
"order_id": "order_12345",
"order_description": "Premium subscription",
"callback_url": "https://your-site.com/webhook",
"expiry_time": "2024-12-27T10:30:00Z",
"created_at": "2024-12-27T10:00:00Z",
"updated_at": "2024-12-27T10:10:00Z",
"is_fixed_rate": true,
"is_fee_paid_by_user": false,
"confirmations": 20,
"payment_type": "full",
"payment_history": [
{
"deposit_id": "dep_123",
"amount": "100.00000000",
"transaction_hash": "0xabc123...",
"confirmations": 20,
"timestamp": "2024-12-27T10:05:00Z"
}
]
}

Response Fields

FieldTypeDescription
transaction_idstringUnique payment identifier
statusstringCurrent payment status
amount_usdstringOriginal amount in USD
amount_cryptostringExpected amount in cryptocurrency
blockchainstringBlockchain network (e.g., "TRX", "ETH")
tokenstringToken symbol (e.g., "USDT", "ETH")
currencystringFull currency code (e.g., "USDTTRC20")
addressstringPayment address
transaction_hashstringBlockchain transaction hash (if available)
order_idstringYour order identifier
order_descriptionstringPayment description
callback_urlstringWebhook URL
expiry_timestringPayment expiration time
created_atstringCreation timestamp
updated_atstringLast update timestamp
is_fixed_ratebooleanWhether fixed rate was used
is_fee_paid_by_userbooleanWhether user pays the fee
confirmationsnumberCurrent blockchain confirmations
payment_typestringType: "full", "partial", or "overpayment"
payment_historyarrayArray of all deposits received

Payment Statuses

  • waiting - Awaiting payment
  • confirming - Payment received, awaiting confirmations
  • completed - Payment completed successfully
  • partially_completed - Partial payment accepted
  • expired - Payment expired
  • failed - Payment failed

Error Responses

Payment Not Found

Code: 404 Not Found

{
"error": {
"code": "not_found",
"message": "Payment not found",
"details": {
"transaction_id": "550e8400-e29b-41d4-a456-426614174000"
}
}
}

Invalid Transaction ID

Code: 400 Bad Request

{
"error": {
"code": "invalid_request",
"message": "Invalid transaction ID format"
}
}

Example

Request

curl -X GET https://api.cryptofuse.com/payments/550e8400-e29b-41d4-a456-426614174000/ \
-H "Authorization: Bearer your_token"

Response

{
"transaction_id": "550e8400-e29b-41d4-a456-426614174000",
"status": "confirming",
"amount_usd": "100.00",
"amount_crypto": "100.00000000",
"blockchain": "TRX",
"token": "USDT",
"currency": "USDTTRC20",
"address": "TXYZabc123...",
"transaction_hash": "0xabc123...",
"order_id": "order_12345",
"confirmations": 5,
"payment_history": [
{
"deposit_id": "dep_123",
"amount": "100.00000000",
"transaction_hash": "0xabc123...",
"confirmations": 5,
"timestamp": "2024-12-27T10:05:00Z"
}
],
"created_at": "2024-12-27T10:00:00Z",
"updated_at": "2024-12-27T10:06:00Z"
}

Use Cases

  1. Status Polling - Check payment status periodically
  2. Payment Details - Get full payment information for display
  3. Reconciliation - Match payments with orders
  4. Debugging - Investigate payment issues

Notes

  • This is equivalent to calling POST /payments/status/ with the transaction_id
  • Payment history includes all deposits if multiple were received
  • For real-time updates, use webhooks instead of polling
  • The response includes sensitive data like addresses - secure your API calls