Payments: Retrieve
GET/payments/{payment_id}
Retrieves a Payment. This API can also be used to get the status of a previously initiated payment or next action for an ongoing payment
Path parameters
payment_idstringrequiredThe identifier for payment
Query parameters
force_syncboolean, nullableDecider to enable or disable the processor call for retrieve request
client_secretstring, nullableThis is a token which expires after 15 minutes, used from the client to authenticate and create sessions from the SDK
expand_attemptsboolean, nullableIf enabled provides list of attempts linked to payment intent
expand_capturesboolean, nullableIf enabled provides list of captures linked to latest attempt
Responses
200Gets the payment with final status404No payment found
Request
curl --request GET \
--url https://sandbox.cardencer.com/payments/{payment_id} \
--header 'api-key: snd_...'Response
{
"payment_id": "pay_mbabizu24mvu3mela5njyhpit4",
"merchant_id": "merchant_1668273825",
"status": "requires_confirmation",
"amount": 6540,
"net_amount": 6540,
"amount_capturable": 6540,
"processor_merchant_id": "merchant_1689512302",
"currency": "AED",
"payment_method": "card",
"attempt_count": 0
}