For the complete documentation index, see llms.txt. This page is also available as Markdown.

Get customer subscriptions

Use the getCustomerSubscriptions method to retrieve details about the subscriptions belonging to a specific customer.

Request parameters

Parameter
Type / Description

sessionID

Required (string) Session identifier, the output of the Login method. Include sessionID into all your requests. 2Checkout throws an exception if the values are incorrect. The sessionID expires in 10 minutes.

AvangateCustomerReference

Required (int) System-generated customer reference. Required unless you prefer to use ExternalCustomerReference.

ExternalCustomerReference

Optional (string) External customer reference that you control. Optional when you use AvangateCustomerReference. If you include it, it needs to belong to the same customer as the AvangateCustomerReference.

Request sample

<?php

require ('PATH_TO_AUTH');

$AvangateCustomerReference = CUSTOMER_REFERENCE;
//$ExternalCustomerReference = 'EXTERNAL_CUSTOMER_REFERENCE'; // optional

try {
    $ListofSubscriptions = $client->getCustomerSubscriptions($sessionID, $AvangateCustomerReference);
}
catch (SoapFault $e) {
    echo "ListofSubscriptions: " . $e->getMessage();
    exit;
}
var_dump("ListofSubscriptions", $ListofSubscriptions);

Response parameters

Parameter
Type

Array of objects

Last updated

Was this helpful?