LogoLogo
Shopper APIs reference
Shopper APIs reference
  • Shopper APIs reference
  • OAuth
    • Tokens
    • Access tokens
  • Shoppers
    • Shoppers
    • Addresses
    • Payment options
  • Browse (product discovery)
    • Categories
    • Products
    • Product variations
    • Pricing
    • Inventory status
    • Financing
    • Offers
    • Purchase plan
    • Find a purchase plan
    • Authorize a purchase plan
  • Cart
    • Apply a shopper to a cart
    • Line items
    • Billing address
    • Shipping address
    • Payment methods
    • Shipping options
    • Web checkout
    • Submit a cart
    • Apply or detach payment methods
    • Apply a shipping option
    • Carts
    • Cart offers
    • API trigger offer
    • Resume cart
    • Third-party subscription engine
    • Tax registration
    • Price override
  • Orders
    • Orders
    • Order lookup
    • Order address
    • Returns
  • Subscriptions
    • Manage a subscription
    • Manage the subscription's renewal plan
    • Immediate midterm change
    • Payment
    • Address
    • Orders
    • Pending actions
    • Retrieve subscriptions
    • Subscription billing and shipping addresses
Powered by GitBook
On this page
  1. Cart

Third-party subscription engine

PreviousResume cartNextTax registration

Last updated 10 months ago

Accept subscription information from third-party subscription engine

post

Accept Subscription Information (Including Billing Agreements) for supporting third-party subscription engine.

Use ECO billing optimization tool for third-party subscription engine.

Body
Responses
200
Successful response.
application/json
400
* Invalid Request
application/json
post
POST /v1/shoppers/me/carts/active (subscriptionInfo) HTTP/1.1
Host: api.digitalriver.com
Content-Type: application/json
Accept: */*
Content-Length: 424

{
  "cart": {
    "lineItems": {
      "lineItem": {
        "quantity": "2",
        "product": {
          "id": "1234"
        },
        "subscriptionInfo": {
          "autoRenewal": true,
          "terms": "subscription terms",
          "freeTrial": false,
          "startTime": "2020-08-01T00:00:00.000Z",
          "endTime": "2021-08-01T00:00:00.000Z",
          "billingAgreementId": "6ed70eb4-da79-46f1-9e7d-210c043d3c9e"
        },
        "billingOptimization": {
          "subscriptionId": "555444",
          "segmentId": "12",
          "renewalAttempNumber": 3
        }
      }
    },
    "chargeType": "customer_initiated"
  }
}
{
  "lineItems": {
    "lineItem": [
      {
        "subscriptionInfo": {
          "autoRenewal": true,
          "terms": "subscription term",
          "freeTrial": false,
          "startTime": "2020-08-01T00:00:00.000Z",
          "endTime": "2021-08-01T00:00:00.000Z",
          "billingAgreementId": "6ed70eb4-da79-46f1-9e7d-210c043d3c9e"
        },
        "billingOptimization": {
          "subscriptionId": "555444",
          "segmentId": "12",
          "renewalAttempNumber": 3
        }
      }
    ],
    "customAttributes": {
      "attribute": [
        {
          "name": "hasExternalSubscriptionInfo",
          "type": "Boolean",
          "value": true
        }
      ]
    },
    "chargeType": "customer_initiated"
  }
}