Skip to main content
GET
/
subscriptions
/
cp
/
api
/
subscription-billing-attempts
/
past-orders
/
report
Get past orders report with detailed filtering
curl --request GET \
  --url https://www.myshop.com/apps/subscriptions/cp/api/subscription-billing-attempts/past-orders/report
import requests

url = "https://www.myshop.com/apps/subscriptions/cp/api/subscription-billing-attempts/past-orders/report"

response = requests.get(url)

print(response.text)
const options = {method: 'GET'};

fetch('https://www.myshop.com/apps/subscriptions/cp/api/subscription-billing-attempts/past-orders/report', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
const url = 'https://www.myshop.com/apps/subscriptions/cp/api/subscription-billing-attempts/past-orders/report';
const options = {method: 'GET'};

fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://www.myshop.com/apps/subscriptions/cp/api/subscription-billing-attempts/past-orders/report",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://www.myshop.com/apps/subscriptions/cp/api/subscription-billing-attempts/past-orders/report"

req, _ := http.NewRequest("GET", url, nil)

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
require 'uri'
require 'net/http'

url = URI("https://www.myshop.com/apps/subscriptions/cp/api/subscription-billing-attempts/past-orders/report")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
[
  {
    "subscriptionBillingAttempt": {
      "retryingNeeded": true,
      "shop": "<string>",
      "applyUsageCharge": true,
      "attemptCount": 123,
      "attemptTime": "2023-11-07T05:31:56Z",
      "billingAttemptId": "<string>",
      "billingAttemptResponseMessage": "<string>",
      "billingDate": "2023-11-07T05:31:56Z",
      "consolidatedIntoAttemptId": 123,
      "contractId": 123,
      "graphOrderId": "<string>",
      "id": 123,
      "inventorySkippedAttemptCount": 123,
      "inventorySkippedRetryingNeeded": true,
      "lastShippingUpdatedAt": "2023-11-07T05:31:56Z",
      "orderAmount": 123,
      "orderAmountContractCurrency": 123,
      "orderAmountShopCurrency": 123,
      "orderAmountUSD": 123,
      "orderId": 123,
      "orderName": "<string>",
      "orderNote": "<string>",
      "progressAttemptCount": 123,
      "recurringChargeId": 123,
      "transactionRate": 123
    },
    "subscriptionContractDetails": {
      "shop": "<string>",
      "activatedOn": "2023-11-07T05:31:56Z",
      "allowDeliveryAddressOverride": true,
      "allowDeliveryPriceOverride": true,
      "autoCharge": true,
      "billingCountryCode": "<string>",
      "billingDateAfterTrial": "2023-11-07T05:31:56Z",
      "billingPolicyInterval": "<string>",
      "billingPolicyIntervalCount": 123,
      "cancellationFeedback": "<string>",
      "cancellationNote": "<string>",
      "cancelledOn": "2023-11-07T05:31:56Z",
      "contractAmount": 123,
      "contractAmountUSD": 123,
      "contractDetailsJSON": "<string>",
      "createdAt": "2023-11-07T05:31:56Z",
      "currencyCode": "<string>",
      "customerEmail": "<string>",
      "customerFirstName": "<string>",
      "customerId": 123,
      "customerLastName": "<string>",
      "customerName": "<string>",
      "customerTag": "<string>",
      "deletedVariantIds": "<string>",
      "deliveryCountryCode": "<string>",
      "deliveryPolicyInterval": "<string>",
      "deliveryPolicyIntervalCount": 123,
      "disableFixEmptyQueue": true,
      "emailBouncedOrFailed": true,
      "endsAt": "2023-11-07T05:31:56Z",
      "graphCustomerId": "<string>",
      "graphOrderId": "<string>",
      "graphSubscriptionContractId": "<string>",
      "id": 123,
      "importedId": "<string>",
      "lastSuccessfulOrder": "<string>",
      "lifetimeValue": 123,
      "lifetimeValueUSD": 123,
      "maxCycles": 123,
      "minCycles": 123,
      "nextBillingDate": "2023-11-07T05:31:56Z",
      "orderAmount": 123,
      "orderAmountContractCurrency": 123,
      "orderAmountShopCurrency": 123,
      "orderAmountUSD": 123,
      "orderId": 123,
      "orderName": "<string>",
      "orderNote": "<string>",
      "orderNoteAttributes": "<string>",
      "originalContractId": 123,
      "pauseDurationCycle": 123,
      "pauseFeedback": "<string>",
      "pauseReason": "<string>",
      "pauseTillDate": "2023-11-07T05:31:56Z",
      "pausedFromActive": true,
      "pausedOn": "2023-11-07T05:31:56Z",
      "pendingCancellationCycle": 123,
      "pendingCancellationDate": "2023-11-07T05:31:56Z",
      "phone": "<string>",
      "queueUpdatedAt": "2023-11-07T05:31:56Z",
      "skipPaymentCreateUnpaidOrder": true,
      "startsAt": "2023-11-07T05:31:56Z",
      "status": "<string>",
      "stopUpComingOrderEmail": true,
      "subscriptionContractId": 123,
      "subscriptionCreatedEmailSent": true,
      "subscriptionTypeIdentifier": "<string>",
      "totalSuccessfulOrders": 123,
      "upcomingEmailBufferDays": 123,
      "upcomingEmailTaskUrl": "<string>",
      "updatedAt": "2023-11-07T05:31:56Z",
      "updatingQueue": true
    }
  }
]
[
{
"subscriptionBillingAttempt": {
"retryingNeeded": true,
"shop": "<string>",
"applyUsageCharge": true,
"attemptCount": 123,
"attemptTime": "2023-11-07T05:31:56Z",
"billingAttemptId": "<string>",
"billingAttemptResponseMessage": "<string>",
"billingDate": "2023-11-07T05:31:56Z",
"consolidatedIntoAttemptId": 123,
"contractId": 123,
"graphOrderId": "<string>",
"id": 123,
"inventorySkippedAttemptCount": 123,
"inventorySkippedRetryingNeeded": true,
"lastShippingUpdatedAt": "2023-11-07T05:31:56Z",
"orderAmount": 123,
"orderAmountContractCurrency": 123,
"orderAmountShopCurrency": 123,
"orderAmountUSD": 123,
"orderId": 123,
"orderName": "<string>",
"orderNote": "<string>",
"progressAttemptCount": 123,
"recurringChargeId": 123,
"transactionRate": 123
},
"subscriptionContractDetails": {
"shop": "<string>",
"activatedOn": "2023-11-07T05:31:56Z",
"allowDeliveryAddressOverride": true,
"allowDeliveryPriceOverride": true,
"autoCharge": true,
"billingCountryCode": "<string>",
"billingDateAfterTrial": "2023-11-07T05:31:56Z",
"billingPolicyInterval": "<string>",
"billingPolicyIntervalCount": 123,
"cancellationFeedback": "<string>",
"cancellationNote": "<string>",
"cancelledOn": "2023-11-07T05:31:56Z",
"contractAmount": 123,
"contractAmountUSD": 123,
"contractDetailsJSON": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"currencyCode": "<string>",
"customerEmail": "<string>",
"customerFirstName": "<string>",
"customerId": 123,
"customerLastName": "<string>",
"customerName": "<string>",
"customerTag": "<string>",
"deletedVariantIds": "<string>",
"deliveryCountryCode": "<string>",
"deliveryPolicyInterval": "<string>",
"deliveryPolicyIntervalCount": 123,
"disableFixEmptyQueue": true,
"emailBouncedOrFailed": true,
"endsAt": "2023-11-07T05:31:56Z",
"graphCustomerId": "<string>",
"graphOrderId": "<string>",
"graphSubscriptionContractId": "<string>",
"id": 123,
"importedId": "<string>",
"lastSuccessfulOrder": "<string>",
"lifetimeValue": 123,
"lifetimeValueUSD": 123,
"maxCycles": 123,
"minCycles": 123,
"nextBillingDate": "2023-11-07T05:31:56Z",
"orderAmount": 123,
"orderAmountContractCurrency": 123,
"orderAmountShopCurrency": 123,
"orderAmountUSD": 123,
"orderId": 123,
"orderName": "<string>",
"orderNote": "<string>",
"orderNoteAttributes": "<string>",
"originalContractId": 123,
"pauseDurationCycle": 123,
"pauseFeedback": "<string>",
"pauseReason": "<string>",
"pauseTillDate": "2023-11-07T05:31:56Z",
"pausedFromActive": true,
"pausedOn": "2023-11-07T05:31:56Z",
"pendingCancellationCycle": 123,
"pendingCancellationDate": "2023-11-07T05:31:56Z",
"phone": "<string>",
"queueUpdatedAt": "2023-11-07T05:31:56Z",
"skipPaymentCreateUnpaidOrder": true,
"startsAt": "2023-11-07T05:31:56Z",
"status": "<string>",
"stopUpComingOrderEmail": true,
"subscriptionContractId": 123,
"subscriptionCreatedEmailSent": true,
"subscriptionTypeIdentifier": "<string>",
"totalSuccessfulOrders": 123,
"upcomingEmailBufferDays": 123,
"upcomingEmailTaskUrl": "<string>",
"updatedAt": "2023-11-07T05:31:56Z",
"updatingQueue": true
}
}
]
[
{
"subscriptionBillingAttempt": {
"retryingNeeded": true,
"shop": "<string>",
"applyUsageCharge": true,
"attemptCount": 123,
"attemptTime": "2023-11-07T05:31:56Z",
"billingAttemptId": "<string>",
"billingAttemptResponseMessage": "<string>",
"billingDate": "2023-11-07T05:31:56Z",
"consolidatedIntoAttemptId": 123,
"contractId": 123,
"graphOrderId": "<string>",
"id": 123,
"inventorySkippedAttemptCount": 123,
"inventorySkippedRetryingNeeded": true,
"lastShippingUpdatedAt": "2023-11-07T05:31:56Z",
"orderAmount": 123,
"orderAmountContractCurrency": 123,
"orderAmountShopCurrency": 123,
"orderAmountUSD": 123,
"orderId": 123,
"orderName": "<string>",
"orderNote": "<string>",
"progressAttemptCount": 123,
"recurringChargeId": 123,
"transactionRate": 123
},
"subscriptionContractDetails": {
"shop": "<string>",
"activatedOn": "2023-11-07T05:31:56Z",
"allowDeliveryAddressOverride": true,
"allowDeliveryPriceOverride": true,
"autoCharge": true,
"billingCountryCode": "<string>",
"billingDateAfterTrial": "2023-11-07T05:31:56Z",
"billingPolicyInterval": "<string>",
"billingPolicyIntervalCount": 123,
"cancellationFeedback": "<string>",
"cancellationNote": "<string>",
"cancelledOn": "2023-11-07T05:31:56Z",
"contractAmount": 123,
"contractAmountUSD": 123,
"contractDetailsJSON": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"currencyCode": "<string>",
"customerEmail": "<string>",
"customerFirstName": "<string>",
"customerId": 123,
"customerLastName": "<string>",
"customerName": "<string>",
"customerTag": "<string>",
"deletedVariantIds": "<string>",
"deliveryCountryCode": "<string>",
"deliveryPolicyInterval": "<string>",
"deliveryPolicyIntervalCount": 123,
"disableFixEmptyQueue": true,
"emailBouncedOrFailed": true,
"endsAt": "2023-11-07T05:31:56Z",
"graphCustomerId": "<string>",
"graphOrderId": "<string>",
"graphSubscriptionContractId": "<string>",
"id": 123,
"importedId": "<string>",
"lastSuccessfulOrder": "<string>",
"lifetimeValue": 123,
"lifetimeValueUSD": 123,
"maxCycles": 123,
"minCycles": 123,
"nextBillingDate": "2023-11-07T05:31:56Z",
"orderAmount": 123,
"orderAmountContractCurrency": 123,
"orderAmountShopCurrency": 123,
"orderAmountUSD": 123,
"orderId": 123,
"orderName": "<string>",
"orderNote": "<string>",
"orderNoteAttributes": "<string>",
"originalContractId": 123,
"pauseDurationCycle": 123,
"pauseFeedback": "<string>",
"pauseReason": "<string>",
"pauseTillDate": "2023-11-07T05:31:56Z",
"pausedFromActive": true,
"pausedOn": "2023-11-07T05:31:56Z",
"pendingCancellationCycle": 123,
"pendingCancellationDate": "2023-11-07T05:31:56Z",
"phone": "<string>",
"queueUpdatedAt": "2023-11-07T05:31:56Z",
"skipPaymentCreateUnpaidOrder": true,
"startsAt": "2023-11-07T05:31:56Z",
"status": "<string>",
"stopUpComingOrderEmail": true,
"subscriptionContractId": 123,
"subscriptionCreatedEmailSent": true,
"subscriptionTypeIdentifier": "<string>",
"totalSuccessfulOrders": 123,
"upcomingEmailBufferDays": 123,
"upcomingEmailTaskUrl": "<string>",
"updatedAt": "2023-11-07T05:31:56Z",
"updatingQueue": true
}
}
]
[
{
"subscriptionBillingAttempt": {
"retryingNeeded": true,
"shop": "<string>",
"applyUsageCharge": true,
"attemptCount": 123,
"attemptTime": "2023-11-07T05:31:56Z",
"billingAttemptId": "<string>",
"billingAttemptResponseMessage": "<string>",
"billingDate": "2023-11-07T05:31:56Z",
"consolidatedIntoAttemptId": 123,
"contractId": 123,
"graphOrderId": "<string>",
"id": 123,
"inventorySkippedAttemptCount": 123,
"inventorySkippedRetryingNeeded": true,
"lastShippingUpdatedAt": "2023-11-07T05:31:56Z",
"orderAmount": 123,
"orderAmountContractCurrency": 123,
"orderAmountShopCurrency": 123,
"orderAmountUSD": 123,
"orderId": 123,
"orderName": "<string>",
"orderNote": "<string>",
"progressAttemptCount": 123,
"recurringChargeId": 123,
"transactionRate": 123
},
"subscriptionContractDetails": {
"shop": "<string>",
"activatedOn": "2023-11-07T05:31:56Z",
"allowDeliveryAddressOverride": true,
"allowDeliveryPriceOverride": true,
"autoCharge": true,
"billingCountryCode": "<string>",
"billingDateAfterTrial": "2023-11-07T05:31:56Z",
"billingPolicyInterval": "<string>",
"billingPolicyIntervalCount": 123,
"cancellationFeedback": "<string>",
"cancellationNote": "<string>",
"cancelledOn": "2023-11-07T05:31:56Z",
"contractAmount": 123,
"contractAmountUSD": 123,
"contractDetailsJSON": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"currencyCode": "<string>",
"customerEmail": "<string>",
"customerFirstName": "<string>",
"customerId": 123,
"customerLastName": "<string>",
"customerName": "<string>",
"customerTag": "<string>",
"deletedVariantIds": "<string>",
"deliveryCountryCode": "<string>",
"deliveryPolicyInterval": "<string>",
"deliveryPolicyIntervalCount": 123,
"disableFixEmptyQueue": true,
"emailBouncedOrFailed": true,
"endsAt": "2023-11-07T05:31:56Z",
"graphCustomerId": "<string>",
"graphOrderId": "<string>",
"graphSubscriptionContractId": "<string>",
"id": 123,
"importedId": "<string>",
"lastSuccessfulOrder": "<string>",
"lifetimeValue": 123,
"lifetimeValueUSD": 123,
"maxCycles": 123,
"minCycles": 123,
"nextBillingDate": "2023-11-07T05:31:56Z",
"orderAmount": 123,
"orderAmountContractCurrency": 123,
"orderAmountShopCurrency": 123,
"orderAmountUSD": 123,
"orderId": 123,
"orderName": "<string>",
"orderNote": "<string>",
"orderNoteAttributes": "<string>",
"originalContractId": 123,
"pauseDurationCycle": 123,
"pauseFeedback": "<string>",
"pauseReason": "<string>",
"pauseTillDate": "2023-11-07T05:31:56Z",
"pausedFromActive": true,
"pausedOn": "2023-11-07T05:31:56Z",
"pendingCancellationCycle": 123,
"pendingCancellationDate": "2023-11-07T05:31:56Z",
"phone": "<string>",
"queueUpdatedAt": "2023-11-07T05:31:56Z",
"skipPaymentCreateUnpaidOrder": true,
"startsAt": "2023-11-07T05:31:56Z",
"status": "<string>",
"stopUpComingOrderEmail": true,
"subscriptionContractId": 123,
"subscriptionCreatedEmailSent": true,
"subscriptionTypeIdentifier": "<string>",
"totalSuccessfulOrders": 123,
"upcomingEmailBufferDays": 123,
"upcomingEmailTaskUrl": "<string>",
"updatedAt": "2023-11-07T05:31:56Z",
"updatingQueue": true
}
}
]

Query Parameters

contractId
integer<int64>
status
enum<string>
required
Available options:
SUCCESS,
FAILURE,
REQUESTING,
PROGRESS,
QUEUED,
SKIPPED,
SOCIAL_CONNECTION_NULL,
CONTRACT_CANCELLED,
CONTRACT_ENDED,
CONTRACT_PAUSED,
AUTO_CHARGE_DISABLED,
SHOPIFY_EXCEPTION,
SKIPPED_DUNNING_MGMT,
SKIPPED_INVENTORY_MGMT,
IMMEDIATE_TRIGGERED,
SECURITY_CHALLENGE,
CONTRACT_PAUSED_MAX_CYCLES,
REFUNDED,
SKIPPED_DEMO_SHOP,
SKIPPED_SHOP_INFO_NOT_FOUND,
SKIPPED_BILLING_DATE_STALE,
SKIPPED_DUNNING_NOT_CONFIGURED,
PENDING_CONSOLIDATION
includeShopifyException
boolean
default:false
fromDay
string<date-time>
toDay
string<date-time>
attemptCount
integer<int32>
billingErrorsKeys
string
customerName
string
errorMessage
string
contractStatus
string
pageable
object
required

Response

Successfully retrieved report

subscriptionBillingAttempt
object
subscriptionContractDetails
object