Sync Payment to Provider
POST/api/ledger/payments/:payment/sync
Manually push (or re-push) one SKU payment to the connected accounting provider (two-way payment sync) — the row action on the Payments tab. Runs inline: eligibility rejections and provider validation errors are persisted to the payment's last_sync_error and returned as 422; transport/auth failures return 502 with no state change.
Any valid API token can call this endpoint — no specific scope required. Manage tokens.
Requires Bearer token + accounting.sync permission and an active ledger cutover.
Eligibility: the payment must be SKU-originated (not ingested from the provider), a cash-style type, and its owner document's current ledger entry must have a live sync link to a provider invoice/bill. On success the payment is linked to the created provider payment (accounting_integration) and its status on the Payments tab flips to Synced.
Request
Responses
- 200
- 401
- 403
- 404
- 422
- 429
- 502
OK
Response Headers
Unauthenticated — the bearer token is missing, revoked, expired, or malformed. Never retry automatically; fix the credential. See the Errors guide.
Forbidden — the token lacks a required scope, the endpoint is not available to API tokens, or the user behind the token lacks the permission. A human must adjust the token scopes or user permissions; do not retry.
Not found — no record with the given identifier (or the route does not exist). Verify the ID before retrying.
Unprocessable Entity
Response Headers
Rate limited — platform limit is 1,000 requests/min; individual tokens may carry lower limits. Honor the Retry-After header before retrying. See the Rate Limits guide.
Bad Gateway