Skip to main content
POST
/
payment-profiles
/
sessions
{
  "paymentProfileSessionId": "69321a62-f1fe-461f-8761-a19ae6587bb2",
  "orderId": "44567801-a504-4f09-8089-31ea78bc239b",
  "paymentProvider": "STRIPE",
  "status": "PENDING",
  "providers": {
    "stripe": {
      "clientSecret": "seti_1234_secret_abcd",
      "publishableKey": "pk_test_1234567890abcdef",
      "setupIntentId": "seti_1234567890abcdef"
    }
  },
  "metadata": {
    "source": "mobile_app",
    "campaign": "summer_2024"
  },
  "createdAt": "2024-09-29T10:00:00Z",
  "updatedAt": "2024-09-29T10:30:00Z"
}

Authorizations

X-API-Key
string
header
required

An API key that grants access to the Connect API. You can create and manage API keys in the portal.

Headers

X-Idempotency-Key
string

A unique key to ensure idempotency of requests. If a request with the same key has already been processed, the same result will be returned. The key must be unique for each distinct operation. Keys are expired after 24 hours, but we recommend using a new key for each request.

Modified requests with the same idempotency keys are rejected with a 409 Conflict status code.

Maximum length: 256

Body

application/json

Request to create a new payment profile session for setting up a saved payment method.

orderId
string
required

The unique identifier of the order this payment profile session is associated with.

Example:

"9f8e7d6c-5b4a-3210-9876-543210987654"

paymentProvider
string
required

Payment service provider for processing transactions.

Example:

"STRIPE"

setAsDefaultPaymentProfile
boolean

Whether to set the payment method as the default for future payments. Only applicable if savePaymentProfile is true and the customer is authenticated. Defaults to false.

Example:

false

metadata
object

A set of key-value pairs that can be attached to an object for storing additional information in a semi-structured format.

Response

Payment profile session created successfully

A payment profile session that wraps the process of setting up and saving a payment method for future use.

paymentProfileSessionId
string
required

The unique identifier for this payment profile session.

Example:

"69321a62-f1fe-461f-8761-a19ae6587bb2"

orderId
string
required

The unique identifier of the order this payment profile session is associated with.

Example:

"44567801-a504-4f09-8089-31ea78bc239b"

paymentProvider
string
required

Payment service provider for processing transactions.

Example:

"STRIPE"

status
enum<string>
required

Current status of a payment profile session lifecycle.

Available options:
PENDING,
REQUIRES_ACTION,
COMPLETED,
FAILED
Example:

"PENDING"

providers
object
required

Payment provider-specific configurations for widget rendering.

metadata
object
required

Custom key-value pairs for additional payment profile session information.

Example:
{
"source": "mobile_app",
"campaign": "summer_2024"
}
createdAt
string<date-time>
required

When this payment profile session was created.

Example:

"2024-09-29T10:00:00Z"

updatedAt
string<date-time>
required

When this payment profile session was last updated.

Example:

"2024-09-29T10:30:00Z"

I