Create subscription

This endpoint allows you to create a subscription in Loop

Token scope - Read & write subscription contracts

Rate limit - Global pool (i.e. 50 requests per second per domain)

Note: The nextBillingDate must be at least 24 hours in the future from the time the Create Subscription API is called. If the nextBillingDate falls within the next 24 hours, the subscription will not be created.

Body Params
int64
required

The unique identifier of the customer in Shopify

int32
required

Next billing date (in epoch seconds) of the subscription.

string
required

Currency code of the subscription

int32

ID of the payment method of the customer

billingPolicy
object
required

Defines when the customer is billed, including interval (e.g., monthly, yearly), interval count, min and max cycle for billing.

deliveryPolicy
object
required

Specifies how often deliveries occur, including delivery interval and interval count (e.g., every 2 weeks, monthly).

lines
array of objects
required

Specifies list of variants to be included in the subscription, each with their variantShopifyId

lines*
shippingAddress
object
required

The address where subscription orders will be delivered, including name, street, city, zip code, and country/province codes.It is required if at least one item in the order is a physical product that requires shipping.

int64

The Shopify order ID from which the subscription originated, used to link the subscription back to the original purchase.

manualDiscount
object

Apply manual discount on a subscription contract

customAttributes
array of objects

Add subscription attributes while creating subscription

customAttributes
string

Unique identifier of payment method id in Shopify.

Responses

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