Skip to main content

Get Transaction

Retrieve details of a specific transaction by ID.

GEThttps://api.zenpayz.com/merchant/api/v1/transactions/{transactionId}
Bearer · API key

Request

Path Parameters

ParameterTypeDescription
transactionId
REQUIRED
stringTransaction ID (e.g., txn_xxxxx)

Headers

HeaderDescription
Authorization
REQUIRED
Bearer {api_key}
X-Signature
REQUIRED
HMAC-SHA256 signature
X-Timestamp
REQUIRED
ISO 8601 timestamp
X-Secret-Salt
REQUIRED
Secret salt for HMAC validation

Response

Success (200 OK)

{
"success": true,
"data": {
"id": "txn_xxxxx",
"intent_id": "pi_xxxxx",
"merchant_id": "mer_xxxxx",
"customer_id": "cus_xxxxx",
"customer_name": "John Doe",
"customer_email": "john@example.com",
"customer_phone": "+1234567890",
"amount": 1000,
"currency": "USD",
"status": "success",
"payment_method": "upi",
"description": "Order #123",
"metadata": {
"orderId": "order_123"
},
"created_at": "2024-01-15T10:30:00.000Z",
"updated_at": "2024-01-15T10:35:00.000Z"
},
"message": "Transaction retrieved successfully",
"meta": {}
}

Error Responses

CodeHTTPMessage
UNAUTHORIZED401Invalid API key
TRANSACTION_NOT_FOUND404Transaction doesn't exist

Examples

curl -X GET "https://api.zenpayz.com/merchant/api/v1/transactions/txn_xxxxx" \
-H "Authorization: Bearer zp_test_xxxxx" \
-H "X-Timestamp: 2024-01-15T10:30:00.000Z" \
-H "X-Signature: a1b2c3d4e5f6..." \
-H "X-Secret-Salt: your_secret_salt"