Card payments
Card and online payments: confirmed, in transit, settled.
This page as plain text: card-payments.md
POST/v1/gateway-settlements
The money landed in the bank, net of the gateway's cut
Dr bank what landed, Dr merchant fees the difference, Cr clearing the gross that was confirmed. Batched, because gateways settle in batches: name the gateway refs in the payout.
Parameters
| Name | In | Required | What it is |
|---|---|---|---|
Idempotency-Key | header | yes | Required on this call. Retrying with the same key returns the original response instead of doing it twice. Reusing a key with a different body is a 422. |
Body
| Field | Type | Required | What it is |
|---|---|---|---|
gateway_code | string | yes | |
gateway_refs | array of string | yes | |
amount_received | number | yes | Net, as it appears on the bank statement. The difference from the gross becomes the fee. |
bank_account_id | string (uuid) | ||
settled_on | string (date) |
Answers
201 | journal_id, gross, fee, payments_settled |
422 | Refs not in transit, or a settlement larger than the gross confirmed |
Example
curl -X POST 'https://api.reconsmith.com/v1/gateway-settlements' \
-H 'Authorization: Bearer $RECONSMITH_KEY' \
-H 'Idempotency-Key: 7c1d0c2e-0b55-4f3a-9a51-1d2f4b6c8e90' \
-H 'Content-Type: application/json' \
-d '{
"gateway_code": "string",
"gateway_refs": [
"string"
],
"amount_received": 100
}'
GET/v1/gateway-payments
In transit — the list that needs handling
Confirmed by a gateway, not yet in the bank. overdue is anything past that gateway's own settlement window (7 days by default). The total ties to the clearing account on the trial balance.
Parameters
| Name | In | Required | What it is |
|---|---|---|---|
overdueOnly | query |
Answers
200 | total_in_transit, overdue_count, and the payments with days_in_transit |
Example
curl -X GET 'https://api.reconsmith.com/v1/gateway-payments' \
-H 'Authorization: Bearer $RECONSMITH_KEY'