Skip to main content
POST
Create payment profile session

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 string 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
enum<string>
required

Payment service provider that processes the transaction.

Available options:
STRIPE,
BILLOGRAM
Example:

"STRIPE"

returnUrl
string
required

The URL the customer is redirected to after the payment method is saved.

Example:

"https://example.com/order/confirmation"

cancelUrl
string

The URL the customer is redirected to if they cancel before saving a payment method.

Example:

"https://example.com/order/checkout"

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
enum<string>
required

Payment service provider that processes the transaction.

Available options:
STRIPE,
BILLOGRAM
Example:

"STRIPE"

status
enum<string>
required

Current status of a payment profile session lifecycle.

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

"PENDING"

hostedUrl
string<uri>
required

The hosted page to redirect the customer to in order to save their payment method.

Example:

"https://payments.example.com/setup/69321a62-f1fe-461f-8761-a19ae6587bb2"

metadata
object
required

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

Example:
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"