MENU navbar-image

Introduction

This documentation aims to provide all the information you need to work with our API.

Base URL

https://app.subscriptionplus.net

Authenticating requests

This API is authenticated by sending an Authorization header with the value "Bearer {YOUR_API_KEY}".

All authenticated endpoints are marked with a requires authentication badge in the documentation below.

You can retrieve your token by visiting your dashboard and clicking Generate API token.

Endpoints

Get Customer details

requires authentication

Example request:
curl --request GET \
    --get "https://app.subscriptionplus.net/api/v1/customer/4662104293529?include=orders_count%2Ctotal_spent%2Csubscriptions.line_items" \
    --header "Authorization: Bearer {YOUR_API_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.subscriptionplus.net/api/v1/customer/4662104293529"
);

const params = {
    "include": "orders_count,total_spent,subscriptions.line_items",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_API_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": 4662104293529,
        "name": "Sabrina G. McGraw",
        "email": "[email protected]",
        "note": "VIP Customer",
        "avatar": null,
        "status": 1,
        "member_since": "2021-05-10T06:51:58.000000Z",
        "subscriptions": [
            {
                "id": 1200619673,
                "interval": "MONTH",
                "note": null,
                "customer_id": 4662104293529,
                "last_payment_status": null,
                "tags": [],
                "discount_code": null,
                "order_frequency": 1,
                "billing_frequency": 1,
                "next_billing_date": "2021-07-08T19:37:01.595686Z",
                "last_billing_attempt": "2021-06-29 14:49:42",
                "min_cycles": null,
                "max_cycles": null,
                "executed_cycles": 1,
                "currency_code": "USD",
                "type": "subscription",
                "status": "active",
                "currency_format": "$0.00",
                "line_items": [
                    {
                        "id": 60,
                        "product_id": 6137966461081,
                        "line_item_id": "c4538325-70e6-429a-8335-685d2b4649ba",
                        "variant_id": 38027906547865,
                        "subscription_id": 1200619673,
                        "title": "Folding Hex Wrench Set 3-10mm",
                        "selling_plan_name": "Delivery every month",
                        "variant_title": "AWS-11",
                        "image": "https://cdn.shopify.com/s/files/1/0531/8538/0505/products/park-tool-aws-12.jpg?v=1612770280",
                        "price": 11.69,
                        "quantity": 1,
                        "is_onetime": false,
                        "requires_shipping": 1,
                        "created_at": "2021-06-29T09:19:43.000000Z",
                        "updated_at": "2021-06-29T09:19:43.000000Z"
                    }
                ]
            },
            {
                "id": 1200586905,
                "interval": "MONTH",
                "note": null,
                "customer_id": 4662104293529,
                "last_payment_status": null,
                "tags": [],
                "discount_code": null,
                "order_frequency": 1,
                "billing_frequency": 1,
                "next_billing_date": "2021-07-08T19:37:01.621831Z",
                "last_billing_attempt": "2021-06-29 14:49:39",
                "min_cycles": null,
                "max_cycles": null,
                "executed_cycles": 1,
                "currency_code": "USD",
                "type": "subscription",
                "status": "active",
                "currency_format": "$0.00",
                "line_items": [
                    {
                        "id": 59,
                        "product_id": 6137965805721,
                        "line_item_id": "ea9c9b31-6df0-4c70-aa27-9152811aad39",
                        "variant_id": 38027905433753,
                        "subscription_id": 1200586905,
                        "title": "Fixie Stem",
                        "selling_plan_name": "Delivery every month",
                        "variant_title": "Black",
                        "image": "https://cdn.shopify.com/s/files/1/0531/8538/0505/products/Stem_Black_3RD_WEB.jpg?v=1612770273",
                        "price": 18,
                        "quantity": 1,
                        "is_onetime": false,
                        "requires_shipping": 1,
                        "created_at": "2021-06-29T09:19:40.000000Z",
                        "updated_at": "2021-06-29T09:19:40.000000Z"
                    }
                ]
            }
        ],
        "orders_count": 24,
        "total_spent": {
            "amount": 6298.97,
            "presentment_money": 0
        }
    }
}
 

Request      

GET api/v1/customer/{id}

URL Parameters

id  integer  

The ID of the customer.

Query Parameters

include  string  

Available includes orders_count,total_spent,subscriptions.line_items

App Settings

requires authentication

