Skip to content

Prepare a checkout setup intent

POST
/checkout/prepare-setup
curl --request POST \
--url https://apisandbox.puurk.com/checkout/prepare-setup \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "oid": "example", "client_id": "example", "uid": "example", "customer_name": "example", "customer_email": "example" }'

Creates a Stripe SetupIntent so a card can be stored on file without an immediate charge (used for $0-down plans). Returns the client secret and publishable key needed to collect the card with Stripe Elements.

Setup intent to prepare

Media typeapplication/json
object
oid
required

Organization ID the setup intent belongs to

string
client_id

Your own identifier for the customer. See CheckoutPrepareRequest — the same shared-customer caveat applies.

string
uid

Puurk user ID of the customer. Rejected for service-token callers, which must use client_id.

string
customer_name

Customer name, used when creating a new payment customer

string
customer_email

Customer email. Required when neither client_id nor uid is supplied.

string
Examplegenerated
{
"oid": "example",
"client_id": "example",
"uid": "example",
"customer_name": "example",
"customer_email": "example"
}

Successful operation

Media typeapplication/json
object
client_secret

SetupIntent client secret, for Stripe Elements

string
publishable_key

Puurk’s Stripe publishable key, for initializing Stripe.js

string
setup_intent_id

Stripe SetupIntent ID

string
customer_id

Stripe customer ID

string
Examplegenerated
{
"client_secret": "example",
"publishable_key": "example",
"setup_intent_id": "example",
"customer_id": "example"
}

Invalid parameter

Unauthorized

Unable to process request