Register payment

POST /api/pay
Registers a payment for an accrual.

🔐Authentication

Body parameters

ParameterType/FormatRequiredDescriptionExample
idstring<uuid>Accrual identifier452f081a-7612-48e1-bc4e-89d6cea366e7
txnIdstring<1 to 100 characters>Client-side transaction identifier1
txnDatestring<ISO 8601>Client-side transaction date2024-01-01T12:00:00Z
amountstring<^\d9(.\d2)?$>Payment amount1500.75
receiptUrlstring<URL>Link to receipthttps://example.com/receipt.pdf

Request example

bash
curl -X POST "https://accruals-gateway.doma.ai/api/pay" \ -H "Content-Type: application/json" \ -H "Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=" \ -d '{ "id": "452f081a-7612-48e1-bc4e-89d6cea366e7", "txnId": "1234567891111", "txnDate": "2024-01-01T12:00:00Z", "amount": "1500.75", "receiptUrl": "https://example.com/receipt.pdf" }'

Request body

json
{ "id": "452f081a-7612-48e1-bc4e-89d6cea366e7", "txnId": "1234567891111", "txnDate": "2024-01-01T12:00:00Z", "amount": "1500.75", "receiptUrl": "https://example.com/receipt.pdf" }

Response

ParameterType/FormatRequiredDescriptionExample
txnIdstring<1 to 100 characters>Transaction identifier (as provided in request)1234567891111
txnDatestring<datetime>Transaction date in ISO 8601 format2025-12-04T22:25:01.243Z
regDatestring<datetime>Payment registration date in system (ISO 8601)2025-12-09T12:59:34.887Z

Response example

json
{ "data": { "txnId": "1234567891111", "txnDate": "2025-12-04T22:25:01.243Z", "regDate": "2025-12-09T12:59:34.887Z" } }

Error Codes

Error CodeHTTP StatusMessageCauseSolution
VALIDATION_FAILED400Invalid format of inputParameter validation errorCheck parameter formats
PAYMENT_ALREADY_EXISTS400Payment already existsPayment with this txnId already registeredUse a different txnId
ACCRUAL_NOT_FOUND404Accrual is not foundAccrual with specified id not foundVerify the accrual id
INTERNAL_SERVER_ERROR500Internal server errorInternal server errorTry again later or contact support