Approvals
POST/v1/payment-intents/{intent_id}/approve

Approve payment intent

View as .md
curl -X POST "https://api.52-28-238-205.sslip.io/v1/payment-intents/{intent_id}/approve" \  -H "Cookie: <console session cookie>" \  -H "Content-Type: application/json" \  -d '{"challenge_id":"cha_01jd2x3k4m5n6p7q8r9s0t1v2w","credential":{},"approval_id":"apr_01jd2x3k4m5n6p7q8r9s0t1v2w"}'

Same as approving the approval, addressed by payment intent: the body names the approval_id and carries the passkey assertion. Requires approval:decide; the approval must belong to this intent.

Server URLhttps://api.52-28-238-205.sslip.io
POST/v1/payment-intents/{intent_id}/approveBase URL: https://api.52-28-238-205.sslip.io
Authorization
  • sessionCookie: <console session cookie>
  • apiKeyAuthorization: Bearer sk_test_...
Path
  • intent_idstringrequired

    Payment intent id (pi_...).

Body

application/json · required. Fields are listed under Request body below.

Requires permissionapproval:decide
Held by owner, admin (with a grant), finance (with a grant), approver (own team). The caller must hold this permission, or the call is refused with 403.
Policy decisionALLOW · DENY
The policy engine decides this call. The result carries the decision and a reason code; see reason codes.

Authorization

cookieuapg_session<token>

Console session cookie (HttpOnly, SameSite=Lax)

Path Parameters

intent_id*Intent Id

Payment intent id (pi_...).

Request Body

application/json
  1. body
challenge_id*Challenge Id

Id of the passkey challenge returned by the matching options call.

credential*

The passkey assertion (WebAuthn) produced for the challenge.

approval_id*Approval Id

Approval id (apr_...).

Response Body

Success.

application/json
  1. response
approval*
intent?|null
state*State
message?string|null
next_action?|

Plan approvals: 'wallet_step' when the approval is saved but the plan's wallet step failed; retry with POST /v1/plans/{plan_id}/wallet-step

next_action_error?|null
[key: string]?any