---
title: "POST /setup-method/create"
method: POST
path: "/setup-method/create"
---

# POST /setup-method/create

`POST /setup-method/create`

Create a new setup method for storing payment methods

## Headers

- `Idempotency-Key` string

## Request body

- CreateSetupMethod
  - `currency` string, required — Three letter abbreviation of the currency. Refer [supported currencies](/get-started/currencies-supported)
  - `paymentMethods` string[] — List of payment methods to be enabled for setup. [supported payment methods](/get-started/payment-methods-supported#payment-method-enums) 💡 If a selected payment method is unavailable, the system will automatically fallback to card payments to ensure a smooth checkout experience.
  - `customerId` string — The unique identifier for the customer, generated via the [create-customer API](/developer-resources/endpoints/customer/create-customer). This can be used to associate the payment with a specific customer in your system.
  - `billingDetails` BillingDetails, required — Billing details for the customer.
    - `name` string, required — Customer's name
    - `email` string, required — Customer's email address
    - `contactNumber` string, required — Customer's contact number ([E.164 format](https://en.wikipedia.org/wiki/E.164)), including the country code (e.g., +1 for US, +44 for UK, +91 for India).
    - `customerAddress` CustomerAddress
      - `addressLine1` string — Line 1 of the customer's address
      - `addressLine2` string — Line 2 of the customer's address
      - `city` string — City of the customer's address
      - `state` string — State of the customer's address
      - `country` string — Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
      - `postalCode` string — Postal code
  - `storeFrontId` string — The unique identifier for your storefront
  - `callbackUrl` string, required — The URL we will callback to once the setup is complete
  - `metadata` object — A collection of key-value pairs that can be attached to an object for storing additional structured information
  - `phoneNumberRequired` boolean — Flag to indicate whether phone number is required from the customer during checkout. By default, this is false.

## Response `200`

Setup Method created successfully

- CreateSetupMethodResponse
  - `setupMethodId` string — Unique identifier of the setup method
  - `fwdUrl` string — The URL to redirect the customer to complete the setup

## Other responses

- `400` — Invalid request

---

[API](https://skmtc.net/xpaycheckout/apis/xpay-api-store.md) · [All operations](https://skmtc.net/xpaycheckout/apis/xpay-api-store/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/xpaycheckout/xpay-api-store/versions/6329a7c694bc/schema)