Example request:
curl --request GET \
    --get "https://app.subscriptionplus.net/api/v1/settings" \
    --header "Authorization: Bearer {YOUR_API_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.subscriptionplus.net/api/v1/settings"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/settings

URL Parameters

include  string  

Available includes: language.

GET api/v1/cancellation-reasons

requires authentication

Example request:
curl --request GET \
    --get "https://app.subscriptionplus.net/api/v1/cancellation-reasons" \
    --header "Authorization: Bearer {YOUR_API_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.subscriptionplus.net/api/v1/cancellation-reasons"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/cancellation-reasons

GET api/v1/get-selling-plan

requires authentication

Example request:
curl --request GET \
    --get "https://app.subscriptionplus.net/api/v1/get-selling-plan" \
    --header "Authorization: Bearer {YOUR_API_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.subscriptionplus.net/api/v1/get-selling-plan"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/get-selling-plan

Get subscription details

requires authentication

Example request:
curl --request POST \
    "https://app.subscriptionplus.net/api/v1/subscription/1200619673?include=line_items.product.variants%2Cline_items.available_products.variants%2Corders.line_items%2C+order%2Ccard%2Caddress%2Cupcoming_order%2Ccustomer.cards%2Cavailable_frequencies%2Cavailable_products.variants%2Ctotal" \
    --header "Authorization: Bearer {YOUR_API_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.subscriptionplus.net/api/v1/subscription/1200619673"
);

const params = {
    "include": "line_items.product.variants,line_items.available_products.variants,orders.line_items, order,card,address,upcoming_order,customer.cards,available_frequencies,available_products.variants,total",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_API_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/subscription/{id}

URL Parameters

id  integer  

The ID of the subscription

Query Parameters

include  string  

Available includes: line_items.product.variants,line_items.available_products.variants,orders.line_items, order,card,address,upcoming_order,customer.cards,available_frequencies,available_products.variants,total

Get subscription details

requires authentication

Example request:
curl --request POST \
    "https://app.subscriptionplus.net/api/v1/subscription/1200619673/available-products?include=qui" \
    --header "Authorization: Bearer {YOUR_API_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.subscriptionplus.net/api/v1/subscription/1200619673/available-products"
);

