Skip to main content
POST
/
checkout
/
Create a checkout session
curl --request POST \
  --url https://api.paritydeals.com/api/v1/checkout/ \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "planIdentifier": "plan-pro-monthly",
  "successUrl": "https://paritydeals.com/checkout/success",
  "chargePeriod": "MONTHLY",
  "offeringId": "96d3a293-34ac-48a5-b73d-976b15781afd",
  "pricingTableId": "6db2717a-4e43-4ae1-a293-6c0a775f6264",
  "ruleId": "f2ebc23f-3f79-4cf4-b17e-fe8e30a42ab2",
  "customerId": "cust_789",
  "features": [
    {
      "identifier": "seats",
      "quantity": 5
    }
  ],
  "ipAddress": "103.154.35.20"
}'
{
  "checkoutUrl": "https://checkout.stripe.com/c/pay/cs_test_b1sNi7D6u9iMCUFV1UZi9ZaiXKdOOmr3DCUW6XdCZIr5Id1F7#fid...",
  "checkoutSessionId": "cs_test_b1sNi7D6u9iMCUFV1UZi9ZwerfaiXKdOOmr3DCUW6XdCZIr5Id1F7G"
}

Authorizations

Authorization
string
header
required

The Server API Key obtained from the ParityDeals application. Pass as a Bearer token in the Authorization header. Example: 'Authorization: Bearer YOUR_API_KEY'

Body

application/json
planIdentifier
string
required

The identifier of the specific plan the customer is checking out with.

Example:

"plan-pro-monthly"

successUrl
string<url>
required

The URL to which the user will be redirected after a successful checkout.

Example:

"https://paritydeals.com/checkout/success"

chargePeriod
enum<string>
required

The billing cycle for the subscription.

Available options:
ONE_TIME,
MONTHLY,
YEARLY,
WEEKLY,
DAILY,
THREE_MONTHS,
SIX_MONTHS
Example:

"MONTHLY"

offeringId
string<uuid> | null

The ID (uuid) of the offering the customer is checking out with.

Example:

"96d3a293-34ac-48a5-b73d-976b15781afd"

pricingTableId
string<uuid> | null

The ID (uuid) of the pricingTable being used (considered if offeringId is not provided).

Example:

"6db2717a-4e43-4ae1-a293-6c0a775f6264"

ruleId
string<uuid> | null

The ID (uuid) of the pricing rule being applied (considered if offeringId is not provided).

Example:

"f2ebc23f-3f79-4cf4-b17e-fe8e30a42ab2"

customerId
string | null

The ID of the customer initiating the checkout. (If not provided, a new customer might be created depending on server logic).

Example:

"cust_789"

features
object[] | null

A list of features and their desired quantities. SDK documentation notes this as 'Required', but usage may vary based on examples.

Example:
[{ "identifier": "seats", "quantity": 5 }]
ipAddress
string | null

The IP Address of the customer, used for location-based pricing.

Example:

"103.154.35.20"

Response

201 - application/json

Checkout Session Created

checkoutUrl
string<url>

The URL that the customer should be redirected to complete the payment.

Example:

"https://checkout.stripe.com/c/pay/cs_test_b1sNi7D6u9iMCUFV1UZi9ZaiXKdOOmr3DCUW6XdCZIr5Id1F7#fid..."

checkoutSessionId
string

The unique ID for the created checkout session.

Example:

"cs_test_b1sNi7D6u9iMCUFV1UZi9ZwerfaiXKdOOmr3DCUW6XdCZIr5Id1F7G"

I