The Retrieve All Subscription Charges request enables you to retrieve details about all charges that have been processed for an existing subscription.
Request Content
Enter any of the query parameters below into the request URL. For example:
services/2/recurring/subscriptions/:subscription-id/charges?pagesize=20&after=112233&gettotal=true
Query Parameters
Parameter Name | Description | Example |
---|---|---|
after | Charge ID. The response will get the page of results after the specified ID (exclusive). | after=112233 |
before | Charge ID. The response will get the page of results before the specified ID (exclusive). | before=556677 |
fulldescription | true (default) = Return complete details for each subscription in the response false = Return limited information about each subscription | fulldescription=true |
gettotal | true = Include the number of total results in the response | gettotal=true |
pagesize | Positive integer. Sets the maximum number of results to return (i.e. page size). Default is 10 if not set. Maximum is 500. | pagesize=20 |
Response Details
If successful, the response HTTP status code is 200 OK.
The response body contains the charges resource.
Examples
Request Examples
curl -v -X GET https://sandbox.bluesnap.com/services/2/recurring/subscriptions/4444/charges?pagesize=3&after=163193&fulldescription=false \
-H 'Content-Type: application/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
curl -v -X GET https://sandbox.bluesnap.com/services/2/recurring/subscriptions/39511316/charges?pagesize=2&after=163375&fulldescription=true \
-H 'Content-Type: application/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
Response Examples
HTTP/ 1.1 200 OK
<charges xmlns="http://ws.plimus.com">
<last-page>true</last-page>
<charge>
<charge-id>163193</charge-id>
<transaction-date>2016-07-08</transaction-date>
<amount>80.00</amount>
<currency>USD</currency>
<transaction-region>US</transaction-region>
</charge>
<charge>
<charge-id>163191</charge-id>
<transaction-date>2016-07-08</transaction-date>
<amount>130.00</amount>
<currency>USD</currency>
<transaction-region>US</transaction-region>
</charge>
<charge>
<charge-id>163189</charge-id>
<transaction-date>2016-07-08</transaction-date>
<amount>100.00</amount>
<currency>USD</currency>
<transaction-region>US</transaction-region>
</charge>
</charges>
HTTP/ 1.1 200 OK
<charges xmlns="http://ws.plimus.com">
<last-page>true</last-page>
<charge>
<charge-id>163373</charge-id>
<subscription-id>39511316</subscription-id>
<plan-id>2186280</plan-id>
<vaulted-shopper-id>19550460</vaulted-shopper-id>
<transaction-id>38485436</transaction-id>
<transaction-date>2016-08-01</transaction-date>
<amount>50.00</amount>
<currency>USD</currency>
<soft-descriptor>BLS*Merchant</soft-descriptor>
<payment-source>
<credit-card-info>
<credit-card>
<card-last-four-digits>0026</card-last-four-digits>
<card-type>VISA</card-type>
<expiration-month>01</expiration-month>
<expiration-year>2023</expiration-year>
</credit-card>
</credit-card-info>
</payment-source>
<charge-info>
<from-date>2016-08-19</from-date>
<to-date>2016-09-19</to-date>
<charge-type>RECURRING</charge-type>
</charge-info>
</charge>
<charge>
<charge-id>163275</charge-id>
<subscription-id>39511316</subscription-id>
<plan-id>2186278</plan-id>
<vaulted-shopper-id>19550460</vaulted-shopper-id>
<transaction-id>38485250</transaction-id>
<transaction-date>2016-07-19</transaction-date>
<amount>13.20</amount>
<currency>USD</currency>
<soft-descriptor>BLS*Merchant</soft-descriptor>
<payment-source>
<credit-card-info>
<credit-card>
<card-last-four-digits>0026</card-last-four-digits>
<card-type>VISA</card-type>
<expiration-month>01</expiration-month>
<expiration-year>2023</expiration-year>
</credit-card>
</credit-card-info>
</payment-source>
<charge-info>
<from-date>2016-07-19</from-date>
<to-date>2016-08-19</to-date>
<charge-type>INITIAL</charge-type>
</charge-info>
<processing-info>
<processing-status>SUCCESS</processing-status>
<transaction-region>US</transaction-region>
</processing-info>
</charge>
</charges>