Retrieve All Charges for a Subscription

The Retrieve All Subscription Charges request enables you to retrieve details about all charges that have been processed for an existing subscription.


📘

Send a test request

Go to API Explorer to send a test request to our sandbox environment and receive a response in real time.

Request Content

Enter any of the query parameters below into the request URL. For example:
services/2/recurring/subscriptions/121212/charges?pagesize=20&after=112233&gettotal=true

Query Parameters

Parameter NameDescriptionExample
pagesizePositive integer. Sets the maximum number of results to return (i.e. page size).
Default is 10 if not set.
Maximum is 500.
pagesize=20
afterCharge ID. The response will get the page of results after the specified ID (exclusive).after=112233
beforeCharge ID. The response will get the page of results before the specified ID (exclusive).before=556677
gettotaltrue = Include the number of total results in the responsegettotal=true
fulldescriptiontrue (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 contains the chargeList object.


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/json' \
-H 'Accept: application/json' \ 
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
curl -v -X GET https://sandbox.bluesnap.com/services/2/recurring/subscriptions/39511316/charges?pagesize=2&after=163375&fulldescription=true \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \ 
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '

Response Examples

{
    "totalResults": 42,
    "lastPage": false,
  	"charges": [
        {
            "amount": 80,
            "chargeId": 163193,
            "currency": "USD",
            "transactionDate": "2016-07-08",
            "transactionRegion": "US"
        },
        {
            "amount": 130,
            "chargeId": 163191,
            "currency": "USD",
            "transactionDate": "2016-07-08",
            "transactionRegion": "US"
        },
        {
            "amount": 100,
            "chargeId": 163189,
            "currency": "USD",
            "transactionDate": "2016-07-08",
            "transactionRegion": "US"
        }
    ]
}
{
    "lastPage": true,
  	"charges": [
        {
            "amount": 50,
            "vaultedShopperId": 19550460,
            "chargeInfo": {
                "fromDate": "2016-08-19",
                "toDate": "2016-09-19",
                "chargeType": "RECURRING"
            },
          "processingInfo": {
            "processingStatus": "SUCCESS",
            "authorizationCode": "624220",
            "transactionRegion": "US"
            },
            "chargeId": 163373,
            "paymentSource": {"creditCardInfo": {"creditCard": {
                "expirationYear": 2023,
                "cardLastFourDigits": "0026",
                "cardType": "VISA",
              	"cardSubType": "CREDIT", 
              	"cardCategory": "CLASSIC",
                "expirationMonth": "01"
            }}},
            "softDescriptor": "BLS*Merchant",
            "planId": 2186280,
            "currency": "USD",
            "transactionDate": "2016-08-01",
            "subscriptionId": 39511316,
            "transactionId": 38485436
        },
        {
            "amount": 13.2,
            "vaultedShopperId": 19550460,
            "chargeInfo": {
                "fromDate": "2016-07-19",
                "toDate": "2016-08-19",
                "chargeType": "INITIAL"
            },
          "processingInfo": {
            "processingStatus": "SUCCESS",
            "authorizationCode": "621458",
            "transactionRegion": "US"
            },
            "chargeId": 163275,
            "paymentSource": {"creditCardInfo": {"creditCard": {
                "expirationYear": 2025,
                "cardLastFourDigits": "0026",
                "cardType": "VISA",
              	"cardSubType": "CREDIT", 
              	"cardCategory": "CLASSIC",
                "expirationMonth": "01"
            }}},
            "softDescriptor": "BLS*Merchant",
            "planId": 2186278,
            "currency": "USD",
            "transactionDate": "2016-07-19",
            "subscriptionId": 39511316,
            "transactionId": 38485250
        }
    ]
}

API Explorer

To test out a basic API request, click the "Try It!" button in the right-hand column to test using the default, pre-populated sample values. To test with your own values, edit the parameter fields below. You'll see them populate in the right-hand column and you can click the "Try It!" button to submit your test request and see a response.

Back to Top

Language
Authorization
Header
Click Try It! to start a request and see the response here!