---
title: "Purchase POST API"
method: POST
path: "/subscription/create"
---

# Purchase POST API

`POST /subscription/create`

## Request body

- object
  - `merchant_id` string, required — merchant public id
  - `og_cart_tracking` boolean — If omitted or true, then session_id is required. Otherwise, session_id is optional.
  - `session_id` string — Session Id, gotten from og_session_id cookie.
  - `merchant_order_id` string, required — Order ID in your system
  - `user` object — The customer being created; required fields can be updated by contacting support.
    - `user_id` string — Merchant User ID
    - `first_name` string
    - `last_name` string
    - `email` string
    - `phone_number` string
    - `extra_data` object
      - `key1` string
      - `key2` string
    - `price_code` string — An optional value that can be used to apply specific discounting to all subscriptions for the customer
    - `shipping_address` object
      - `first_name` string
      - `last_name` string
      - `label` string — optional
      - `company_name` string — optional
      - `address` string
      - `address2` string — optional
      - `city` string
      - `state_province_code` string
      - `zip_postal_code` string
      - `country_code` string
      - `phone` string
      - `fax` string — optional
      - `token_id` string — External merchant reference, optional
      - `store_id` string — optional
    - `billing_address` object
      - `first_name` string
      - `last_name` string
      - `label` string — optional
      - `company_name` string — optional
      - `address` string
      - `address2` string — optional
      - `city` string
      - `state_province_code` string
      - `zip_postal_code` string
      - `country_code` string
      - `phone` string
      - `fax` string — optional
      - `token_id` string — optional
  - `payment` object — Required fields can be configured via RC3
    - `cc_number` string — Last 4 digits of CC number - XXXXXXXXXXXXXXXX1234
    - `cc_holder` string — Encrypted credit card holder
    - `cc_exp_date` string — Encrypted credit card expiration date (format: MM/YYYY)
    - `label` string
    - `token_id` string
    - `cc_type` string — See Card Types in #credit-card-types
    - `payment_method` string — Method of payment - "paypal", "credit card", "applepay", or "googlepay"
  - `products` object — The products that this customer bought or subscribed to
    - `product` string — Merchant Product ID
    - `sku` string — product sku
    - `subscription_info` object
      - `price` string — Price of subscription. To be used with price lock.
      - `quantity` integer — Number of items
      - `first_order_place_date` string — Specify the placement date for the first recurring order of the subscription (format YYYY-MM-DD)
      - `initial_order_offset_days` string — Offset the first order placement date by x days (only used if first_order_place_date not present)
      - `multi_item_bundle_components` object[] — Creates a New Bundle Subscription. Bundle items will be created based on provided product ID and quantity. **The subscription product should be a bundle product_type while the products in the array needs to be standard products**
        - `product` string, required — The id of the product that is being added to the bundle
        - `quantity` integer, required — The quantity of the product being added
      - `components` string[] — Creates Legacy Bundles subscription. Strings in this array are product IDs associated with the parent subscription product.
      - `tracking_override` object
        - `product` string — Merchant Product ID for which to create the subscription - overrides product that was purchased
        - `every` integer — Frequency value - overrides tracked values (eg the 30 in 30 Days)
        - `every_period` integer — Frequency period type - overrides the tracked value: 1 = days, 2 = weeks, 3 = months, 4 = monthly
        - `offer` string — Incentive Offer ID to which the subscription will be associated with - overrides any tracked value.
      - `subscription_type` 'prepaid' — Can be set to 'prepaid' if you are creating a prepaid subscription. Merchant needs to be prepaid enabled to create be able to create it
      - `prepaid_orders_per_billing` integer — An integer greater than 2. This is the amount of orders that were paid for. It will only be used if subscription_type = 'prepaid'
      - `renewal_behavior` 'autorenew' | 'cancel' | 'downgrade' — Custom renewal behavior you want when checking out with a prepaid item. When the prepaid cycle for this subscription ends, this behavior will be followed
      - `rotation_ordinal` integer — An integer value greater than or equal to 0 used to determine the current progress of the rotating ordinal subscription.
      - `disable_free_trial` boolean — To be used with free trials, disables free trial functionality for the given subscription's product and reverts back to regular subscription creation flow.
    - `purchase_info` object
      - `quantity` integer — Number of items the customer checkedout with in the first order
      - `price` string — Price per unit for the first order (without discounts)
      - `discounted_price` string — Price after discount in the first order
      - `total` string — Total discounted price for the product in the first checkout order
      - `grantees` object[] — Array of grantees, no duplicates allowed.
        - `grantee` object — Grantee object to be associated with subscription
          - `name` string, required — Name of grantee
          - `external_id` string, required — External ID of grantee

## Response `200`

200

- object
  - `result` string
  - `subs_req_id` string

## Other responses

- `206` — 206
- `400` — 400
- `403` — 403

---

[API](https://skmtc.net/ordergroove/apis/ordergroove-restrpc.md) · [All operations](https://skmtc.net/ordergroove/apis/ordergroove-restrpc/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/ordergroove/ordergroove-restrpc/versions/ba97e740d08c/schema)
