Update Subscription

Definition

https://sandbox.bluesnap.com/services/2/subscriptions/:subscription-id


The Update Subscription request enables you to update the settings of an existing subscription in your account.

📘

Notes

Changing the payment source

If you wish to change the payment source associated with the subscription:

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

Changing the quantity
If you use the quantity parameter, you must include underlying-sku-id as well. If you want to change the quantity of the current plan, enter the current underlying-sku-id. If you want to change the plan and quantity, enter new values for both.


Request Content

subscription    required, contains the following ref:subscription)):

PropertyTypeRequired
statusstringoptional
cancellation-reasonstringoptional, 50-character limit
underlying-sku-idlongoptional
underlying-sku-namestringoptional
shopper-idlongoptional
credit-cardcontaineroptional (see credit-card)
paypalstringoptional
paypal-subscriptioncontaineroptional (see paypal-subscription)
override-recurring-chargecontaineroptional (see override-recurring-charge)
couponstringoptional
next-charge-datedateoptional
quantityintegeroptional, value must be greater than zero
auto-renewbooleanoptional

Response Details

If successful, the response HTTP status code is 204 No Content.
For details about possible errors, see: General Errors, Payment & Processor Errors, and Fraud Errors.


Examples

Request Examples

curl -v -X PUT https://sandbox.bluesnap.com/services/2/subscriptions/39469016 \
-H 'Content-Type: application/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
<subscription xmlns="http://ws.plimus.com">
  <subscription-id>39469016</subscription-id>
  <status>C</status>
</subscription>'
curl -v -X PUT https://sandbox.bluesnap.com/services/2/subscriptions/5741000 \
-H 'Content-Type: application/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
<subscription xmlns="http://ws.plimus.com">
  <override-recurring-charge>
    <currency>USD</currency>
    <amount>111.99</amount>
  </override-recurring-charge>
</subscription>'
curl -v -X PUT https://sandbox.bluesnap.com/services/2/subscriptions/39469016 \
-H 'Content-Type: application/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
<subscription xmlns="http://ws.plimus.com">
  <next-charge-date>15-Sep-18</next-charge-date>
</subscription>'
curl -v -X PUT https://sandbox.bluesnap.com/services/2/subscriptions/39469016 \
-H 'Content-Type: application/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
<subscription xmlns="http://ws.plimus.com">
  <credit-card>
    <card-last-four-digits>0126</card-last-four-digits>
    <card-type>VISA</card-type>
  </credit-card>
</subscription>'
curl -v -X PUT https://sandbox.bluesnap.com/services/2/subscriptions/39469016 \
-H 'Content-Type: application/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
<subscription xmlns="http://ws.plimus.com">
  <subscription-id>39469016</subscription-id>
  <status>A</status>
  <coupon>100off</coupon>
  <shopper-id>19505364</shopper-id>
  <underlying-sku-id>1234567</underlying-sku-id>
</subscription>'
curl -v -X PUT https://sandbox.bluesnap.com/services/2/subscriptions/39469016 \
-H 'Content-Type: application/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
<subscription xmlns="http://ws.plimus.com">
  <subscription-id>39469016</subscription-id>
  <auto-renew>true</auto-renew>
</subscription>'
curl -v -X PUT https://sandbox.bluesnap.com/services/2/subscriptions/39469016 \
-H 'Content-Type: application/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
<subscription xmlns="http://ws.plimus.com">
  <subscription-id>39469016</subscription-id>
  <status>A</status>
  <underlying-sku-id>2181034</underlying-sku-id>
  <shopper-id>19505364</shopper-id>
</subscription>'
curl -v -X PUT https://sandbox.bluesnap.com/services/2/subscriptions/39469016 \
-H 'Content-Type: application/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
<subscription xmlns="http://ws.plimus.com">
  <subscription-id>39469016</subscription-id>
  <underlying-sku-id>1234522</underlying-sku-id>
  <quantity>2</quantity>
</subscription>'
curl -v -X PUT https://sandbox.bluesnap.com/services/2/subscriptions/39599906 \
-H 'Content-Type: application/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
<subscription xmlns="http://ws.plimus.com">
  <underlying-sku-name>new name</underlying-sku-name>
</subscription>'

Response Example

HTTP/ 1.1 204 No Content

Back to Top