Skip to content

Verify a payment

Before you give value for a payment (ship an order, mark an invoice paid, issue a receipt), confirm it on your server by its reference:

Terminal window
curl https://api.catholicpay.example/api/v1/merchant/verify/ORD-77 \
-H "Authorization: Bearer $CATHOLICPAY_SECRET_KEY"
{
"data": {
"reference": "ORD-77",
"type": "CHECKOUT",
"status": "PAID",
"amount": "4000.00",
"received_amount": "4000.00",
"checkout": { … }
}
}

It finds a card checkout by its reference, else an account number. type says which (CHECKOUT or ACCOUNT_NUMBER), with the full object.

Check that:

  • status is PAID;
  • received_amount is what you expect;
  • the reference is one you created, and you have not already given value for it.

Verify even when a webhook told you: it costs one request and protects you from forged or replayed notifications. Unknown references give 404.