Get Payment Status

Check the current status of a payment using its transaction ID.

GET/api/v1/payments/:id

Response

json
{
"success": true,
"data": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"status": "succeeded",
"amount": 5000,
"currency": "usd",
"customerEmail": "customer@example.com",
"description": "Order #12345",
"metadata": {
"orderId": "12345"
},
"stripeSessionId": "cs_live_a1b2c3d4...",
"stripePaymentIntentId": "pi_3ABC123...",
"createdAt": "2025-01-01T12:00:00.000Z",
"completedAt": "2025-01-01T12:05:00.000Z"
}
}

Response Fields

FieldDescription
idUltraPay transaction ID
statusCurrent payment status (see below)
amountAmount in cents
currencyLowercase currency code: usd or cad
customerEmailCustomer's email (if provided)
descriptionPayment description, or null if none was provided
metadataYour custom metadata keys, or null if there are none. Keys starting with an underscore (_) are reserved for internal use and are never returned, so don't use them for your own data. A description key is not included here: if its value is a string, it is returned as the top-level description field instead (a top-level description you sent takes precedence); otherwise it is dropped.
stripeSessionIdStripe Checkout Session ID
stripePaymentIntentIdStripe Payment Intent ID (after payment)
createdAtWhen payment was created
completedAtWhen the payment reached a final status, such as succeeded, failed, cancelled or expired (null while pending or processing)

Payment Statuses

StatusDescription
pendingPayment record created, but the checkout link has not been issued yet. You won't normally see this, because Create Payment only returns once the checkout link exists.
processingCheckout link created and waiting for the customer to pay. This is the status right after Create Payment returns; it does not mean the customer has opened the checkout page.
succeeded✅ Payment completed successfully
failedPayment failed (card declined, etc.)
expiredCheckout session expired (30 min timeout)
cancelledPayment cancelled by you or customer
refundedPayment was fully refunded
partially_refundedPayment was partially refunded
disputedCustomer filed a chargeback
dispute_wonDispute resolved in your favor
dispute_lostDispute resolved in customer's favor

Note: Only succeeded payments should trigger order fulfillment.

cURL Example

bash
curl -X GET https://pay.ultrapay.cc/api/v1/payments/550e8400-e29b-41d4-a716-446655440000 \
-H "X-Public-Key: upp_your_public_key" \
-H "X-Secret-Key: ups_your_secret_key"
↑ ↓ navigate↵ select