Retrieve Subscription

Definition

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


The Retrieve Subscription request enables you to retrieve details of an existing subscription (a purchase with a recurring payment element), based on the subscription ID.

Request Content

Enter the subscription-id into the web service URL, in the format:
services/2/subscriptions/{subscription-id}
    For example:
    services/2/subscriptions/12345

networkTransactionInfo   object   optional. You can only include the inner element 'originalNetworkTransactionId' (refer to networkTransactionInfo)

📘

Use fulldescription parameter to retrieve all details

If you would like to receive details about all charges for the subscription in the response, include the fulldescription parameter in the web service URL. For example:
services/2/subscriptions/39486350?fulldescription=true

Response Details

If successful, the response HTTP status code is 200 OK.
The response contains the retrieved subscription resource (see subscription).
For details about possible errors, see: General Errors, Payment & Processor Errors, and Fraud Errors.


Examples

Request Examples

curl -v -X GET https://sandbox.bluesnap.com/services/2/subscriptions/5741000 \
-H 'Content-Type: application/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ='
curl -v -X GET https://sandbox.bluesnap.com/services/2/subscriptions/39486350?fulldescription=true \
-H 'Content-Type: application/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ='

Response Examples

<?xml version="1.0" encoding="UTF-8"?>
<subscription xmlns="http://ws.plimus.com">
  <subscription-id>39450214</subscription-id>
  <status>A</status>
  <underlying-sku-id>2178914</underlying-sku-id>
  <shopper-id>19484284</shopper-id>
  <credit-card>
    <card-last-four-digits>4444</card-last-four-digits>
    <card-type>Master Card</card-type>
    <card-sub-type>DEBIT</card-sub-type>
  </credit-card>
  <catalog-recurring-charge>
    <currency>USD</currency>
    <amount>1.00</amount>
  </catalog-recurring-charge>
  <charge-frequency>ONDEMAND</charge-frequency>
  <auto-renew>true</auto-renew>
  <last-charge-result>
    <result-code>SUCCESS</result-code>
  </last-charge-result>
  <subscription-charges>
    <url>https://sandbox.bluesnap.com/services/2/subscriptions/39450214/subscription-charges/50043</url>
    <url>https://sandbox.bluesnap.com/services/2/subscriptions/39450214/subscription-charges/48121</url>
  </subscription-charges>
</subscription>
<?xml version="1.0" encoding="UTF-8"?>
<subscription xmlns="http://ws.plimus.com">
   <subscription-id>39486350</subscription-id>
   <status>A</status>
   <underlying-sku-id>2178914</underlying-sku-id>
   <shopper-id>19505364</shopper-id>
   <credit-card>
      <card-last-four-digits>1111</card-last-four-digits>
      <card-type>Visa</card-type>
      <card-sub-type>CREDIT</card-sub-type>
      <card-category>CLASSIC</card-category>
   </credit-card>
   <catalog-recurring-charge>
      <currency>USD</currency>
      <amount>1.00</amount>
   </catalog-recurring-charge>
   <charge-frequency>ONDEMAND</charge-frequency>
   <auto-renew>true</auto-renew>
   <last-charge-result>
      <result-code>SUCCESS</result-code>
   </last-charge-result>
   <subscription-charges>
      <subscription-charge>
         <charge-info />
         <charge-invoice-info>
            <date-created>11-Nov-14</date-created>
            <invoice-id>38442304</invoice-id>
            <invoice-amount>5.00</invoice-amount>
            <invoice-currency>USD</invoice-currency>
         </charge-invoice-info>
      </subscription-charge>
      <subscription-charge>
         <charge-info>
            <charge-description>some text</charge-description>
         </charge-info>
         <charge-invoice-info>
            <date-created>11-Nov-15</date-created>
            <invoice-id>38442336</invoice-id>
            <invoice-amount>1.00</invoice-amount>
            <invoice-currency>USD</invoice-currency>
         </charge-invoice-info>
      </subscription-charge>
      <subscription-charge>
         <charge-info>
            <charge-description>some text</charge-description>
         </charge-info>
         <charge-invoice-info>
            <date-created>11-Nov-15</date-created>
            <invoice-id>38442334</invoice-id>
            <invoice-amount>1.00</invoice-amount>
            <invoice-currency>USD</invoice-currency>
         </charge-invoice-info>
      </subscription-charge>
   </subscription-charges>
</subscription>

Back to Top