curl "https://sandbox.api.prava.space/v1/sessions/sess_123/payment-result" \
-H "Authorization: Bearer sk_test_..."
import requests
resp = requests.get(
"https://sandbox.api.prava.space/v1/sessions/sess_123/payment-result",
headers={"Authorization": "Bearer sk_test_..."},
)
const resp = await fetch("https://sandbox.api.prava.space/v1/sessions/sess_123/payment-result", {
headers: {
Authorization: "Bearer sk_test_...",
},
});
{
"session_id": "sess_123",
"order_id": "ord_4a1b",
"status": "awaiting_result",
"transactions": [
{
"txn_id": "txn_1",
"card_id": "card_42",
"status": "awaiting_result",
"line_items": [
{
"txn_ref_id": "tli_1",
"merchant_name": "Acme Store",
"total_amount": "49.99",
"status": "credentials_generated",
"token": "4111111111111111",
"dynamic_cvv": "123",
"expiry_month": "12",
"expiry_year": "2030",
"products": []
}
]
}
]
}
{
"session_id": "sess_123",
"order_id": "ord_4a1b",
"status": "processing",
"transactions": [
{
"txn_id": "txn_1",
"card_id": "card_42",
"status": "awaiting_result"
}
],
"merchant_res": {
"status": "prepared"
}
}
{
"error": { "code": "AUTH_1002", "message": "Missing or invalid Authorization header" }
}
{
"error": { "code": "NOT_FOUND", "message": "Session not found" }
}
Get Payment Result
Retrieve transaction status, card identity, and payment credentials for a session
curl "https://sandbox.api.prava.space/v1/sessions/sess_123/payment-result" \
-H "Authorization: Bearer sk_test_..."
import requests
resp = requests.get(
"https://sandbox.api.prava.space/v1/sessions/sess_123/payment-result",
headers={"Authorization": "Bearer sk_test_..."},
)
const resp = await fetch("https://sandbox.api.prava.space/v1/sessions/sess_123/payment-result", {
headers: {
Authorization: "Bearer sk_test_...",
},
});
{
"session_id": "sess_123",
"order_id": "ord_4a1b",
"status": "awaiting_result",
"transactions": [
{
"txn_id": "txn_1",
"card_id": "card_42",
"status": "awaiting_result",
"line_items": [
{
"txn_ref_id": "tli_1",
"merchant_name": "Acme Store",
"total_amount": "49.99",
"status": "credentials_generated",
"token": "4111111111111111",
"dynamic_cvv": "123",
"expiry_month": "12",
"expiry_year": "2030",
"products": []
}
]
}
]
}
{
"session_id": "sess_123",
"order_id": "ord_4a1b",
"status": "processing",
"transactions": [
{
"txn_id": "txn_1",
"card_id": "card_42",
"status": "awaiting_result"
}
],
"merchant_res": {
"status": "prepared"
}
}
{
"error": { "code": "AUTH_1002", "message": "Missing or invalid Authorization header" }
}
{
"error": { "code": "NOT_FOUND", "message": "Session not found" }
}
GET /v1/sessions/{sessionId}/payment-result · Authenticated with your secret key.
Path parameters
Response
pending, processing, awaiting_result, completed, or failed. processing means authentication or tokenization is in flight, or a quote-backed merchant checkout is not yet terminal.Show transaction properties
Show transaction properties
null when no card is bound.initiated | awaiting_result | completed | failed.Show line_item properties
Show line_item properties
pending | credentials_generated | completed | failed.{ code, message }.Show merchant_res properties
Show merchant_res properties
{ code, message }.Notes
- For non-quote checkouts,
tokenanddynamic_cvvcontain the virtual card credentials your agent uses at checkout. - Read
transactions[].card_idas the source of truth for the card bound to the transaction, whether it was preselected or chosen on the collection surface. - For quote-backed checkouts, Prava completes the merchant checkout. Results contain credential-free transaction summaries (
txn_id,card_id, andstatus) and expose the checkout lifecycle asmerchant_res; they never include token, CVV, expiry, or line-item credentials. - Use the top-level
statusas the normalized payment outcome.merchant_res.statusprovides lifecycle context and uses merchant terms such aspreparedandpaid. merchant_resis omitted for non-quote sessions and before an order exists; it is not returned asnull.- Prava performs a lazy mandate expiry check on every request — expired mandates are reflected in the status.
- After using non-quote checkout credentials, report the outcome via Report Status.
Error responses
| Status | Code | Cause |
|---|---|---|
| 401 | AUTH_1001 | Invalid API key |
| 401 | AUTH_1002 | Missing or invalid Authorization header |
| 404 | NOT_FOUND | Session not found or doesn’t belong to your merchant account |
curl "https://sandbox.api.prava.space/v1/sessions/sess_123/payment-result" \
-H "Authorization: Bearer sk_test_..."
import requests
resp = requests.get(
"https://sandbox.api.prava.space/v1/sessions/sess_123/payment-result",
headers={"Authorization": "Bearer sk_test_..."},
)
const resp = await fetch("https://sandbox.api.prava.space/v1/sessions/sess_123/payment-result", {
headers: {
Authorization: "Bearer sk_test_...",
},
});
{
"session_id": "sess_123",
"order_id": "ord_4a1b",
"status": "awaiting_result",
"transactions": [
{
"txn_id": "txn_1",
"card_id": "card_42",
"status": "awaiting_result",
"line_items": [
{
"txn_ref_id": "tli_1",
"merchant_name": "Acme Store",
"total_amount": "49.99",
"status": "credentials_generated",
"token": "4111111111111111",
"dynamic_cvv": "123",
"expiry_month": "12",
"expiry_year": "2030",
"products": []
}
]
}
]
}
{
"session_id": "sess_123",
"order_id": "ord_4a1b",
"status": "processing",
"transactions": [
{
"txn_id": "txn_1",
"card_id": "card_42",
"status": "awaiting_result"
}
],
"merchant_res": {
"status": "prepared"
}
}
{
"error": { "code": "AUTH_1002", "message": "Missing or invalid Authorization header" }
}
{
"error": { "code": "NOT_FOUND", "message": "Session not found" }
}
Authorizations
Your secret key: sk_test_* (sandbox) or sk_live_* (production).
Path Parameters
The session ID returned from Create Session
Response
Payment result
Overall session status. processing means the payment operation is still in flight: a non-quote checkout is authenticating or tokenizing, or a quote-backed merchant checkout has not reached a terminal outcome.
pending, processing, awaiting_result, completed, failed Show child attributes
Show child attributes
Merchant checkout lifecycle context. Present only for quote-backed sessions; omitted for non-quote sessions and before an order exists. Use the top-level status as the normalized payment outcome.
Show child attributes
Show child attributes
May be present when a quote-backed checkout fails.
Show child attributes
Show child attributes