Retrieve Subscription Switch Charge Amount

The Retrieve Subscription Switch Charge Amount request retrieves the amount that would be charged to a shopper if you changed the subscription to a different plan, to a different quantity, or both. If the switch results in a negative balance, the value parameter is 0.00.

This request retrieves the new price only—it does not make any changes to the subscription. To change the subscription, use the Update Subscription request.

📘

Send a test request

Go to API Explorer to send a test request to our sandbox environment and receive a response in real time.

Request Content

No content is required in the request body. Enter the relevant information in the request URL as path and query string parameters:

services/2/recurring/subscriptions/{subscriptionId}/switch-charge-amount?param=value

For example:

https://sandbox.bluesnap.com/services/2/recurring/subscriptions/54321/switch-charge-amount?newplanid=1234567&newquantity=2&overrideamount=100

Path Parameters

Path parameterTypeRequiredDescription
{subscriptionId}integerrequiredUnique identifier BlueSnap assigns to the subscription.

Query String Parameters

Query string parameterTypeRequiredDescription
newplanidintegerrequiredUnique identifier for the plan that you want to retrieve the cost information from.

Enter the current planId to see the new cost with the current plan.
newquantityintegeroptionalNumber of subscriptions that you want to retrieve the combined cost for.
overrideamountdecimaloptionalAmount that you want to charge in the new subscription plan.

Response Details

Successful requests return the HTTP status code 200 OK and a response body with a price object that reflects the switched charge amount.

Examples

Request Example

curl -v -X GET https://sandbox.bluesnap.com/services/2/recurring/subscriptions/98989/switch-charge-amount?newplanid=111111 \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \ 
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=
curl -v -X GET https://sandbox.bluesnap.com/services/2/recurring/subscriptions/98989/switch-charge-amount?newplanid=111111&newquantity=2 \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \ 
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ='

Response Example

{
    "currency": "USD",
    "value": 15
}

API Explorer

To test out a basic API request, click the "Try It!" button in the right-hand column to test using the default, pre-populated sample values. To test with your own values, edit the parameter fields below. You'll see them populate in the right-hand column and you can click the "Try It!" button to submit your test request and see a response.

Language
Credentials
Header
Click Try It! to start a request and see the response here!