Skip to main content
POST
/
subscriptions
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "handle": "<string>",
  "currency": "USD",
  "term": {
    "start": "2023-12-25",
    "end": "2023-12-25"
  },
  "autoRenewal": true,
  "items": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "billAt": "2023-11-07T05:31:56Z",
      "period": {
        "start": "2023-12-25",
        "end": "2023-12-25"
      },
      "quantity": 123,
      "product": {
        "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "name": "<string>"
      },
      "price": {
        "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "name": "<string>"
      }
    }
  ],
  "createdAt": "2023-11-07T05:31:56Z"
}

Headers

x-environment
string<uuid>
required

Configure which environment the request will handle. If the provided credentials do not allow access to this specified environment, a 403 Forbidden response is returned.

Body

application/json
currency
string | null
required

Three-letter ISO currency code, in lowercase. Must be a supported currency (https://go.plude.io/h11101).

customerId
string<uuid>
required

Id of the customer to subscribe.

start
string<date>
required

Start of the current term of the subscription.

description
string | null

A description, meant to be displayable to the customer.

end
string<date> | null

End of the current term of the subscription. If null the subscription is evergreen. At the end of term the subscription will automatically renew if 'autoRenewal' is set to true.

autoRenewal
boolean | null

If true, the subscription will automatically renew at the end of the term. 'End' must be set.

items
object[] | null

A list of up to 20 subscription items, each with an attached price and product.

metaData
object

Set of key-value pairs that you can freely use to store additional information about your subscription.

bookAndSettle
object

Response

OK

id
string<uuid>

Id of subscription.

handle
string | null

A unique handle of the subscription.

currency
string<currency>

Currency of the subscription.

Example:

"USD"

term
object
autoRenewal
boolean

For termed subscription, auto renewal is optional and will automatically renew the subscription.

items
object[] | null

Items of the subscription.

createdAt
string<date-time>