Subscription Groups

Subscription Group Signup

POST
/subscription_groups/signup.json

Creates multiple subscriptions at once under the same customer and consolidates them into a subscription group.

You must provide one and only one of the payer_id/payer_reference/payer_attributes for the customer attached to the group.

You must provide one and only one of the payment_profile_id/credit_card_attributes/bank_account_attributes for the payment profile attached to the group.

Only one of the subscriptions can have "primary": true attribute set.

When passing a product to a subscription you can use either product_id or product_handle or offer_id. You can also use custom_price instead. The subscription request examples below will be split into two sections. The first section, "Subscription Customization", will focus on passing different information with a subscription, such as components, calendar billing, and custom fields. These examples will presume you are using a secure chargify_token generated by Maxio.js (formerly Chargify.js).

Authorization

BasicAuth
AuthorizationBasic <token>

The username is a Maxio Chargify API key. The password is x.

In: header

Request Body

application/json

subscription_group*

Response Body

application/json

application/json

curl -X POST "https://example.com/subscription_groups/signup.json" \  -H "Content-Type: application/json" \  -d '{    "subscription_group": {      "payment_profile_id": 123,      "payer_id": 123,      "subscriptions": [        {          "product_id": 11,          "primary": true        },        {          "product_id": 12        },        {          "product_id": 13        }      ]    }  }'
{  "uid": "string",  "scheme": 0,  "customer_id": 0,  "payment_profile_id": 0,  "subscription_ids": [    0  ],  "primary_subscription_id": 0,  "next_assessment_at": "2019-08-24T14:15:22Z",  "state": "pending",  "cancel_at_end_of_period": true,  "subscriptions": [    {      "id": 0,      "reference": "string",      "product_id": 0,      "product_handle": null,      "product_price_point_id": 0,      "product_price_point_handle": "string",      "currency": "string",      "coupon_code": "string",      "total_revenue_in_cents": 0,      "balance_in_cents": 0    }  ],  "payment_collection_method": "automatic"}