const params = {
    "include": "qui",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_API_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/subscription/{id}/available-products

URL Parameters

id  integer  

The ID of the subscription

Query Parameters

include  string  

Available includes: available_products.variants

POST api/v1/subscription/{id}/all-available-products

requires authentication

Example request:
curl --request POST \
    "https://app.subscriptionplus.net/api/v1/subscription/20/all-available-products" \
    --header "Authorization: Bearer {YOUR_API_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.subscriptionplus.net/api/v1/subscription/20/all-available-products"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/subscription/{id}/all-available-products

URL Parameters

id  integer  

The ID of the subscription.

GET api/v1/subscription/{id}/upsell-products

requires authentication

Example request:
curl --request GET \
    --get "https://app.subscriptionplus.net/api/v1/subscription/10/upsell-products" \
    --header "Authorization: Bearer {YOUR_API_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.subscriptionplus.net/api/v1/subscription/10/upsell-products"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/subscription/{id}/upsell-products

URL Parameters

id  integer  

The ID of the subscription.

Update status

requires authentication

Example request:
curl --request POST \
    "https://app.subscriptionplus.net/api/v1/subscription/20/status" \
    --header "Authorization: Bearer {YOUR_API_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"status\": \"active\"
}"
const url = new URL(
    "https://app.subscriptionplus.net/api/v1/subscription/20/status"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "status": "active"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/subscription/{id}/status

URL Parameters

id  integer  

The ID of the subscription.

Body Parameters

status  string  

Must be one of active, paused, or cancelled.

Update order frequency

requires authentication

Example request:
curl --request POST \
    "https://app.subscriptionplus.net/api/v1/subscription/18/update_frequency" \
    --header "Authorization: Bearer {YOUR_API_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"interval\": \"year\",
    \"order_frequency\": 13,
    \"billing_frequency\": 10
}"
const url = new URL(
    "https://app.subscriptionplus.net/api/v1/subscription/18/update_frequency"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "interval": "year",
    "order_frequency": 13,
    "billing_frequency": 10
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/subscription/{id}/update_frequency

URL Parameters

id  integer  

The ID of the subscription.

Body Parameters

interval  string  

Must be one of day, week, month, or year.

order_frequency  integer  

Must be one of available_frequencies from subscription details API

billing_frequency  integer  

Same as order_frequency if its not prepaid order

Update product variant/quantity

requires authentication

Example request:
curl --request POST \
    "https://app.subscriptionplus.net/api/v1/subscription/8/update_variant" \
    --header "Authorization: Bearer {YOUR_API_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"line_item_ids\": [
        20
    ],
    \"quantity\": [
        17
    ],
    \"product_ids\": [
        7
    ],
    \"variant_ids\": [
        10
    ]
}"
const url = new URL(
    "https://app.subscriptionplus.net/api/v1/subscription/8/update_variant"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "line_item_ids": [
        20
    ],
    "quantity": [
        17
    ],
    "product_ids": [
        7
    ],
    "variant_ids": [
        10
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/subscription/{id}/update_variant

URL Parameters

id  integer  

The ID of the subscription.

Body Parameters

line_item_ids  integer[]  

quantity  integer[]  

product_ids  integer[] optional  

Require for updating the product

variant_ids  integer[] optional  

Require for updating the product

Apply/Remove Discount

requires authentication

Example request:
curl --request POST \
    "https://app.subscriptionplus.net/api/v1/subscription/1/apply_discount" \
    --header "Authorization: Bearer {YOUR_API_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"code\": \"optio\"
}"
const url = new URL(
    "https://app.subscriptionplus.net/api/v1/subscription/1/apply_discount"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "code": "optio"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/subscription/{id}/apply_discount

URL Parameters

id  integer  

The ID of the subscription.

Body Parameters

code  string optional  

Pass null to remove discount

Add products to subscription

requires authentication

Example request:
curl --request POST \
    "https://app.subscriptionplus.net/api/v1/subscription/4/add_product" \
    --header "Authorization: Bearer {YOUR_API_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"product_ids\": [
        1
    ],
    \"variant_ids\": [
        1
    ],
    \"quantity\": [
        0
    ]
}"
const url = new URL(
    "https://app.subscriptionplus.net/api/v1/subscription/4/add_product"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "product_ids": [
        1
    ],
    "variant_ids": [
        1
    ],
    "quantity": [
        0
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/subscription/{id}/add_product

URL Parameters

id  integer  

The ID of the subscription.

Body Parameters

product_ids  number[]  

Must be at least 1.

variant_ids  number[]  

Must be at least 1.

quantity  number[]  

Must be at least 1.

Swap Product

requires authentication

Example request:
curl --request POST \
    "https://app.subscriptionplus.net/api/v1/subscription/13/swap_product" \
    --header "Authorization: Bearer {YOUR_API_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"line_item_id\": 3,
    \"product_id\": 5,
    \"variant_id\": 4
}"
const url = new URL(
    "https://app.subscriptionplus.net/api/v1/subscription/13/swap_product"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "line_item_id": 3,
    "product_id": 5,
    "variant_id": 4
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/subscription/{id}/swap_product

URL Parameters

id  integer  

The ID of the subscription.

Body Parameters

line_item_id  integer  

product_id  integer  

variant_id  integer  

Add one-time product to subscription

requires authentication

Example request:
curl --request POST \
    "https://app.subscriptionplus.net/api/v1/subscription/5/add_onetime_product" \
    --header "Authorization: Bearer {YOUR_API_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"product_ids\": [
        1
    ],
    \"variant_ids\": [
        1
    ],
    \"quantity\": [
        0
    ]
}"
const url = new URL(
    "https://app.subscriptionplus.net/api/v1/subscription/5/add_onetime_product"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "product_ids": [
        1
    ],
    "variant_ids": [
        1
    ],
    "quantity": [
        0
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/subscription/{id}/add_onetime_product

URL Parameters

id  integer  

The ID of the subscription.

Body Parameters

product_ids  number[]  

Must be at least 1.

variant_ids  number[]  

Must be at least 1.

quantity  number[]  

Must be at least 1.

Update shipping address

requires authentication

Example request:
curl --request POST \
    "https://app.subscriptionplus.net/api/v1/subscription/4/update_address" \
    --header "Authorization: Bearer {YOUR_API_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"address1\": \"voluptates\",
    \"city\": \"eveniet\",
    \"country\": \"reiciendis\",
    \"zip\": \"modi\",
    \"phone\": \"et\",
    \"first_name\": \"error\",
    \"last_name\": \"velit\",
    \"address2\": \"voluptatibus\",
    \"company\": \"cum\"
}"
const url = new URL(
    "https://app.subscriptionplus.net/api/v1/subscription/4/update_address"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "address1": "voluptates",
    "city": "eveniet",
    "country": "reiciendis",
    "zip": "modi",
    "phone": "et",
    "first_name": "error",
    "last_name": "velit",
    "address2": "voluptatibus",
    "company": "cum"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/subscription/{id}/update_address

URL Parameters

id  integer  

The ID of the subscription.

Body Parameters

address1  string  

city  string  

country  string  

zip  string  

phone  string  

first_name  string  

last_name  string  

address2  string optional  

company  string optional  

Update billing date

requires authentication

Example request:
curl --request POST \
    "https://app.subscriptionplus.net/api/v1/subscription/17/update_billing_date" \
    --header "Authorization: Bearer {YOUR_API_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"date\": \"et\"
}"
const url = new URL(
    "https://app.subscriptionplus.net/api/v1/subscription/17/update_billing_date"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "date": "et"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/subscription/{id}/update_billing_date

URL Parameters

id  integer  

The ID of the subscription.

Body Parameters

date  date  

YYYY-MM-DD

Date should be greater than last billing attempt date

Remove subscription item

requires authentication

Example request:
curl --request POST \
    "https://app.subscriptionplus.net/api/v1/subscription/4/remove_line_item/9" \
    --header "Authorization: Bearer {YOUR_API_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.subscriptionplus.net/api/v1/subscription/4/remove_line_item/9"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/subscription/{id}/remove_line_item/{line_item_id}

URL Parameters

id  integer  

The ID of the subscription.

line_item_id  integer  

Id of the subscription item

Swap subscription payment method

requires authentication

Example request:
curl --request POST \
    "https://app.subscriptionplus.net/api/v1/subscription/19/payment-method/laborum/update" \
    --header "Authorization: Bearer {YOUR_API_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.subscriptionplus.net/api/v1/subscription/19/payment-method/laborum/update"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/subscription/{id}/payment-method/{token}/update

URL Parameters

id  integer  

The ID of the subscription.

token  string  

Payment method token.

Ship now

requires authentication

Note: Not applicable for prepaid subscription

Example request:
curl --request POST \
    "https://app.subscriptionplus.net/api/v1/subscription/13/ship_now" \
    --header "Authorization: Bearer {YOUR_API_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"update_shipping_date\": false
}"
const url = new URL(
    "https://app.subscriptionplus.net/api/v1/subscription/13/ship_now"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "update_shipping_date": false
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/subscription/{id}/ship_now

URL Parameters

id  integer  

The ID of the subscription.

Body Parameters

update_shipping_date  boolean optional  

To change future billing date according to the current date

POST api/v1/subscription/{id}/upsell-products/buy

requires authentication

Example request:
curl --request POST \
    "https://app.subscriptionplus.net/api/v1/subscription/11/upsell-products/buy" \
    --header "Authorization: Bearer {YOUR_API_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"data\": [
        {
            \"product_id\": \"soluta\",
            \"variant_id\": \"velit\",
            \"subscribe\": true
        }
    ]
}"
const url = new URL(
    "https://app.subscriptionplus.net/api/v1/subscription/11/upsell-products/buy"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "data": [
        {
            "product_id": "soluta",
            "variant_id": "velit",
            "subscribe": true
        }
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/subscription/{id}/upsell-products/buy

URL Parameters

id  integer  

The ID of the subscription.

Body Parameters

data  object[] optional  

data[].product_id  string  

data[].variant_id  string  

data[].subscribe  boolean  

Add new payment method

requires authentication

Example request:
curl --request POST \
    "https://app.subscriptionplus.net/api/v1/customer/4662104293529/add-payment" \
    --header "Authorization: Bearer {YOUR_API_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.subscriptionplus.net/api/v1/customer/4662104293529/add-payment"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/customer/{id}/add-payment

URL Parameters

id  integer  

The ID of the customer.

Update payment method

requires authentication

Example request:
curl --request POST \
    "https://app.subscriptionplus.net/api/v1/payment-method/ut/update" \
    --header "Authorization: Bearer {YOUR_API_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.subscriptionplus.net/api/v1/payment-method/ut/update"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/payment-method/{token}/update

URL Parameters

token  string