{"_id":"5c6c23e4735b81006177d075","category":{"_id":"5c6c23e4735b81006177d00d","version":"5c6c23e4735b81006177d0a4","project":"57336fd5a6a9c40e00e13a0b","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-07-27T10:22:06.636Z","from_sync":false,"order":7,"slug":"subscriptions","title":"Subscriptions"},"parentDoc":null,"user":"560d5913af97231900938124","project":"57336fd5a6a9c40e00e13a0b","version":{"_id":"5c6c23e4735b81006177d0a4","project":"57336fd5a6a9c40e00e13a0b","__v":0,"forked_from":"5bedd214812951004a2ad9df","createdAt":"2018-04-24T15:22:41.561Z","releaseDate":"2018-04-24T15:22:41.561Z","categories":["5c6c23e4735b81006177d006","5c6c23e4735b81006177d007","5c6c23e4735b81006177d008","5c6c23e4735b81006177d009","5c6c23e4735b81006177d00a","5c6c23e4735b81006177d00b","5c6c23e4735b81006177d00c","5c6c23e4735b81006177d00d","5c6c23e4735b81006177d00e","5c6c23e4735b81006177d00f","5c6c23e4735b81006177d010","5c6c23e4735b81006177d011","5c6c23e4735b81006177d012","5c6c23e4735b81006177d013","5c6c23e4735b81006177d014"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":false,"codename":"Main","version_clean":"8976.0.0-JSON","version":"8976-JSON"},"githubsync":"","__v":5,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-07-29T17:16:53.270Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"language":"text","code":""}]},"settings":"57ee593a21ceb20e0061959e","examples":{"codes":[]},"method":"put","auth":"optional","params":[{"_id":"579b92475623be2200832642","ref":"","in":"path","required":true,"desc":"BlueSnap identifier for the subscription.","default":"","type":"int","name":"subscriptionId"}],"url":"/recurring/subscriptions/:subscriptionId"},"isReference":false,"order":6,"body":"The Update Subscription request enables you to change any of the following settings for an existing subscription:\n  * Plan associated to the subscription\n  * Payment source\n  * Override value for the recurring charge amount\n  * Auto-renew setting (if you set it to false, the subscription expires at the end of the current period)\n  * Next charge date\n  * Quantity\n  * Subscription status (ACTIVE/CANCELED)\n\nFor more information about working with subscriptions, see the [Subscriptions tutorial](doc:subscription-management#section-tutorial-subscriptions).\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Changing payment source\",\n  \"body\": \"To change the payment source associated with a subscription:  \\n\\n1. Make sure the payment details are saved to the shopper. If not, [update the vaulted shopper](doc:update-vaulted-shopper) with the details. \\n2. Update the subscription to specify the new payment source.\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Switch contract separately from other changes\",\n  \"body\": \"If you are switching the contract associated with the subscription, we recommend you do this in a separate API call from other changes, such as updating the payment source or overriding the recurring charge amount. \\n\\nFor example if you want to switch a subscription from plan 1 to plan 2 and also override the recurring charge amount for plan 2, we recommend that you first make an Update Subscription call to change the plan. Then make a separate call to override the recurring charge amount.\"\n}\n[/block]\n<a class=\"btn btn-success\" href=\"#section-api-explorer\" role=\"button\">Try it in the API Explorer</a>\n\n###Request Content\n\nSend a **[subscription](doc:recurring-subscription)** object, with the following:\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`planId` &nbsp;&nbsp;&nbsp; *integer* &nbsp;&nbsp;&nbsp;optional (**required** with `quantity`)\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`paymentSource` &nbsp;&nbsp;&nbsp; *object* &nbsp;&nbsp;&nbsp;optional (see [paymentSource](doc:payment-source))\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`overrideRecurringChargeAmount` &nbsp;&nbsp;&nbsp; *decimal* &nbsp;&nbsp;optional\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`autoRenew` &nbsp;&nbsp;&nbsp; *boolean* &nbsp;&nbsp;&nbsp;optional \n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`nextChargeDate` &nbsp;&nbsp;&nbsp; *string* &nbsp;&nbsp;&nbsp;optional\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`quantity` &nbsp;&nbsp;&nbsp; *integer* &nbsp;&nbsp;&nbsp;optional\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`status` &nbsp;&nbsp;&nbsp; *string* &nbsp;&nbsp;&nbsp;optional\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Note\",\n  \"body\": \"If you use the `quantity` parameter, you must include `planid` as well.  If you want to change the quantity on the current plan, enter the current `planId`. If you want to change the plan and the quantity, enter the new values for both.\"\n}\n[/block]\n###Response Details\nIf successful, the response HTTP status code is 200 OK.\nThe response contains the **[subscription](doc:recurring-subscription)** object.\n\n<hr>\n\n##Examples\n\n###Request Examples\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl -v -X PUT https://sandbox.bluesnap.com/services/2/recurring/subscriptions/8491543 \\\\\\n-H 'Content-Type: application/json' \\\\\\n-H 'Accept: application/json' \\\\ \\n-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \\\\\\n-d '\\n{\\\"planId\\\": 2283849}'\",\n      \"language\": \"curl\",\n      \"name\": \"Update Subscription Request: change plan\"\n    },\n    {\n      \"code\": \"curl -v -X PUT https://sandbox.bluesnap.com/services/2/recurring/subscriptions/8491543 \\\\\\n-H 'Content-Type: application/json' \\\\\\n-H 'Accept: application/json' \\\\ \\n-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \\\\\\n-d '\\n{\\\"status\\\": \\\"CANCELED\\\"}'\",\n      \"language\": \"curl\",\n      \"name\": \"cancel subscription\"\n    },\n    {\n      \"code\": \"curl -v -X PUT https://sandbox.bluesnap.com/services/2/recurring/subscriptions/8491543 \\\\\\n-H 'Content-Type: application/json' \\\\\\n-H 'Accept: application/json' \\\\ \\n-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \\\\\\n-d '\\n{\\\"nextChargeDate\\\": \\\"2017-10-01\\\"}'\",\n      \"language\": \"curl\",\n      \"name\": \"change next charge date\"\n    },\n    {\n      \"code\": \"curl -v -X PUT https://sandbox.bluesnap.com/services/2/recurring/subscriptions/8491543 \\\\\\n-H 'Content-Type: application/json' \\\\\\n-H 'Accept: application/json' \\\\ \\n-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \\\\\\n-d '\\n{  \\n  \\\"paymentSource\\\":{  \\n    \\\"creditCardInfo\\\":{  \\n      \\\"creditCard\\\":{  \\n        \\\"cardLastFourDigits\\\":\\\"9299\\\",\\n        \\\"cardType\\\":\\\"VISA\\\"\\n         }\\n      }\\n   }\\n}'\",\n      \"language\": \"curl\",\n      \"name\": \"Change payment source\"\n    },\n    {\n      \"code\": \"curl -v -X PUT https://sandbox.bluesnap.com/services/2/recurring/subscriptions/8491543 \\\\\\n-H 'Content-Type: application/json' \\\\\\n-H 'Accept: application/json' \\\\ \\n-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \\\\\\n-d '\\n\\n{  \\n   \\\"paymentSource\\\":{  \\n      \\\"creditCardInfo\\\":{  \\n         \\\"pfToken\\\":\\\"3f62200b744f70a07db549a8c9df11647f4c2442df9cb71a75026d0784fe1668_\\\"\\n      }\\n   }\\n}\",\n      \"language\": \"curl\",\n      \"name\": \"with hosted fields and new billing\"\n    },\n    {\n      \"code\": \"curl -v -X PUT https://sandbox.bluesnap.com/services/2/recurring/subscriptions/8491543 \\\\\\n-H 'Content-Type: application/json' \\\\\\n-H 'Accept: application/json' \\\\ \\n-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \\\\\\n-d '\\n{\\n   \\\"planId\\\": 2283849,\\n   \\\"quantity\\\": 2\\n}'\",\n      \"language\": \"curl\",\n      \"name\": \"with changed quantity\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]\n###Response Example\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n    \\\"nextChargeDate\\\": \\\"2016-08-16\\\",\\n    \\\"quantity\\\": 1,\\n    \\\"charge\\\": {\\n        \\\"amount\\\": 100,\\n        \\\"vaultedShopperId\\\": 21188909,\\n        \\\"chargeInfo\\\": {\\n            \\\"fromDate\\\": \\\"2016-08-02\\\",\\n            \\\"toDate\\\": \\\"2016-08-16\\\",\\n            \\\"chargeType\\\": \\\"INITIAL\\\"\\n        },\\n        \\\"chargeId\\\": 12117877,\\n        \\\"paymentSource\\\": {\\\"creditCardInfo\\\": {\\\"creditCard\\\": {\\n            \\\"expirationYear\\\": 2019,\\n            \\\"cardLastFourDigits\\\": 1111,\\n            \\\"cardSubType\\\": \\\"CREDIT\\\",\\n            \\\"cardType\\\": \\\"VISA\\\",\\n            \\\"expirationMonth\\\": \\\"07\\\"\\n        }}},\\n        \\\"softDescriptor\\\": \\\"BLS&#x2a;default_descriptor\\\",\\n        \\\"planId\\\": 2283845,\\n        \\\"currency\\\": \\\"USD\\\",\\n        \\\"transactionDate\\\": \\\"2016-08-02\\\",\\n        \\\"subscriptionId\\\": 8492717,\\n        \\\"transactionId\\\": 1012463333\\n    },\\n    \\\"trialPeriodDays\\\": 14,\\n    \\\"paymentSource\\\": {\\\"creditCardInfo\\\": {\\n        \\\"billingContactInfo\\\": {\\n            \\\"firstName\\\": \\\"John\\\",\\n            \\\"lastName\\\": \\\"Doe\\\"\\n        },\\n        \\\"creditCard\\\": {\\n            \\\"expirationYear\\\": 2019,\\n            \\\"cardLastFourDigits\\\": 1111,\\n            \\\"cardSubType\\\": \\\"CREDIT\\\",\\n          \\t\\\"cardCategory\\\": \\\"CLASSIC\\\",\\n            \\\"cardType\\\": \\\"VISA\\\",\\n            \\\"expirationMonth\\\": \\\"07\\\"\\n        }\\n    }},\\n    \\\"softDescriptor\\\": \\\"BLS&#x2a;default_descriptor\\\",\\n    \\\"recurringChargeAmount\\\": 29.99,\\n    \\\"chargeFrequency\\\": \\\"MONTHLY\\\",\\n    \\\"vaultedShopperId\\\": 21188909,\\n    \\\"payerInfo\\\": {\\n        \\\"firstName\\\": \\\"John\\\",\\n        \\\"lastName\\\": \\\"Doe\\\"\\n    },\\n    \\\"initialChargeAmount\\\": 100,\\n    \\\"autoRenew\\\": true,\\n    \\\"planId\\\": 2283849,\\n    \\\"currency\\\": \\\"USD\\\",\\n    \\\"subscriptionId\\\": 8492717,\\n    \\\"fraudResultInfo\\\": {\\\"deviceDataCollector\\\": \\\"N\\\"},\\n    \\\"status\\\": \\\"ACTIVE\\\"\\n}\",\n      \"language\": \"json\",\n      \"name\": \"200 OK Response:  Update Subscription\"\n    },\n    {\n      \"code\": \"{\\n   \\\"subscriptionId\\\":39598852,\\n   \\\"planId\\\":2205010,\\n   \\\"vaultedShopperId\\\":19641860,\\n   \\\"status\\\":\\\"ACTIVE\\\",\\n   \\\"quantity\\\":1,\\n   \\\"softDescriptor\\\":\\\"BLS*try\\\",\\n   \\\"chargeFrequency\\\":\\\"MONTHLY\\\",\\n   \\\"recurringChargeAmount\\\":1.99,\\n   \\\"currency\\\":\\\"USD\\\",\\n   \\\"autoRenew\\\":true,\\n   \\\"nextChargeDate\\\":\\\"2019-02-28\\\",\\n   \\\"payerInfo\\\":{  \\n      \\\"firstName\\\":\\\"PIFirstName\\\",\\n      \\\"lastName\\\":\\\"PILastName\\\",\\n      \\\"email\\\":\\\"tt:::at:::gmail.com\\\",\\n      \\\"country\\\":\\\"il\\\",\\n      \\\"address\\\":\\\"PIaddress1\\\",\\n      \\\"address2\\\":\\\"PIaddress2\\\",\\n      \\\"city\\\":\\\"PICity\\\",\\n      \\\"zip\\\":\\\"PIZip\\\"\\n   },\\n   \\\"paymentSource\\\":{  \\n      \\\"creditCardInfo\\\":{  \\n         \\\"billingContactInfo\\\":{  \\n            \\\"firstName\\\":\\\"HpfBiFirstName\\\",\\n            \\\"lastName\\\":\\\"HpfBiLastName\\\",\\n            \\\"address1\\\":\\\"HpfBiAddress1\\\",\\n            \\\"city\\\":\\\"HpfBiCity\\\",\\n            \\\"state\\\":\\\"MA\\\",\\n            \\\"zip\\\":\\\"HpfBiZip\\\",\\n            \\\"country\\\":\\\"us\\\"\\n         },\\n         \\\"creditCard\\\":{  \\n            \\\"cardLastFourDigits\\\":\\\"0005\\\",\\n            \\\"cardType\\\":\\\"AMEX\\\",\\n            \\\"cardCategory\\\":\\\"CORPORATE\\\",\\n            \\\"binCategory\\\":\\\"COMMERCIAL\\\",\\n            \\\"cardRegulated\\\":\\\"Y\\\",\\n            \\\"issuingBank\\\":\\\"AMERICAN EXPRESS US (CARS)\\\",\\n            \\\"expirationMonth\\\":\\\"11\\\",\\n            \\\"expirationYear\\\":\\\"2024\\\",\\n            \\\"issuingCountryCode\\\":\\\"US\\\"\\n         }\\n      }\\n   }\\n}\",\n      \"language\": \"json\",\n      \"name\": \"with hosted fields and new billing\"\n    },\n    {\n      \"code\": \"{\\n    \\\"nextChargeDate\\\": \\\"2016-08-16\\\",\\n    \\\"quantity\\\": 2,\\n    \\\"charge\\\": {\\n        \\\"amount\\\": 100,\\n        \\\"vaultedShopperId\\\": 21188909,\\n        \\\"chargeInfo\\\": {\\n            \\\"fromDate\\\": \\\"2016-08-02\\\",\\n            \\\"toDate\\\": \\\"2016-08-16\\\",\\n            \\\"chargeType\\\": \\\"INITIAL\\\"\\n        },\\n        \\\"chargeId\\\": 12117877,\\n        \\\"paymentSource\\\": {\\\"creditCardInfo\\\": {\\\"creditCard\\\": {\\n            \\\"expirationYear\\\": 2019,\\n            \\\"cardLastFourDigits\\\": 1111,\\n            \\\"cardSubType\\\": \\\"CREDIT\\\",\\n            \\\"cardType\\\": \\\"VISA\\\",\\n            \\\"expirationMonth\\\": \\\"07\\\"\\n        }}},\\n        \\\"softDescriptor\\\": \\\"BLS&#x2a;default_descriptor\\\",\\n        \\\"planId\\\": 2283845,\\n        \\\"currency\\\": \\\"USD\\\",\\n        \\\"transactionDate\\\": \\\"2016-08-02\\\",\\n        \\\"subscriptionId\\\": 8492717,\\n        \\\"transactionId\\\": 1012463333\\n    },\\n    \\\"trialPeriodDays\\\": 14,\\n    \\\"paymentSource\\\": {\\\"creditCardInfo\\\": {\\n        \\\"billingContactInfo\\\": {\\n            \\\"firstName\\\": \\\"John\\\",\\n            \\\"lastName\\\": \\\"Doe\\\"\\n        },\\n        \\\"creditCard\\\": {\\n            \\\"expirationYear\\\": 2019,\\n            \\\"cardLastFourDigits\\\": 1111,\\n            \\\"cardSubType\\\": \\\"CREDIT\\\",\\n          \\t\\\"cardCategory\\\": \\\"CLASSIC\\\",\\n            \\\"cardType\\\": \\\"VISA\\\",\\n            \\\"expirationMonth\\\": \\\"07\\\"\\n        }\\n    }},\\n    \\\"softDescriptor\\\": \\\"BLS&#x2a;default_descriptor\\\",\\n    \\\"recurringChargeAmount\\\": 59.98,\\n    \\\"chargeFrequency\\\": \\\"MONTHLY\\\",\\n    \\\"vaultedShopperId\\\": 21188909,\\n    \\\"payerInfo\\\": {\\n        \\\"firstName\\\": \\\"John\\\",\\n        \\\"lastName\\\": \\\"Doe\\\"\\n    },\\n    \\\"initialChargeAmount\\\": 100,\\n    \\\"autoRenew\\\": true,\\n    \\\"planId\\\": 2283849,\\n    \\\"currency\\\": \\\"USD\\\",\\n    \\\"subscriptionId\\\": 8492717,\\n    \\\"fraudResultInfo\\\": {\\\"deviceDataCollector\\\": \\\"N\\\"},\\n    \\\"status\\\": \\\"ACTIVE\\\"\\n}\",\n      \"language\": \"json\",\n      \"name\": \"with changed quantity\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]\n<a class=\"btn btn-primary\" href=\"#\" role=\"button\">Back to Top</a>\n\n<hr>\n\n##Example Descriptions\nTo update any subscription setting, simply send the relevant field within the request. No other fields are required.\n\n<br>\n<a class=\"btn btn-primary\" href=\"#\" role=\"button\">Back to Top</a>\n\n<hr>\n\n##API Explorer\nTo test out a call, in the `subscriptionId` field, enter the ID of an existing subscription (e.g. 8491543). In the Body Content field, paste in the JSON portion of the request and then click **Try it!**\n\n**Tip**: Use the JSON code below as a starting point. You can enter different parameters to see how your test scenario would work. *The request headers, including authorization, are already built in for you in this test area, so you should not include them here.*\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\\"nextChargeDate\\\": \\\"2017-07-01\\\"}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]","excerpt":"","slug":"update-subscription","type":"endpoint","title":"Update Subscription"}

putUpdate Subscription


Definition

{{ api_url }}{{ page_api_url }}

Parameters

Path Params

subscriptionId:
required
integer
BlueSnap identifier for the subscription.

Documentation

The Update Subscription request enables you to change any of the following settings for an existing subscription:

  • Plan associated to the subscription
  • Payment source
  • Override value for the recurring charge amount
  • Auto-renew setting (if you set it to false, the subscription expires at the end of the current period)
  • Next charge date
  • Quantity
  • Subscription status (ACTIVE/CANCELED)

For more information about working with subscriptions, see the Subscriptions tutorial.

Changing payment source

To change the payment source associated with a subscription:

  1. Make sure the payment details are saved to the shopper. If not, update the vaulted shopper with the details.
  2. Update the subscription to specify the new payment source.

Switch contract separately from other changes

If you are switching the contract associated with the subscription, we recommend you do this in a separate API call from other changes, such as updating the payment source or overriding the recurring charge amount.

For example if you want to switch a subscription from plan 1 to plan 2 and also override the recurring charge amount for plan 2, we recommend that you first make an Update Subscription call to change the plan. Then make a separate call to override the recurring charge amount.

Try it in the API Explorer

Request Content

Send a subscription object, with the following:

      planId     integer    optional (required with quantity)
      paymentSource     object    optional (see paymentSource)
      overrideRecurringChargeAmount     decimal   optional
      autoRenew     boolean    optional
      nextChargeDate     string    optional
      quantity     integer    optional
      status     string    optional

Note

If you use the quantity parameter, you must include planid as well. If you want to change the quantity on the current plan, enter the current planId. If you want to change the plan and the quantity, enter the new values for both.

Response Details

If successful, the response HTTP status code is 200 OK.
The response contains the subscription object.


Examples

Request Examples

curl -v -X PUT https://sandbox.bluesnap.com/services/2/recurring/subscriptions/8491543 \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \ 
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
{"planId": 2283849}'
curl -v -X PUT https://sandbox.bluesnap.com/services/2/recurring/subscriptions/8491543 \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \ 
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
{"status": "CANCELED"}'
curl -v -X PUT https://sandbox.bluesnap.com/services/2/recurring/subscriptions/8491543 \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \ 
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
{"nextChargeDate": "2017-10-01"}'
curl -v -X PUT https://sandbox.bluesnap.com/services/2/recurring/subscriptions/8491543 \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \ 
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
{  
  "paymentSource":{  
    "creditCardInfo":{  
      "creditCard":{  
        "cardLastFourDigits":"9299",
        "cardType":"VISA"
         }
      }
   }
}'
curl -v -X PUT https://sandbox.bluesnap.com/services/2/recurring/subscriptions/8491543 \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \ 
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '

{  
   "paymentSource":{  
      "creditCardInfo":{  
         "pfToken":"3f62200b744f70a07db549a8c9df11647f4c2442df9cb71a75026d0784fe1668_"
      }
   }
}
curl -v -X PUT https://sandbox.bluesnap.com/services/2/recurring/subscriptions/8491543 \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \ 
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
{
   "planId": 2283849,
   "quantity": 2
}'

Response Example

{
    "nextChargeDate": "2016-08-16",
    "quantity": 1,
    "charge": {
        "amount": 100,
        "vaultedShopperId": 21188909,
        "chargeInfo": {
            "fromDate": "2016-08-02",
            "toDate": "2016-08-16",
            "chargeType": "INITIAL"
        },
        "chargeId": 12117877,
        "paymentSource": {"creditCardInfo": {"creditCard": {
            "expirationYear": 2019,
            "cardLastFourDigits": 1111,
            "cardSubType": "CREDIT",
            "cardType": "VISA",
            "expirationMonth": "07"
        }}},
        "softDescriptor": "BLS&#x2a;default_descriptor",
        "planId": 2283845,
        "currency": "USD",
        "transactionDate": "2016-08-02",
        "subscriptionId": 8492717,
        "transactionId": 1012463333
    },
    "trialPeriodDays": 14,
    "paymentSource": {"creditCardInfo": {
        "billingContactInfo": {
            "firstName": "John",
            "lastName": "Doe"
        },
        "creditCard": {
            "expirationYear": 2019,
            "cardLastFourDigits": 1111,
            "cardSubType": "CREDIT",
          	"cardCategory": "CLASSIC",
            "cardType": "VISA",
            "expirationMonth": "07"
        }
    }},
    "softDescriptor": "BLS&#x2a;default_descriptor",
    "recurringChargeAmount": 29.99,
    "chargeFrequency": "MONTHLY",
    "vaultedShopperId": 21188909,
    "payerInfo": {
        "firstName": "John",
        "lastName": "Doe"
    },
    "initialChargeAmount": 100,
    "autoRenew": true,
    "planId": 2283849,
    "currency": "USD",
    "subscriptionId": 8492717,
    "fraudResultInfo": {"deviceDataCollector": "N"},
    "status": "ACTIVE"
}
{
   "subscriptionId":39598852,
   "planId":2205010,
   "vaultedShopperId":19641860,
   "status":"ACTIVE",
   "quantity":1,
   "softDescriptor":"BLS*try",
   "chargeFrequency":"MONTHLY",
   "recurringChargeAmount":1.99,
   "currency":"USD",
   "autoRenew":true,
   "nextChargeDate":"2019-02-28",
   "payerInfo":{  
      "firstName":"PIFirstName",
      "lastName":"PILastName",
      "email":"tt@gmail.com",
      "country":"il",
      "address":"PIaddress1",
      "address2":"PIaddress2",
      "city":"PICity",
      "zip":"PIZip"
   },
   "paymentSource":{  
      "creditCardInfo":{  
         "billingContactInfo":{  
            "firstName":"HpfBiFirstName",
            "lastName":"HpfBiLastName",
            "address1":"HpfBiAddress1",
            "city":"HpfBiCity",
            "state":"MA",
            "zip":"HpfBiZip",
            "country":"us"
         },
         "creditCard":{  
            "cardLastFourDigits":"0005",
            "cardType":"AMEX",
            "cardCategory":"CORPORATE",
            "binCategory":"COMMERCIAL",
            "cardRegulated":"Y",
            "issuingBank":"AMERICAN EXPRESS US (CARS)",
            "expirationMonth":"11",
            "expirationYear":"2024",
            "issuingCountryCode":"US"
         }
      }
   }
}
{
    "nextChargeDate": "2016-08-16",
    "quantity": 2,
    "charge": {
        "amount": 100,
        "vaultedShopperId": 21188909,
        "chargeInfo": {
            "fromDate": "2016-08-02",
            "toDate": "2016-08-16",
            "chargeType": "INITIAL"
        },
        "chargeId": 12117877,
        "paymentSource": {"creditCardInfo": {"creditCard": {
            "expirationYear": 2019,
            "cardLastFourDigits": 1111,
            "cardSubType": "CREDIT",
            "cardType": "VISA",
            "expirationMonth": "07"
        }}},
        "softDescriptor": "BLS&#x2a;default_descriptor",
        "planId": 2283845,
        "currency": "USD",
        "transactionDate": "2016-08-02",
        "subscriptionId": 8492717,
        "transactionId": 1012463333
    },
    "trialPeriodDays": 14,
    "paymentSource": {"creditCardInfo": {
        "billingContactInfo": {
            "firstName": "John",
            "lastName": "Doe"
        },
        "creditCard": {
            "expirationYear": 2019,
            "cardLastFourDigits": 1111,
            "cardSubType": "CREDIT",
          	"cardCategory": "CLASSIC",
            "cardType": "VISA",
            "expirationMonth": "07"
        }
    }},
    "softDescriptor": "BLS&#x2a;default_descriptor",
    "recurringChargeAmount": 59.98,
    "chargeFrequency": "MONTHLY",
    "vaultedShopperId": 21188909,
    "payerInfo": {
        "firstName": "John",
        "lastName": "Doe"
    },
    "initialChargeAmount": 100,
    "autoRenew": true,
    "planId": 2283849,
    "currency": "USD",
    "subscriptionId": 8492717,
    "fraudResultInfo": {"deviceDataCollector": "N"},
    "status": "ACTIVE"
}

Back to Top


Example Descriptions

To update any subscription setting, simply send the relevant field within the request. No other fields are required.



Back to Top


API Explorer

To test out a call, in the subscriptionId field, enter the ID of an existing subscription (e.g. 8491543). In the Body Content field, paste in the JSON portion of the request and then click Try it!

Tip: Use the JSON code below as a starting point. You can enter different parameters to see how your test scenario would work. The request headers, including authorization, are already built in for you in this test area, so you should not include them here.

{"nextChargeDate": "2017-07-01"}

User Information

Try It Out


put
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}