Verifying Payments

Cartino Pay always verifies a payment with the external gateway server-to-server before it becomes paid — automatically when the payer's browser returns from the gateway. You normally do not need to do anything.

POST /api/v1/payments/{payment_id}/verify exists for the cases where the automatic path did not complete:

POST /api/v1/payments/PAY_01J9X4Z8K3M2N5P7Q9R1S3T5V7/verify
Authorization: Bearer cp_live_…

The response is the payment object with the resulting status.

Guarantees

Errors

HTTP Code Meaning
404 PAYMENT_NOT_FOUND Unknown ID or another application's payment
409 PAYMENT_NOT_VERIFIABLE The payment was never registered at a gateway (creation failed), or a verification is in progress — retry shortly
503 GATEWAY_UNAVAILABLE Transient gateway problem; the payment remains pending

Reconciliation job (recommended)

Run every few minutes:

for each order with cartino status in (pending, processing) and created > 5 minutes ago:
    POST /api/v1/payments/{payment_id}/verify
    update the order from data.status

This catches every missed webhook. It is cheap: verified payments short-circuit without a gateway call.