Definition
https://sandbox.bluesnap.com/services/2/recurring/subscriptions/:subscription-id/charges?{parameters}
Documentation
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 |
---|---|---|
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 |
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 |
gettotal | true = Include the number of total results in the response | gettotal=true |
fulldescription | true (default) = Return complete details for each subscription in the response false = Return limited information about each subscription | fulldescription=true |
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>
</charge>
<charge>
<charge-id>163191</charge-id>
<transaction-date>2016-07-08</transaction-date>
<amount>130.00</amount>
<currency>USD</currency>
</charge>
<charge>
<charge-id>163189</charge-id>
<transaction-date>2016-07-08</transaction-date>
<amount>100.00</amount>
<currency>USD</currency>
</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>
</charge>
</charges>
Example Description
Retrieve Charges
The example above shows how to retrieve all charges for a specific subscription. Results are limited to charges after charge ID 163193, and a maximum of 3 charges per page. Because fulldescription=false
, the response includes limited information, and you can use the charge IDs to retrieve more details about each charge.
Retrieve Charges with full description
The example above shows how to retrieve charges with their complete details, using the fulldescription=true
parameter (alternatively, you can just leave this parameter off, since the default is true).
Back to Top