Skip to main content
POST
Create a payment_session whose id will be used as token

Authorizations

wb-key
string
header
required

Path Parameters

customer_id
string
required

Id of the customer

Body

application/json

An inbound payment session for creation (a different one is used for updating, see FI-360)

address
boolean
required

whether to collect billing address

operation
enum<string>
required

The purpose of a payment session:

  • AddMethod - add a new payment method
Available options:
add_method
detach_previous_on_success
boolean | null
plan_id
string | null

Unique identifier of an object. Consists of object class prefix and a UUID

Example:

"Cust_c40bea18-c0c9-44b1-bd0c-43f5283e1670"

pricing_id
string | null

Unique identifier of an object. Consists of object class prefix and a UUID

Example:

"Cust_c40bea18-c0c9-44b1-bd0c-43f5283e1670"

provider
enum<string> | null

The payment providers known by the backend.

Those variants MUST be kept identical to the variants of the payment_provider enum of the postgres database

Available options:
authorize,
self_handled,
stripe
Example:

"stripe"

Response

200 - application/json

payment session

Payment Session used to configure Payment Method

address
boolean
required

Indicates whether address is required

customer_id
string
required

Unique identifier of an object. Consists of object class prefix and a UUID

Example:

"Cust_c40bea18-c0c9-44b1-bd0c-43f5283e1670"

detach_previous_on_success
boolean
required

Determines whether previous payment method will be disabled and deregistered once current setup succeeds

operation
enum<string>
required

The purpose of a payment session:

  • AddMethod - add a new payment method
Available options:
add_method
provider
enum<string>
required

The payment providers known by the backend.

Those variants MUST be kept identical to the variants of the payment_provider enum of the postgres database

Available options:
authorize,
self_handled,
stripe
Example:

"stripe"

status
string
required

Payment Session Status

token
string
required

Unique identifier of an object. Consists of object class prefix and a UUID

Example:

"Cust_c40bea18-c0c9-44b1-bd0c-43f5283e1670"

wb_customer_id
string
required

Unique identifier of an object. Consists of object class prefix and a UUID

Example:

"Cust_c40bea18-c0c9-44b1-bd0c-43f5283e1670"

setup_intent
object | null

Payment Configuration setup intent