Search…
Using the Expired Card Optimizer
Learn how to use the Expired Card Optimizer (ECO) for a third-party subscription engine renewal orders.
The Expired Card Optimizer (ECO) is a Billing Optimization feature used to optimize the subscription renewal for credit cards only. It is designed to renew orders for the Digital River subscription engine as described in Providing subscription information. However, you can use the ECO to renew subscriptions for a third-party subscription engine (that is, a non-Digital River subscription engine) as described below.

Renewing subscriptions that do not use the Digital River subscription engine

To use ECO to renew a subscription that does not use the Digital River subscription engine, insert both the subscriptionInfo and billingOptimization in the lineItem array when you create a cart using POST /v1/shoppers/me/carts/active for a third-party subscription engine.
Only provide the information used in this example to renew orders when you are not using the Digital River subscription engine. An expired credit card does not occur during the initial acquisition, so this information is not required during the initial acquisition.
cURL
1
curl --location --request POST 'https://api.digitalriver.com/v1/shoppers/me/carts/active' \
2
--header 'Content-Type: application/json' \
3
--header 'Authorization: Bearer {{Token}}' \
4
--data-raw '{
5
"cart": {
6
"ipAddress": "{{BrowserIP}}",
7
"lineItems": {
8
"lineItem": [
9
{
10
"quantity": 2,
11
"product": {
12
"id": "{{productId}}"
13
}
14
"billingOptimization": {
15
"subscriptionId": "{{SubscriptionId}}",
16
"segmentId": "{{SubscriptionId}}"+"{{segmentCount}}",
17
"renewalAttemptNumber": 3
18
}
19
"subscriptionInfo": {
20
"autoRenewal": true,
21
"terms": "I agree to have client charge all my future bills on this card",
22
"freeTrial": false,
23
"startTime": "2020-08-01T00:00:00.000Z",
24
"endTime": "2021-08-01T00:00:00.000Z",
25
"billingAgreementId": "{{BillingAgreementID}}"
26
}
27
}
28
]
29
},
30
"chargeType": "merchant_initiated"
31
}
32
}'
Copied!
Parameter
Definition
subscriptionInfo
The subscription information should indicate the order uses a third-party subscription engine. Note that Digital River does not validate data from non-Digital River subscription engines.
billingOptimization
To trigger an ECO, provide the following subscription information under billingOptimization:
  • subscriptionId–The subscription's unique identifier. The subscriptionId is a string of up to 32 characters.
  • segmentId–The unique segment identifier for each renewal term must be unique across all of Digital River's client's subscriptions. The segmentId is a string of up to 32 characters.
    The segment identifier value changes after each renewal attempt and increments upwards (for example, 7654321seg2, 7654321seg3).
    You can format the segmentId as follows:
    "segmentId": "{{subscriptionId}}"+{{segmentCount}}",
    Where the value for subscriptionId is a string of up to 32 characters.
  • renewalAttemptNumber–The number of billing attempts for the current renewal. Then the value resets to 1 after each successful renewal. At the time of the first renewal attempt, ECO generates an incremented expiration date schedule that lives in a Billing Optimization table.
The renewal orders for a Digital River subscription provide all necessary information. Therefore, there is no need for you to manually insert this information.
Last modified 2mo ago