Endpoint
| Environment | Full URL |
|---|---|
| Sandbox | https://sandbox.api.prava.space/v1/sessions/:sessionId/report-status |
| Production | https://api.prava.space/v1/sessions/:sessionId/report-status |
Authentication
Bearer token using your secret key:Path Parameters
The session ID returned from Create Session
Request Body
The transaction line item reference ID (from Get Payment Result)
The payment outcome:
APPROVED or DECLINEDTransaction type. Defaults to
PURCHASE.Authorization code from the merchant’s payment processor (max 128 characters)
Processor response code, e.g.,
"00" for approved (max 2 characters)Override the total amount paid (if different from the original amount)
Optional per-product status overrides
Response
Always
"confirmed"The transaction line item reference ID
The reported status:
APPROVED or DECLINEDCard network confirmation result:
SUCCESS or FAILUREExample
Response
Reporting a Failed Payment
Reporting with Per-Product Statuses
Error Responses
| Status | Code | Cause | Resolution |
|---|---|---|---|
| 401 | AUTH_1001 | Invalid API key | Check your secret key |
| 401 | AUTH_1002 | Missing or invalid Authorization header | Include Authorization: Bearer sk_xxx |
| 404 | NOT_FOUND | Session not found | Verify the session ID |
| 404 | NOT_FOUND | No order found for this session | Ensure the session has a completed order |
| 404 | NOT_FOUND | Transaction reference not found | Verify the txn_ref_id |
| 400 | INVALID_STATE | No transaction awaiting payment result | The transaction may have already been reported or is not yet ready |
| 400 | MANDATE_EXPIRED | Mandate has expired | The mandate expired before status was reported — register a new intent |
| 400 | INVALID_STATE | Transaction has no mandate | The transaction is missing mandate data |
| 400 | PRODUCT_NOT_FOUND | Product not found by the given ID | Verify product_id or product_ref_id |
| 502 | VISA_CONFIRMATION_FAILED | Card network confirmation failed | Retry or contact support |
| 500 | REPORT_STATUS_ERROR | Internal error | Contact support with the X-Response-ID header |
Error Response Format
Notes
- Always report status after checkout execution — this updates transaction records and relays the outcome to the card network.
- For one-time mandates, an
APPROVEDstatus automatically consumes the mandate (it cannot be used again). - For recurring mandates, an
APPROVEDstatus keeps the mandate active for future invocations. - If a payment token was used but checkout failed, reporting
DECLINEDensures the mandate invocation is logged correctly. - The
product_statusesfield is optional and informational — the overall mandate status followstxn_status.