### Install and start the JavaScript example Source: https://docs.stripe.com/terminal/example-applications Run these commands inside the cloned repo to install dependencies and start the example app. Then enter the URL of the backend deployed in step 1. ```bash cd stripe-terminal-js-demo npm install npm run start ``` -------------------------------- ### Production: run the application with npm start Source: https://docs.stripe.com/checkout/quickstart Starts the built application in production. ```shell $ npm start ``` -------------------------------- ### Development: build the application with npm install Source: https://docs.stripe.com/checkout/quickstart Installs dependencies for the development setup. ```shell $ npm install ``` -------------------------------- ### Load Stripe.js and render a Checkout button (HTML) Source: https://docs.stripe.com/checkout/quickstart Includes the Stripe.js script and a product block with a form that POSTs to /create-checkout-session to start Checkout. ```html
The cover of Stubborn Attachments

Stubborn Attachments

$20.00
``` -------------------------------- ### Production build and run Source: https://docs.stripe.com/checkout/embedded/quickstart Installs dependencies and builds with npm build, then starts the app with npm start. ```shell $ npm install $ npm build ``` ```shell $ npm start ``` -------------------------------- ### Build the client app with npm install Source: https://docs.stripe.com/billing/quickstart Install client app dependencies before starting the client. ```shell npm install ``` -------------------------------- ### Quickstart: install plugin, init project, add services, pull credentials Source: https://docs.stripe.com/projects Installs the projects plugin, creates a project, adds Supabase and Vercel services, and pulls credentials to your local environment. ```bash stripe plugin install projects stripe projects init stripe projects add supabase/project stripe projects add vercel/project stripe projects env --pull ``` -------------------------------- ### Install React Native example app dependencies Source: https://docs.stripe.com/terminal/example-applications Changes into the example-app directory and installs its package dependencies with yarn. Then copy example-app/.env.example to example-app/.env and set the Render app URL. ```bash cd stripe-terminal-react-native/example-app yarn ``` -------------------------------- ### Build and run the Node application Source: https://docs.stripe.com/checkout/embedded/quickstart Installs dependencies with npm install, then starts the application with npm start. ```shell npm install ``` ```shell npm start ``` -------------------------------- ### Prompt a coding agent to build a Hello, world! Stripe app Source: https://docs.stripe.com/stripe-apps/create-app Use this prompt after installing Stripe's agent skills and starting a new agent session in the directory where you want to create your app. It asks the agent to build a UI extension on the Customer details page and guide you through previewing and testing. ```bash Use the Stripe Apps skill to build a "Hello, world!" Stripe app that displays a UI extension on the Customer details page. Guide me through previewing and testing it. ``` -------------------------------- ### Production: build the application with npm install and npm build Source: https://docs.stripe.com/checkout/quickstart Installs dependencies and builds the application for production. ```shell $ npm install $ npm build ``` -------------------------------- ### List climate products with the Stripe Node.js client Source: https://docs.stripe.com/climate/orders/quickstart Starts the /api/climate_order handler by initializing the Stripe client with STRIPE_SECRET_KEY and listing available climate products. ```javascript const stripe = require('stripe')(process.env.STRIPE_SECRET_KEY); export default async function handler(req, res) { const currency = 'usd'; const {data: products} = await stripe.climate.products.list(); ``` -------------------------------- ### Development: run app with STRIPE_WEBHOOK_SECRET from Stripe CLI Source: https://docs.stripe.com/checkout/quickstart Starts the dev server with the webhook secret printed by stripe listen. ```shell $ STRIPE_WEBHOOK_SECRET=$(stripe listen --print-secret) npm run dev ``` -------------------------------- ### Run terminal quickstart with Stripe CLI Source: https://docs.stripe.com/cli Use `stripe terminal quickstart` to get up and running fast with Stripe Terminal and the Verifone P400 reader. This command only supports the `--api-key` flag. ```sh stripe terminal quickstart ``` -------------------------------- ### React product block and Checkout form Source: https://docs.stripe.com/checkout/quickstart JSX product display with a form that POSTs to /create-checkout-session to start Checkout. ```jsx
The cover of Stubborn Attachments

Stubborn Attachments

$20.00
``` -------------------------------- ### Navigate into the helloworld directory Source: https://docs.stripe.com/stripe-apps/create-app Run this command to enter the generated `helloworld` app directory before starting the local development server. ```bash cd helloworld ``` -------------------------------- ### Install x402, Hono, and Stripe dependencies with npm Source: https://docs.stripe.com/payments/machine/x402 Installs the packages required for the x402 payment endpoint example, including @x402/core, @x402/evm, @x402/hono, @coinbase/x402, hono, @hono/node-server, and stripe. ```bash npm install @x402/core @x402/evm @x402/hono @coinbase/x402 hono @hono/node-server stripe ``` -------------------------------- ### Create a SetupIntent with ownership permissions Source: https://docs.stripe.com/financial-connections/ownership-match Create a SetupIntent with an existing Customer and request ownership permission and prefetch for Financial Connections. Enable US bank account as a payment method in the Dashboard first. ```curl curl https://api.stripe.com/v1/setup_intents \ -u "<>:" \ -d "customer={{CUSTOMER_ID}}" \ -d "automatic_payment_methods[enabled]=true" \ -d "payment_method_options[us_bank_account][financial_connections][permissions][]=ownership" \ -d "payment_method_options[us_bank_account][financial_connections][permissions][]=payment_method" \ -d "payment_method_options[us_bank_account][financial_connections][prefetch][]=ownership" ``` -------------------------------- ### Install the Stripe Apps CLI plugin Source: https://docs.stripe.com/stripe-apps/create-app Installs the Stripe Apps CLI plugin required to start building a Stripe app. ```bash stripe plugin install apps ``` -------------------------------- ### Verify the pnpm installation with pnpm --version Source: https://docs.stripe.com/stripe-apps/create-app Run this after installing pnpm to confirm the installation. ```bash pnpm --version ``` -------------------------------- ### Build and run the Python (Flask) server Source: https://docs.stripe.com/connect/onboarding/quickstart Install dependencies with pip3, then start the Flask server on port 4242. ```shell pip3 install -r requirements.txt ``` ```shell FLASK_APP=server.py python3 -m flask run --port=4242 ``` -------------------------------- ### Build and run the Go server and client app Source: https://docs.stripe.com/connect/onboarding/quickstart Download Go module dependencies, run the server, then install and start the client app and open it at localhost:4242. ```shell go mod download github.com/stripe/stripe-go/v85 go mod download github.com/gorilla/mux ``` ```shell go run server.go ``` ```shell npm install ``` ```shell npm start ``` -------------------------------- ### Install pnpm with brew install pnpm Source: https://docs.stripe.com/stripe-apps/create-app Stripe Apps uses pnpm as the package manager. After installing, verify the installation with pnpm --version. ```bash brew install pnpm ``` -------------------------------- ### Create Checkout Session with Go Source: https://docs.stripe.com/checkout/quickstart Initialize a Stripe client and build CheckoutSessionCreateParams to create a Checkout Session. Replace placeholders like {{PRICE_ID}} and {{CHECKOUT_MODE}} with your values. ```go // Don't put any keys in code. See https://docs.stripe.com/keys-best-practices. sc := stripe.NewClient("<>") domain := "http://localhost:4242" domain := "http://localhost:3000" params := &stripe.CheckoutSessionCreateParams{ CustomerEmail: stripe.String("customer@example.com"), SubmitType: stripe.String("donate"), BillingAddressCollection: stripe.String("auto"), ShippingAddressCollection: &stripe.CheckoutSessionCreateShippingAddressCollectionParams{ AllowedCountries: stripe.StringSlice([]string{ "US", "CA", }), }, LineItems: []*stripe.CheckoutSessionCreateLineItemParams{ &stripe.CheckoutSessionCreateLineItemParams{ // Provide the exact Price ID (for example, price_1234) of the product you want to sell Price: stripe.String("{{PRICE_ID}}"), Quantity: stripe.Int64(1), }, }, Mode: {{CHECKOUT_MODE}}, SuccessURL: stripe.String(domain + "/success.html"), SuccessURL: stripe.String(domain + "/checkout?success=true"), AutomaticTax: &stripe.CheckoutSessionCreateAutomaticTaxParams{Enabled: stripe.Bool(true)}, CustomerCreation: stripe.String(stripe.CheckoutSessionCustomerCreationAlways), // Provide the Customer ID (for example, cus_1234) for an existing customer to associate it with this session // Customer: stripe.String("{{CUSTOMER_ID}}"), // Provide a name (for example, hosted_web_0001) to label this Checkout integration and measure its conversion independently IntegrationIdentifier: stripe.String("{{INTEGRATION_ID}}"), } s, err := sc.V1CheckoutSessions.Create(context.TODO(), params) if err != nil { log.Printf("sc.V1CheckoutSessions.Create: %v", err) } http.Redirect(w, r, s.URL, http.StatusSeeOther) ``` -------------------------------- ### Import Stripe Go library Source: https://docs.stripe.com/checkout/embedded/quickstart Imports the stripe-go v87 package for the Go example. ```go "github.com/stripe/stripe-go/v87" ``` -------------------------------- ### Create an account onboarding link with V2CoreAccountLinks in Go Source: https://docs.stripe.com/connect/marketplace/quickstart Creates an account_onboarding link for the recipient configuration using the provided accountId. Returns the onboarding URL as JSON; refresh and return URLs point to example.com. ```go // Create Account Link for onboarding func createAccountLink(w http.ResponseWriter, r *http.Request) { data := parseRequestBody(r) accountId := data["accountId"].(string) sc := stripe.NewClient(os.Getenv("STRIPE_SECRET_KEY")) params := &stripe.V2CoreAccountLinkCreateParams{ Account: stripe.String(accountId), UseCase: &stripe.V2CoreAccountLinkCreateUseCaseParams{ Type: stripe.String("account_onboarding"), AccountOnboarding: &stripe.V2CoreAccountLinkCreateUseCaseAccountOnboardingParams{ Configurations: []*string{ stripe.String("recipient"), }, RefreshURL: stripe.String("https://example.com"), ReturnURL: stripe.String("https://example.com?accountId=" + accountId), }, }, } link, err := sc.V2CoreAccountLinks.Create(context.TODO(), params) if err != nil { http.Error(w, err.Error(), http.StatusInternalServerError) return } w.Header().Set("Content-Type", "application/json") json.NewEncoder(w).Encode(map[string]string{"url": link.URL}) } ``` -------------------------------- ### Install the Stripe generate CLI plugin Source: https://docs.stripe.com/stripe-apps/create-app Installs the generate plugin, which is required to scaffold new apps. ```bash stripe plugin install generate ``` -------------------------------- ### Create Account Session with app_install and app_viewport Components Source: https://docs.stripe.com/stripe-apps/embedded-apps Enable app installation and rendering by specifying app_install and app_viewport in the components parameter. You must allow the app to render via the features parameter under allowed_apps. ```curl curl https://api.stripe.com/v1/account_sessions \ -u "<>:" \ -H "Stripe-Version: 2026-09-30.preview; embedded_connect_beta=v2;" \ -d account={{CONNECTED_ACCOUNT_ID}} \ -d "components[app_install][enabled]=true" \ -d "components[app_install][features][allowed_apps][]=APP_ID" \ -d "components[app_viewport][enabled]=true" \ -d "components[app_viewport][features][allowed_apps][]=APP_ID" ``` -------------------------------- ### Install Stripe Go module with go get Source: https://docs.stripe.com/billing/quickstart Initialize with Go Modules and fetch the stripe-go module. The import path includes the v87 version. ```bash go get -u github.com/stripe/stripe-go/v87 ``` -------------------------------- ### Build and run the PHP server Source: https://docs.stripe.com/issuing/controls/real-time-authorizations/quickstart Install Composer dependencies, then start the PHP built-in server on port 4242. ```bash composer install ``` ```bash php -S 127.0.0.1:4242 --docroot=public ``` -------------------------------- ### Clone the JavaScript example from GitHub Source: https://docs.stripe.com/terminal/example-applications Clones the Stripe Terminal JavaScript demo repository before installing and starting the app. ```bash git clone https://github.com/stripe/stripe-terminal-js-demo.git ``` -------------------------------- ### Create a Resource with POST /v2/provisioning/resources Source: https://docs.stripe.com/provisioning Send this request after verifying onboarding, Service availability, prerequisites, a single active Provider connection, valid configuration, payment profile, and user plan approval. Always set `livemode` explicitly; omitting it defaults to `true` and can create live infrastructure with real charges. Include `project` for project-scoped Services and omit it for account-scoped Services unless associating the Resource with a Project. ```http POST /v2/provisioning/resources { "provider": "{{PROVIDER_ID}}", "service_ref": "{{SERVICE_ID}}", "project": "{{PROJECT_ID}}", "livemode": {{true|false}}, "name": "{{RESOURCE_NAME}}", "configuration": {{VALIDATED_SERVICE_CONFIGURATION}} } ``` -------------------------------- ### Verify Node.js is installed with node -v Source: https://docs.stripe.com/stripe-apps/create-app Stripe Apps requires Node.js version >=22; an Active LTS version (22 or later) is recommended. If Node.js isn't installed, download and install it. ```bash node -v ``` -------------------------------- ### GET /v1/setup_intents Source: https://docs.stripe.com/api/setup_intents/list Returns a list of SetupIntents. Supports filtering by customer, payment method, and creation date, along with cursor-based pagination. ```APIDOC ## GET /v1/setup_intents ### Description Returns a list of SetupIntents. Supports filtering by customer, payment method, and creation date, along with cursor-based pagination. ### Method GET ### Endpoint https://api.stripe.com/v1/setup_intents ### Parameters #### Query Parameters - **attach_to_self** (boolean) - Optional - If present, the SetupIntent's payment method will be attached to the in-context Stripe Account. It can only be used for this Stripe Account's own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer. - **created** (object | integer) - Optional - A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. - **customer** (string) - Optional - Only return SetupIntents for the customer specified by this customer ID. - **customer_account** (string) - Optional - Only return SetupIntents for the account specified by this customer ID. - **ending_before** (string) - Optional - A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. - **limit** (integer) - Optional - A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. - **payment_method** (string) - Optional - Only return SetupIntents that associate with the specified payment method. - **starting_after** (string) - Optional - A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. ### Request Example curl -G https://api.stripe.com/v1/setup_intents \ -u "<>" \ -d limit=3 ### Response #### Success Response A dictionary with a `data` property that contains an array of up to `limit` SetupIntents, starting after SetupIntent `starting_after`. Each entry in the array is a separate SetupIntent object. If no more SetupIntents are available, the resulting array will be empty. #### Response Example { "object": "list", "url": "/v1/setup_intents", "has_more": false, "data": [ { "id": "seti_1Mm8s8LkdIwHu7ix0OXBfTRG", "object": "setup_intent", "application": null, "cancellation_reason": null, "client_secret": "seti_1Mm8s8LkdIwHu7ix0OXBfTRG_secret_NXDICkPqPeiBTAFqWmkbff09lRmSVXe", "created": 1678942624, "customer": null, "description": null, "flow_directions": null, "last_setup_error": null, "latest_attempt": null, "livemode": false, "mandate": null, "metadata": {}, "next_action": null, "on_behalf_of": null, "payment_method": null, "payment_method_options": { "card": { "mandate_options": null, "network": null, "request_three_d_secure": "automatic" } }, "payment_method_types": [ "card" ], "single_use_mandate": null, "status": "requires_payment_method", "usage": "off_session" } ] } ``` -------------------------------- ### Retrieve a PaymentIntent object response (JSON) Source: https://docs.stripe.com/sdks/server-side Example response returned when you create, retrieve, or update an object; you get back the object itself with its properties. ```json { "id": "pi_001", "object": "payment_intent", "amount": 1099, "currency": "usd", /* ... */ } ``` -------------------------------- ### Verify the generate plugin version Source: https://docs.stripe.com/stripe-apps/create-app Checks the installed generate plugin version; you must be on version 0.11.5 or later. ```bash stripe generate --version # generate version 0.11.5 ``` -------------------------------- ### SetupIntent.create() Source: https://docs.stripe.com/changelog/dahlia/2026-04-22/pix-recurring-payments-support Creates a SetupIntent. This changelog adds the `payment_method_options.pix` parameter. ```APIDOC ## SetupIntent.create() ### Description Creates a SetupIntent. This changelog adds the `payment_method_options.pix` parameter. ### Method SDK method (PHP) ### Parameters #### Request Body - **payment_method_options.pix** - Added ``` -------------------------------- ### SetupIntent creation response Source: https://docs.stripe.com/connect/integrate-billing-connect Example response returned after successfully creating a SetupIntent, showing the resulting object with status succeeded. ```json { "id": "seti_123", "object": "setup_intent", "customer": "cus_xxxxxxxxxxxxxx", "customer_account": "acct_xxxxxxxxxxxxxx", "payment_method": "pm_xxxxxxxxxxxxxx", "status": "succeeded" } ``` -------------------------------- ### Verify the Stripe Apps plugin version Source: https://docs.stripe.com/stripe-apps/create-app Checks the installed apps plugin version; you must be on version 1.19.0 or later. ```bash stripe apps -v # apps version 1.19.0 ``` -------------------------------- ### React Checkout form posting to /checkout.php Source: https://docs.stripe.com/checkout/quickstart JSX form that submits to /checkout.php to start Checkout in a PHP integration. ```jsx
``` -------------------------------- ### List SetupIntents JSON response Source: https://docs.stripe.com/api/setup_intents/list Example response from listing SetupIntents, showing a list object with a data array of SetupIntent objects and has_more indicating whether more results exist. ```json { "object": "list", "url": "/v1/setup_intents", "has_more": false, "data": [ { "id": "seti_1Mm8s8LkdIwHu7ix0OXBfTRG", "object": "setup_intent", "application": null, "cancellation_reason": null, "client_secret": "seti_1Mm8s8LkdIwHu7ix0OXBfTRG_secret_NXDICkPqPeiBTAFqWmkbff09lRmSVXe", "created": 1678942624, "customer": null, "description": null, "flow_directions": null, "last_setup_error": null, "latest_attempt": null, "livemode": false, "mandate": null, "metadata": {}, "next_action": null, "on_behalf_of": null, "payment_method": null, "payment_method_options": { "card": { "mandate_options": null, "network": null, "request_three_d_secure": "automatic" } }, "payment_method_types": [ "card" ], "single_use_mandate": null, "status": "requires_payment_method", "usage": "off_session" } ] } ``` -------------------------------- ### Checkout button form posting to /checkout.php (HTML) Source: https://docs.stripe.com/checkout/quickstart A form that submits to /checkout.php to start Checkout in a PHP integration. ```html
``` -------------------------------- ### Create v2 Account and Account Link for onboarding in Java Source: https://docs.stripe.com/connect/saas/quickstart Creates a v2 Account with merchant card payments capability and Stripe-collected fees/losses, then creates an Account Link for onboarding. Set dashboard to FULL for the Stripe Dashboard or EXPRESS for the Express Dashboard; localhost is not supported for V2 account links, so update the URL manually in the browser. ```java try { // Create v2 Account AccountCreateParams params = AccountCreateParams.builder() .setContactEmail(email) .setDisplayName(email) .setIdentity( AccountCreateParams.Identity.builder() .setCountry(AccountCreateParams.Identity.Country.US) .setEntityType(AccountCreateParams.Identity.EntityType.COMPANY) .build() ) .setConfiguration( AccountCreateParams.Configuration.builder() .setCustomer( AccountCreateParams.Configuration.Customer.builder() .build() ) .setMerchant( AccountCreateParams.Configuration.Merchant.builder() .setCapabilities( AccountCreateParams.Configuration.Merchant.Capabilities.builder() .setCardPayments( AccountCreateParams.Configuration.Merchant.Capabilities.CardPayments.builder() .setRequested(true) .build() ) .build() ) .build() ) .build() ) .setDefaults( AccountCreateParams.Defaults.builder() .setResponsibilities( AccountCreateParams.Defaults.Responsibilities.builder() .setFeesCollector(AccountCreateParams.Defaults.Responsibilities.FeesCollector.STRIPE) .setLossesCollector(AccountCreateParams.Defaults.Responsibilities.LossesCollector.STRIPE) .build() ) .build() ) // Set to FULL for the Stripe Dashboard or EXPRESS for the Express Dashboard .setDashboard(AccountCreateParams.Dashboard.FULL) .build(); Account account = v2Client.v2().core().accounts().create(params); return new Gson().toJson(Map.of("accountId", account.getId())); } catch (StripeException e) { response.status(500); return new Gson().toJson(Map.of("error", e.getMessage())); } }); // Create Account Link for onboarding post("/api/create-account-link", (request, response) -> { String accountId = parseRequestBody(request, "accountId"); try { com.stripe.param.v2.core.AccountLinkCreateParams params = com.stripe.param.v2.core.AccountLinkCreateParams.builder() .setAccount(accountId) .setUseCase( com.stripe.param.v2.core.AccountLinkCreateParams.UseCase.builder() .setType(com.stripe.param.v2.core.AccountLinkCreateParams.UseCase.Type.ACCOUNT_ONBOARDING) .setAccountOnboarding( com.stripe.param.v2.core.AccountLinkCreateParams.UseCase.AccountOnboarding.builder() .addConfiguration(com.stripe.param.v2.core.AccountLinkCreateParams.UseCase.AccountOnboarding.Configuration.MERCHANT) .addConfiguration(com.stripe.param.v2.core.AccountLinkCreateParams.UseCase.AccountOnboarding.Configuration.CUSTOMER) // Due to a bug with V2 account links localhost is currently not supported. You will need to manually update the URL in your browser until the bug is fixed .setRefreshUrl("https://example.com") .setReturnUrl("https://example.com?accountId=" + accountId) .build() ) .build() ) .build(); ``` -------------------------------- ### Create a SetupIntent with setup_credential_usage Source: https://docs.stripe.com/payments/cards/save-and-reuse Create a SetupIntent for a customer and set payment_method_options[card][setup_credential_usage] to unscheduled. Collect payment details on the client with the Payment Element afterward. ```curl curl https://api.stripe.com/v1/setup_intents \ -u "<>:" \ -d "customer={{CUSTOMER_ID}}" \ -d "automatic_payment_methods[enabled]=true" \ -d "payment_method_options[card][setup_credential_usage]=unscheduled" ``` -------------------------------- ### Create an account onboarding link with v2.core.account_links.create Source: https://docs.stripe.com/connect/saas/quickstart Creates an account_onboarding link for the merchant and customer configurations with refresh and return URLs. Returns the onboarding URL in the JSON response. ```python def create_account_link(): data = parse_request_body() account_id = data['accountId'] try: account_link = stripe_client.v2.core.account_links.create({ "account": account_id, "use_case": { "type": "account_onboarding", "account_onboarding": { "configurations": ["merchant", "customer"], "refresh_url": "https://example.com", "return_url": f"https://example.com?accountId={account_id}", }, }, }) return jsonify({'url': account_link.url}) except Exception as e: return jsonify({'error': str(e)}), 500 ``` -------------------------------- ### Define thin webhook endpoint in Sinatra Source: https://docs.stripe.com/connect/marketplace/quickstart Starts a Sinatra route at /api/thin-webhook that rewinds and reads the raw request body. The example is truncated in the source and does not include signature verification or event handling. ```ruby post "/api/thin-webhook" do request.body.rewind payload = request.body.read ``` -------------------------------- ### GET /v1/apps/installs Source: https://docs.stripe.com/api/apps/installs Lists all app installs. Use this endpoint to retrieve the app installs on an account and check the state of existing installs. ```APIDOC ## GET /v1/apps/installs ### Description Lists all app installs. Use this endpoint to retrieve the app installs on an account and check the state of existing installs. ### Method GET ### Endpoint /v1/apps/installs ``` -------------------------------- ### Create an account link for onboarding with Stripe Go SDK Source: https://docs.stripe.com/connect/saas/quickstart Creates a V2 core account link for account_onboarding using the merchant and customer configurations. Returns the onboarding URL as JSON. ```go // Create Account Link for onboarding func createAccountLink(w http.ResponseWriter, r *http.Request) { data := parseRequestBody(r) accountId := data["accountId"].(string) sc := stripe.NewClient(os.Getenv("STRIPE_SECRET_KEY")) params := &stripe.V2CoreAccountLinkCreateParams{ Account: stripe.String(accountId), UseCase: &stripe.V2CoreAccountLinkCreateUseCaseParams{ Type: stripe.String("account_onboarding"), AccountOnboarding: &stripe.V2CoreAccountLinkCreateUseCaseAccountOnboardingParams{ Configurations: []*string{ stripe.String("merchant"), stripe.String("customer"), }, RefreshURL: stripe.String("https://example.com"), ReturnURL: stripe.String("https://example.com?accountId=" + accountId), }, }, } link, err := sc.V2CoreAccountLinks.Create(context.TODO(), params) if err != nil { http.Error(w, err.Error(), http.StatusInternalServerError) return } w.Header().Set("Content-Type", "application/json") json.NewEncoder(w).Encode(map[string]string{"url": link.URL}) } ``` -------------------------------- ### POST /v1/setup_intents Source: https://docs.stripe.com/payments/3d-secure/authentication-flow Creates a SetupIntent with manual 3D Secure request by setting payment_method_options[card][request_three_d_secure]. Use this to set up a payment method for future payments with 3DS triggered manually. ```APIDOC ## POST /v1/setup_intents ### Description Creates a SetupIntent with manual 3D Secure request by setting `payment_method_options[card][request_three_d_secure]`. Use this to set up a payment method for future payments with 3DS triggered manually. ### Method POST ### Endpoint https://api.stripe.com/v1/setup_intents ### Parameters #### Request Body - **customer** (string) - Required - ID of the customer this SetupIntent belongs to. - **payment_method_options[card][request_three_d_secure]** (string) - Optional - Set to `any` to request 3DS with a preference for frictionless flow, or `challenge` to request 3DS with a preference for challenge flow. ### Request Example ```curl curl https://api.stripe.com/v1/setup_intents \ -u "<>:" \ -d "customer={{CUSTOMER_ID}}" \ -d "payment_method_options[card][request_three_d_secure]=any" ``` ``` -------------------------------- ### Retrieve CreditPolicy with GET /v1/issuing/credit_policy and example response Source: https://docs.stripe.com/issuing/funding/post-fund-with-dynamic-reserves Call the GET CreditPolicy endpoint to retrieve your card program CreditPolicy details. The example response shows fields such as current_exposure_limit_amount, reserve_multiplier_decimal, max_exposure_limit_amount, and funded_reserve_amount. ```curl curl https://api.stripe.com/v1/issuing/credit_policy -u "sk_***:" -H "Stripe-Version: 2024-06-20; issuing_credit_beta=v2" ``` ```json { "livemode": true, "current_exposure_limit_amount": 11359999920 , "reserve_multiplier_decimal": "2.4", "max_exposure_limit_amount": 13133333300, "funded_reserve_amount": 4733333300, // other fields } ``` -------------------------------- ### Initialize StripeClient in Java Source: https://docs.stripe.com/checkout/quickstart Create a StripeClient instance with your secret API key. The key shown is a placeholder; replace it with your actual test secret key. ```java // This test secret API key is a placeholder. Don't include personal details in requests with this key. // To see your test secret API key embedded in code samples, sign in to your Stripe account. // You can also find your test secret API key at https://dashboard.stripe.com/test/apikeys. // Don't put any keys in code. See https://docs.stripe.com/keys-best-practices. StripeClient client = new StripeClient("<>"); ``` -------------------------------- ### Fix npm start with NODE_OPTIONS openssl-legacy-provider Source: https://docs.stripe.com/checkout/embedded/quickstart If npm start errors, export NODE_OPTIONS=--openssl-legacy-provider and start again. ```shell export NODE_OPTIONS=--openssl-legacy-provider ``` -------------------------------- ### Initialize StripeClient in C# Source: https://docs.stripe.com/checkout/quickstart Create a StripeClient instance with your secret API key. The key shown is a placeholder; replace it with your actual test secret key. ```csharp // This test secret API key is a placeholder. Don't include personal details in requests with this key. // To see your test secret API key embedded in code samples, sign in to your Stripe account. // You can also find your test secret API key at https://dashboard.stripe.com/test/apikeys. // Don't put any keys in code. See https://docs.stripe.com/keys-best-practices. services.AddSingleton(new StripeClient("<>")); ``` -------------------------------- ### Launch app via adb Source: https://docs.stripe.com/terminal/features/apps-on-devices/build Starts the main activity of the installed app on the DevKit device. Use after installation completes. ```shell adb shell am start com.example.myapp/.MainActivity ``` -------------------------------- ### Create a SetupIntent with us_bank_account payment_method_data Source: https://docs.stripe.com/global-payouts/credential-reuse Attach the SetupIntent to the Account via customer_account and specify bank account details with payment_method_data. Requires the preview Stripe-Version header and returns a succeeded SetupIntent with a payment_method. ```curl curl https://api.stripe.com/v1/setup_intents \ -u "<>:" \ -H "Stripe-Version: 2026-09-30.preview" \ -d confirm=true \ -d customer_account=acct_123 \ -d "mandate_data[customer_acceptance][accepted_at]=1678942624" \ -d "mandate_data[customer_acceptance][type]=offline" \ -d "payment_method_data[billing_details][address][line1]=123 Main St" \ -d "payment_method_data[billing_details][address][postal_code]=94105" \ --data-urlencode "payment_method_data[billing_details][email]=jenny.rosen@example.com" \ -d "payment_method_data[billing_details][name]=Jenny Rosen" \ -d "payment_method_data[type]=us_bank_account" \ -d "payment_method_data[us_bank_account][account_holder_type]=individual" \ -d "payment_method_data[us_bank_account][account_number]=000123456789" \ -d "payment_method_data[us_bank_account][routing_number]=110000000" \ -d "payment_method_options[us_bank_account][verification_method]=automatic" \ --data-urlencode "return_url=https://www.stripe.com" ``` ```json { "id": "seti_123", "object": "setup_intent", "customer_account": "acct_123", "payment_method": "pm_123", "payment_method_types": [ "us_bank_account" ], // Other SetupIntent fields "status": "succeeded" } ``` -------------------------------- ### Install @stripe/crypto SDK Source: https://docs.stripe.com/crypto/onramp/embedded-components-quickstart Install the @stripe/crypto package to use the embedded components SDK. ```bash npm install @stripe/crypto ``` -------------------------------- ### GET /v1/apps/installs/:id Source: https://docs.stripe.com/api/apps/installs Retrieves an existing app install. Use this endpoint to check the state of an install, including the permissions, content security policy entries, and endpoints that the installing account has authorized. ```APIDOC ## GET /v1/apps/installs/:id ### Description Retrieves an existing app install. Use this endpoint to check the state of an install, including the permissions, content security policy entries, and endpoints that the installing account has authorized. ### Method GET ### Endpoint /v1/apps/installs/:id ### Parameters #### Path Parameters - **id** (string) - Required - The identifier of the app install to retrieve. ``` -------------------------------- ### Fetch products for a specific account Source: https://docs.stripe.com/connect/saas/quickstart GET /api/products/:account_id lists active prices with expanded product data, using stripe_account option unless account_id is 'platform'. Maps each price to product details including id, name, description, price, priceId, and image. ```ruby # Fetch products for a specific account get "/api/products/:account_id" do account_id = params[:account_id] begin options = {} if account_id != 'platform' options[:stripe_account] = account_id end prices = Stripe::Price.list({ expand: ['data.product'], active: true, limit: 100, }, options) products = prices.data.map do |price| { id: price.product.id, name: price.product.name, description: price.product.description, price: price.unit_amount, priceId: price.id, image: 'https://i.imgur.com/6Mvijcm.png' } end ``` -------------------------------- ### Install Expo CLI globally Source: https://docs.stripe.com/terminal/example-applications Installs the Expo CLI globally with yarn as a prerequisite for running the React Native example app. ```bash yarn global add expo-cli ``` -------------------------------- ### POST /v1/setup_intents Source: https://docs.stripe.com/global-payouts/credential-reuse Creates and confirms a SetupIntent to collect payment method credentials, attaching it to an Account via the customer_account parameter. Use payment_method_data to specify bank account or debit card details. ```APIDOC ## POST /v1/setup_intents ### Description Creates a SetupIntent to collect payment method credentials and attaches it to the Account object using the customer_account parameter. Use payment_method_data to specify information about the bank account or debit card. ### Method POST ### Endpoint https://api.stripe.com/v1/setup_intents ### Parameters #### Request Body - **confirm** (boolean) - Set to true to confirm the SetupIntent - **customer_account** (string) - The Account ID to attach the SetupIntent to (for example, acct_123) - **mandate_data[customer_acceptance][accepted_at]** (timestamp) - When the mandate was accepted - **mandate_data[customer_acceptance][type]** (string) - Mandate acceptance type (for example, offline) - **payment_method_data[billing_details][address][line1]** (string) - Billing address line 1 - **payment_method_data[billing_details][address][postal_code]** (string) - Billing postal code - **payment_method_data[billing_details][email]** (string) - Billing email - **payment_method_data[billing_details][name]** (string) - Billing name - **payment_method_data[type]** (string) - Payment method type (for example, us_bank_account) - **payment_method_data[us_bank_account][account_holder_type]** (string) - Account holder type (for example, individual) - **payment_method_data[us_bank_account][account_number]** (string) - Bank account number - **payment_method_data[us_bank_account][routing_number]** (string) - Bank routing number - **payment_method_options[us_bank_account][verification_method]** (string) - Verification method (for example, automatic) - **return_url** (string) - URL to return to after confirmation ### Request Example ```curl curl https://api.stripe.com/v1/setup_intents \ -u "<>:" \ -H "Stripe-Version: 2026-09-30.preview" \ -d confirm=true \ -d customer_account=acct_123 \ -d "mandate_data[customer_acceptance][accepted_at]=1678942624" \ -d "mandate_data[customer_acceptance][type]=offline" \ -d "payment_method_data[billing_details][address][line1]=123 Main St" \ -d "payment_method_data[billing_details][address][postal_code]=94105" \ --data-urlencode "payment_method_data[billing_details][email]=jenny.rosen@example.com" \ -d "payment_method_data[billing_details][name]=Jenny Rosen" \ -d "payment_method_data[type]=us_bank_account" \ -d "payment_method_data[us_bank_account][account_holder_type]=individual" \ -d "payment_method_data[us_bank_account][account_number]=000123456789" \ -d "payment_method_data[us_bank_account][routing_number]=110000000" \ -d "payment_method_options[us_bank_account][verification_method]=automatic" \ --data-urlencode "return_url=https://www.stripe.com" ``` ### Response #### Success Response - **id** (string) - SetupIntent ID - **object** (string) - Object type (setup_intent) - **customer_account** (string) - The Account ID the SetupIntent is attached to - **payment_method** (string) - The resulting PaymentMethod ID - **payment_method_types** (array) - Payment method types - **status** (string) - SetupIntent status (for example, succeeded) #### Response Example ```json { "id": "seti_123", "object": "setup_intent", "customer_account": "acct_123", "payment_method": "pm_123", "payment_method_types": [ "us_bank_account" ], "status": "succeeded" } ``` ``` -------------------------------- ### Create an Account Link for hosted onboarding to collect proof_of_liveness Source: https://docs.stripe.com/connect/api-onboarding Create an Account Link using the connected account ID and send the account to the returned `url`. The account is prompted to complete the `proof_of_liveness` requirement along with other currently due requirements, then redirected to `return_url`; listen to `account.updated` to know when requirements are complete. ```curl curl https://api.stripe.com/v1/account_links \ -u "<>:" \ -d "account={{CONNECTEDACCOUNT_ID}}" \ --data-urlencode "refresh_url=https://example.com/refresh" \ --data-urlencode "return_url=https://example.com/return" \ -d type=account_onboarding \ -d "collection_options[fields]=currently_due" ``` -------------------------------- ### Test installation with curl GET /api/mappings Source: https://docs.stripe.com/use-stripe-apps/mirakl/install Confirms the application is running. A successful installation returns a 200 response code with an empty payload; the X-AUTH-TOKEN is generated during configuration. ```bash curl -X GET "https://app-url/api/mappings" \ -H "accept: application/json" \ -H "X-AUTH-TOKEN: $OPERATOR_PASSWORD" # Generated during the configuration. ``` -------------------------------- ### Create Product and Price on Platform in Go Source: https://docs.stripe.com/connect/marketplace/quickstart Creates a Stripe product and price on the platform, attaching the connected account ID as metadata, and returns the product and price info as JSON. Use to set up a product for a connected account. ```go // Create a sample product and return a price for it func createProduct(w http.ResponseWriter, r *http.Request) { data := parseRequestBody(r) productName := data["productName"].(string) productDescription := data["productDescription"].(string) productPrice := int64(data["productPrice"].(float64)) accountId := data["accountId"].(string) var p *stripe.Product var pr *stripe.Price var err error // Create the product on the platform productParams := &stripe.ProductParams{ Name: stripe.String(productName), Description: stripe.String(productDescription), } productParams.AddMetadata("stripeAccount", accountId) p, err = product.New(productParams) if err != nil { http.Error(w, err.Error(), http.StatusInternalServerError) return } // Create a price for the product on the platform priceParams := &stripe.PriceParams{ Product: stripe.String(p.ID), UnitAmount: stripe.Int64(productPrice), Currency: stripe.String("usd"), } priceParams.AddMetadata("stripeAccount", accountId) pr, err = price.New(priceParams) if err != nil { http.Error(w, err.Error(), http.StatusInternalServerError) return } // Return the product and price information w.Header().Set("Content-Type", "application/json") json.NewEncoder(w).Encode(map[string]interface{}{ "productName": productName, "productDescription": productDescription, "productPrice": productPrice, "priceId": pr.ID, }) } ``` -------------------------------- ### Clone the React Native example from GitHub Source: https://docs.stripe.com/terminal/example-applications Clones the Stripe Terminal React Native repository before installing Expo CLI and the example app dependencies. ```bash git clone https://github.com/stripe/stripe-terminal-react-native.git ``` -------------------------------- ### Create a Project with POST /v2/provisioning/projects Source: https://docs.stripe.com/provisioning Create a Project for the application environment after approval and save the returned Project ID with the platform's application-environment record. Use separate preview and production Projects when their Resources or credentials must remain isolated. ```http POST /v2/provisioning/projects { "name": "{{APPLICATION_NAME}} {{ENVIRONMENT}}" } ``` -------------------------------- ### Manually install Stripe plugin for OpenClaw Source: https://docs.stripe.com/agents/plugin Clone the plugin into a temporary directory, then install it. The example uses `/tmp/stripe` as the temporary directory. ```bash git clone --branch plugins/agent-plugin --depth 1 https://github.com/stripe/ai.git /tmp/stripe openclaw plugins install --force /tmp/stripe ``` -------------------------------- ### Install @stripe/stripe-js via npm Source: https://docs.stripe.com/sdks/stripejs-esmodule Install the Stripe.js ES Module from the npm public registry using a package manager. ```bash npm install @stripe/stripe-js ``` -------------------------------- ### Install jose package for Node.js decryption Source: https://docs.stripe.com/stripe-apps/api-authentication/managed-api-keys Install the jose package required by the Node.js decryption example, which needs Node.js 22 or later and imports jose as an ECMAScript module. ```bash npm install jose ```