Setup Intents

Retrieve setup status

Changed on

Retrieves how far a setup has got and what the buyer must do next, if anything. Collection runs in the background, so poll this rather than reading the create response. Accepts either a secret key or the setup's own client_secret as a query parameter, so the surface collecting the payment method can poll it directly.

get/setup_intents/{setup_intent_id}/status

Request

  • Base URL
    https://api.whop.com/api/v1
  • Auth
    • none
    • or HTTP bearer

Path parameters

setup_intent_id, string required

The unique identifier of the setup intent.

Query parameters

client_secret, string

The setup's own client_secret, for a caller without a secret key.

Response

Setup status retrieved

SetupStatus required
id, string required

The setup this status describes, prefixed sint_.

last_setup_error, SetupLastSetupError nullable required
next_action, union required

What the buyer must do to finish. type picks the shape and each type carries only its own data, so switching on type gives you exactly that step's payload.

object, string required

Always setup_status.

return_url, string nullable required

Where to send the buyer once the setup reaches a resting state, or null to leave them where they are.

status, 'processing' | 'succeeded' | 'canceled' | 'requires_action' required

How far the setup has got. A 200 means we answered, not that the method was saved — always branch on this. requires_action — the buyer has a step outstanding; see next_action. processing — the buyer has done their part and the processor is deciding. succeeded — the payment method is saved, and only this one means saved. canceled — abandoned or refused; see last_setup_error to tell which.

Example response

{
  "id": "sint_xxxxxxxxxxxxxx",
  "last_setup_error": {
    "code": "enrollment_declined",
    "message": "The bank declined the enrollment."
  },
  "next_action": {
    "data": {
      "frame_max_width": 500,
      "url": "https://psp.example/3ds/challenge"
    },
    "render": [
      "inline"
    ],
    "type": "redirect"
  },
  "object": "setup_status",
  "return_url": "https://shinetime.example/billing/saved",
  "status": "canceled"
}

Changes

    • info

      added the optional property next_action/oneOf[#/components/schemas/PaymentNextAction]/oneOf[subschema #2: Display instructions]/data/oneOf[subschema #3: Bank transfer]/bank_transfer/accepts_split_transfers to the response with the status

    • info

      added the optional property next_action/oneOf[#/components/schemas/PaymentNextAction]/oneOf[subschema #2: Display instructions]/data/oneOf[subschema #2: QR]/qr/copy_code to the response with the status