Order subscription

Get a price/tax breakdown for a plan before subscribing.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

Overview

Return a price breakdown for subscribing the authenticated customer to a plan — subtotal, coupon discount, per-jurisdiction taxes, customer balance, and totals — without creating the subscription. plan_id is required; coupon_code, address_id, and subscription_id (for change proration) are optional.

Taxes are computed from the account's tax rules and the customer's shipping address (passed as address_id or the default shipping address).

Example:

curl --request POST \
  --url 'https://www.pelcro.com/api/v1/sdk/order?site_id=1232' \
  --header 'Authorization: Bearer <JWT>' \
  --header 'Content-Type: application/json' \
  --data '{ "plan_id": 4051, "address_id": 7001 }'

Notes

  • Protected — requires the customer's JWT.
  • The response is {"error": false, "data": { … }}; an invalid plan or coupon returns 404.
Query Params
int32
required

The unique identifier of the site associated with your account.

Body Params
int32
required

The unique identifier of plan. Always required.

string

An optional coupon code to apply a discount to the subscription. If you associated a customer segment to the coupon, a validation will be performed. Therefore, it is recommended to validate against eligible coupons for the customer first.

int32

The identifier of the shipping address to associate with the subscription. Required if related product requires an address, if product is available only in certain countries, or if tax feature is enabled under your account.

integer | null

An optional identifier of an existing subscription, used to calculate plan-change proration.

Responses

Language
Credentials
Query
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json