curl -X POST https://sandbox.api.prava.space/v1/mandates/mdt_123/charges/txn_9/report \
-H "Authorization: Bearer sk_test_..." \
-H "Content-Type: application/json" \
-d '{ "txn_status": "APPROVED", "txn_type": "PURCHASE", "authorization_code": "OK123", "response_code": "00", "amount_paid": "40.00" }'
import requests
resp = requests.post(
"https://sandbox.api.prava.space/v1/mandates/mdt_123/charges/txn_9/report",
headers={"Authorization": "Bearer sk_test_..."},
json={
"txn_status": "APPROVED",
"txn_type": "PURCHASE",
"authorization_code": "OK123",
"response_code": "00",
"amount_paid": "40.00",
},
)
const resp = await fetch(
"https://sandbox.api.prava.space/v1/mandates/mdt_123/charges/txn_9/report",
{
method: "POST",
headers: {
Authorization: "Bearer sk_test_...",
"Content-Type": "application/json",
},
body: JSON.stringify({
txn_status: "APPROVED",
txn_type: "PURCHASE",
authorization_code: "OK123",
response_code: "00",
amount_paid: "40.00",
}),
}
);
{
"mandateId": "mdt_123",
"transactionId": "txn_9",
"orderId": "ord_9",
"status": "completed",
"mandateStatus": "active",
"visaConfirmation": "SUCCESS"
}
{
"error": { "code": "CHARGE_NOT_FOUND", "message": "Charge not found" }
}
{
"error": { "code": "CHARGE_NOT_REPORTABLE", "message": "Charge is not in a reportable state" }
}
Server-Side API
Report a Mandate Charge
Settle a mandate charge outcome (APPROVED / DECLINED) with the card network.
POST
/
v1
/
mandates
/
{id}
/
charges
/
{txnId}
/
report
curl -X POST https://sandbox.api.prava.space/v1/mandates/mdt_123/charges/txn_9/report \
-H "Authorization: Bearer sk_test_..." \
-H "Content-Type: application/json" \
-d '{ "txn_status": "APPROVED", "txn_type": "PURCHASE", "authorization_code": "OK123", "response_code": "00", "amount_paid": "40.00" }'
import requests
resp = requests.post(
"https://sandbox.api.prava.space/v1/mandates/mdt_123/charges/txn_9/report",
headers={"Authorization": "Bearer sk_test_..."},
json={
"txn_status": "APPROVED",
"txn_type": "PURCHASE",
"authorization_code": "OK123",
"response_code": "00",
"amount_paid": "40.00",
},
)
const resp = await fetch(
"https://sandbox.api.prava.space/v1/mandates/mdt_123/charges/txn_9/report",
{
method: "POST",
headers: {
Authorization: "Bearer sk_test_...",
"Content-Type": "application/json",
},
body: JSON.stringify({
txn_status: "APPROVED",
txn_type: "PURCHASE",
authorization_code: "OK123",
response_code: "00",
amount_paid: "40.00",
}),
}
);
{
"mandateId": "mdt_123",
"transactionId": "txn_9",
"orderId": "ord_9",
"status": "completed",
"mandateStatus": "active",
"visaConfirmation": "SUCCESS"
}
{
"error": { "code": "CHARGE_NOT_FOUND", "message": "Charge not found" }
}
{
"error": { "code": "CHARGE_NOT_REPORTABLE", "message": "Charge is not in a reportable state" }
}
Reconcile a mandate charge outcome and settle it with the card network. Call this after checking out with the credentials from Charge a Mandate.
POST /v1/mandates/{id}/charges/{txnId}/report · Authenticated with your secret key (merchants) or Ed25519 signature (agents).
Need to create a mandate? Mandate creation is part of the Session APIs — create a mandate with a mandate_setup block on Create Session.
Path parameters
The
transactionId returned from Charge a Mandate.Body
Response
Notes
- Reporting a one-time mandate charge as
APPROVEDmoves the mandate toconsumed; recurring mandates stayactive. authorization_code,response_code, andamount_paidare optional and recorded when supplied.
Error responses
| Status | Code | Cause |
|---|---|---|
| 401 | AUTH_REQUIRED | Missing or invalid credentials |
| 403 | MANDATE_FORBIDDEN | Caller does not own this mandate |
| 404 | MANDATE_NOT_FOUND / CHARGE_NOT_FOUND | Mandate or charge not found |
| 409 | CHARGE_NOT_REPORTABLE / CHARGE_NO_TLI / NO_INSTRUCTION | Charge is not in a reportable state |
| 502 | VISA_CONFIRMATION_FAILED | Visa confirmation failed |
| 500 | MANDATE_CHARGE_REPORT_DB_FAILED | Persistence failed |
curl -X POST https://sandbox.api.prava.space/v1/mandates/mdt_123/charges/txn_9/report \
-H "Authorization: Bearer sk_test_..." \
-H "Content-Type: application/json" \
-d '{ "txn_status": "APPROVED", "txn_type": "PURCHASE", "authorization_code": "OK123", "response_code": "00", "amount_paid": "40.00" }'
import requests
resp = requests.post(
"https://sandbox.api.prava.space/v1/mandates/mdt_123/charges/txn_9/report",
headers={"Authorization": "Bearer sk_test_..."},
json={
"txn_status": "APPROVED",
"txn_type": "PURCHASE",
"authorization_code": "OK123",
"response_code": "00",
"amount_paid": "40.00",
},
)
const resp = await fetch(
"https://sandbox.api.prava.space/v1/mandates/mdt_123/charges/txn_9/report",
{
method: "POST",
headers: {
Authorization: "Bearer sk_test_...",
"Content-Type": "application/json",
},
body: JSON.stringify({
txn_status: "APPROVED",
txn_type: "PURCHASE",
authorization_code: "OK123",
response_code: "00",
amount_paid: "40.00",
}),
}
);
{
"mandateId": "mdt_123",
"transactionId": "txn_9",
"orderId": "ord_9",
"status": "completed",
"mandateStatus": "active",
"visaConfirmation": "SUCCESS"
}
{
"error": { "code": "CHARGE_NOT_FOUND", "message": "Charge not found" }
}
{
"error": { "code": "CHARGE_NOT_REPORTABLE", "message": "Charge is not in a reportable state" }
}
Authorizations
Path Parameters
Body
application/json