ReconSmiths Developers Your API keys

Reference

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

NameInRequiredWhat it is
Idempotency-KeyheaderyesRequired 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

FieldTypeRequiredWhat it is
gateway_codestringyes
gateway_refsarray of stringyes
amount_receivednumberyesNet, as it appears on the bank statement. The difference from the gross becomes the fee.
bank_account_idstring (uuid)
settled_onstring (date)

Answers

201journal_id, gross, fee, payments_settled
422Refs 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

NameInRequiredWhat it is
overdueOnlyquery

Answers

200total_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'