POST
/
subscriptions
curl --request POST \
  --url https://api.live.paisr.tech/{version}/subscriptions \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "customer": "<string>",
  "auto_renew": true,
  "trial_period": 182.5,
  "items": [
    {
      "option_id": "<string>",
      "quantity": 2
    }
  ]
}'
{
  "success": true,
  "data": {
    "id": "<string>",
    "status": "<string>",
    "session": null
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
The details required to create a subscription.
customer
string
required

ID or email address of the customer being billed.

auto_renew
boolean
required

Flag indicating if the subscription should auto renew the subscription at each billing cycle.

items
object[]
required
trial_period
number

The number of days before the first billable invoice is due. Required if more than 1 item is being subscribed to.

Required range: 0 <= x <= 365

Response

200
application/json
Successfully created subscription.
success
boolean
default:true

Indicates if the request was successful.

data
object