---
title: "Create a setup intent"
method: POST
path: "/subscriptions/paymentmethods/setup-intent"
tags: ["Subscription Payments"]
---

# Create a setup intent

`POST /subscriptions/paymentmethods/setup-intent`

## Request

- Base URL: `https://api.smokeball.com`
- URL: `https://api.smokeball.com/subscriptions/paymentmethods/setup-intent`
- Auth: API key in header `x-api-key` and API key in header `Authorization`

Creates an unconfirmed, card-only setup intent for the account's payment customer and returns its id,
client secret and the publishable key of the payment system account it was created in.
            
Adding a card is a three-step flow:
* Call this endpoint to create the setup intent.
* In the browser, initialise the payment system's client library with 'publishableKey', collect the card and confirm the setup intent with 'clientSecret'.
* Call the add payment method endpoint with 'setupIntentId' and 'clientSecret' as the payment information.

## Response `200`

When request is successful. Returns a 'SetupIntentResponse' object.

- SetupIntentResponse: A Stripe setup intent for collecting a card. The client confirms it with Stripe.js using the client secret and publishable key, then passes the id and client secret as Finance.Subscriptions.Api.Models.StripePaymentInformation to the add payment method endpoint.
  - `setupIntentId` string, nullable: The Stripe setup intent id.
  - `clientSecret` string, nullable: The Stripe setup intent client secret.
  - `publishableKey` string, nullable: The Stripe publishable key for the account the setup intent was created in. Use it to initialise Stripe.js.

## Other responses

- `404`: When the account is not associated to a customer.
- `500`: When an error occurs while creating the setup intent.

## Changes

- **2026-10-28** `2fe552c5d11d`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/smokeball/apis/smokeball-api/changes/subscriptions/paymentmethods/setup-intent/post.md)

---

[API](https://skmtc.dev/smokeball/apis/smokeball-api.md) - [All operations](https://skmtc.dev/smokeball/apis/smokeball-api/llms.txt) - [OpenAPI document](https://skmtc.dev/smokeball/apis/smokeball-api/revisions/6e350cf667d4?raw)
