Select a plan for a checkout session
const url = 'https://apisandbox.puurk.com/checkout/sessions/example/select-plan';const options = {method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”ID of the checkout session
Request Bodyrequired
Section titled “Request Bodyrequired”Request body
object
Examplegenerated
{}Responses
Section titled “Responses”Plan selected
object
Organization ID
object
Total amount in cents
object
Amount in cents
object
Offer these terms belong to
User the terms were generated for
Down payment in cents
Amount financed in cents
Provider’s share of the premium as a fraction between 0 and 1
Plan length in months
Premium charged per month in cents
Provider share of the monthly premium in cents
Puurk share of the monthly premium in cents
Principal per month in cents
Fees included in each monthly payment in cents
Payout fees per month in cents
Provider fees per month in cents
Monthly payment in cents
Monthly opportunity for the provider in cents
Total paid over the plan in cents
Total premium over the plan in cents
Provider share of the total premium in cents
Puurk share of the total premium in cents
Total principal (down payment plus financed amount) in cents
Total fees over the plan in cents
Total payout fees over the plan in cents
Total provider fees over the plan in cents
Total opportunity for the provider in cents
object
Offer these terms belong to
User the terms were generated for
Down payment in cents
Amount financed in cents
Provider’s share of the premium as a fraction between 0 and 1
Plan length in months
Premium charged per month in cents
Provider share of the monthly premium in cents
Puurk share of the monthly premium in cents
Principal per month in cents
Fees included in each monthly payment in cents
Payout fees per month in cents
Provider fees per month in cents
Monthly payment in cents
Monthly opportunity for the provider in cents
Total paid over the plan in cents
Total premium over the plan in cents
Provider share of the total premium in cents
Puurk share of the total premium in cents
Total principal (down payment plus financed amount) in cents
Total fees over the plan in cents
Total payout fees over the plan in cents
Total provider fees over the plan in cents
Total opportunity for the provider in cents
object
Example
{ "status": "pending"}Unauthorized