Skip to content

Select a plan for a checkout session

POST
/checkout/sessions/{id}/select-plan
curl --request POST \
--url https://apisandbox.puurk.com/checkout/sessions/example/select-plan \
--header 'Content-Type: application/json' \
--data '{}'

Customer selects a payment plan for the checkout session

id
required
string

ID of the checkout session

Request body

Media typeapplication/json
object
Examplegenerated
{}

Plan selected

Media typeapplication/json
object
id
string
oid

Organization ID

string
partner_id
string
offer_id
string
customer
object
name
string
email
string
phone
string
amount

Total amount in cents

integer
services
Array<object>
object
name
string
service_id
string
quantity
number
amount

Amount in cents

integer
plans
Array<object>
object
offer_id

Offer these terms belong to

string
uid

User the terms were generated for

string
down_payment

Down payment in cents

number
financed_amount

Amount financed in cents

number
provider_premium_share

Provider’s share of the premium as a fraction between 0 and 1

number
nullable
term_length

Plan length in months

number
monthly_premium

Premium charged per month in cents

number
monthly_provider_premium

Provider share of the monthly premium in cents

number
nullable
monthly_puurk_premium

Puurk share of the monthly premium in cents

number
nullable
monthly_principal

Principal per month in cents

number
monthly_fees

Fees included in each monthly payment in cents

number
nullable
monthly_payout_fees

Payout fees per month in cents

number
nullable
monthly_provider_fees

Provider fees per month in cents

number
nullable
monthly_payment

Monthly payment in cents

number
monthly_opportunity

Monthly opportunity for the provider in cents

number
nullable
total_amount

Total paid over the plan in cents

number
total_premium

Total premium over the plan in cents

number
total_provider_premium

Provider share of the total premium in cents

number
nullable
total_puurk_premium

Puurk share of the total premium in cents

number
nullable
total_principal

Total principal (down payment plus financed amount) in cents

number
total_fees

Total fees over the plan in cents

number
nullable
total_payout_fees

Total payout fees over the plan in cents

number
nullable
total_provider_fees

Total provider fees over the plan in cents

number
nullable
total_opportunity

Total opportunity for the provider in cents

number
nullable
selected_plan
object
offer_id

Offer these terms belong to

string
uid

User the terms were generated for

string
down_payment

Down payment in cents

number
financed_amount

Amount financed in cents

number
provider_premium_share

Provider’s share of the premium as a fraction between 0 and 1

number
nullable
term_length

Plan length in months

number
monthly_premium

Premium charged per month in cents

number
monthly_provider_premium

Provider share of the monthly premium in cents

number
nullable
monthly_puurk_premium

Puurk share of the monthly premium in cents

number
nullable
monthly_principal

Principal per month in cents

number
monthly_fees

Fees included in each monthly payment in cents

number
nullable
monthly_payout_fees

Payout fees per month in cents

number
nullable
monthly_provider_fees

Provider fees per month in cents

number
nullable
monthly_payment

Monthly payment in cents

number
monthly_opportunity

Monthly opportunity for the provider in cents

number
nullable
total_amount

Total paid over the plan in cents

number
total_premium

Total premium over the plan in cents

number
total_provider_premium

Provider share of the total premium in cents

number
nullable
total_puurk_premium

Puurk share of the total premium in cents

number
nullable
total_principal

Total principal (down payment plus financed amount) in cents

number
total_fees

Total fees over the plan in cents

number
nullable
total_payout_fees

Total payout fees over the plan in cents

number
nullable
total_provider_fees

Total provider fees over the plan in cents

number
nullable
total_opportunity

Total opportunity for the provider in cents

number
nullable
payment_intent_id
string
contract_id
string
status
string
Allowed values: pending plan_selected payment_ready completed expired canceled
return_url
string
cancel_url
string
metadata
object
key
additional properties
any
idempotency_key
string
expires_at
string format: date-time
created_at
string format: date-time
updated_at
string format: date-time
Example
{
"status": "pending"
}

Unauthorized