Skip to main content
POST
/
api
/
ap2
/
settle
Settle a pay link with a closed AP2 Payment Mandate
curl --request POST \
  --url https://mag3nt.com/api/ap2/settle \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "pay_link_code": "pl_a1b2c3d4",
  "closed_mandate": "<string>",
  "card_token": "<string>",
  "open_mandate": "<string>"
}
'
{
  "status": "ALREADY_SETTLED"
}

Authorizations

Authorization
string
header
required

API key prefixed with 'Bearer sx_live_...'

Body

application/json

Code of the pay link being settled.

Example:

"pl_a1b2c3d4"

closed_mandate
string
required

Closed AP2 Payment Mandate (mandate.payment.1) as an SD-JWT.

card_token
string
required

Token of the payer card named by the mandate (authorizes the debit).

open_mandate
string

Optional open AP2 mandate; when present the open→closed chain is re-verified.

Response

Mandate already settled (idempotent replay)

status
string
Example:

"ALREADY_SETTLED"