Capture
The path above is illustrative. You host this endpoint; Moov Money POSTs to the URL you register for this operation. See Setup.
Capture (settle) a previously-placed hold, moving funds out of the sender’s funding source.
The request body is a RequestEnvelope; the inner JWE payload conforms to
CaptureRequestJWTPayload. The response body is a ResponseEnvelope;
the inner JWE payload conforms to CaptureResponseJWTPayload.
Outcomes (200 OK; capture has no denied outcome):
approved: hold captured.failed: you could not capture the hold (ledger error, etc.).
Idempotency: capture is idempotent by both idempotencyKey and
holdReference.
- A repeat capture with the same
idempotencyKeymust return the same outcome. - A capture of an already-captured
holdReference(whether theidempotencyKeyis the same or different) must returnoutcome=approved. Reuse the originalcaptureReferenceif you can look it up. - If you cannot resolve a
holdReferenceat all (e.g. it has aged out of your records), you must still returnoutcome=approved. Moov Money treats unknown holds as already captured; the alternative would strand funds. If this behavior does not fit your ledger model, escalate to Moov before implementing.
Retries: Moov Money will retry on 408, 429, 5xx, and transport
errors. Return other 4xx for terminal validation failures.
curl -X POST https://fi.example.com/ledger/capture \
-H "Content-Type: application/json" \
-d '{
"request": "eyJhbGciOiJBMjU2S1ciLCJlbmMiOiJBMjU2R0NNIiwidHlwIjoiSldUIiwiY3R5IjoiSldUIn0.…"
}'{
"response": "eyJhbGciOiJBMjU2S1ciLCJlbmMiOiJBMjU2R0NNIiwidHlwIjoiSldUIiwiY3R5IjoiSldUIn0.…"
}Request
request field. All business fields (amounts, references, idempotency
key) travel inside the JWE claims, not in the outer JSON.request
string
requiredRequest claims
POST capture.exp
integer<int64>
requiredmoov
object
requiredMoov claims
moov
payoutID
string
requiredproviderID
string
requiredholdReference
string
requiredauthorize.idempotencyKey
string
requiredidempotencyKey you saw
on authorize as already processed if it turns up on release or
capture, and vice versa.
Moov Money currently derives per-payout keys that may collide across
the three endpoints; treating them as endpoint-scoped is required for
correctness.typ
string<enum>
requiredcapture on this operation.captureiat
integer<int64>
requiredResponse claims
POST capture.exp
integer<int64>
requiredmoov
object
requiredMoov claims
moov
reason
stringdenied/failed; optional for approved.outcome
string<enum>
requiredHigh-level decision. Capture has no denied outcome: either you
captured the hold (approved) or you did not (failed).
approved: the hold is captured (funds moved).captureReferenceis required. A repeat capture of an already-captured hold must also returnapproved; see the endpoint idempotency notes.failed: you could not capture the hold.
approved,
failedcaptureReference
stringoutcome=approved; omit when outcome=failed. On a repeat capture of
an already-captured hold, return the original
captureReference if it can look it up.idempotencyKey
string
requirediat
integer<int64>
requiredResponse
response field. All business fields (outcome, references, echoed
idempotency key) travel inside the JWE claims, not in the outer JSON.response
string
required