Skip to main content

Get customer subscriptions

Last updated: 13-Oct-2021
Rate this article:

Overview

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

Parameters

Parameters 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.

2CheckoutCustomerReference

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 2CheckoutCustomerReference. If you include it, it needs to belong to the same customer as the 2CheckoutCustomerReference.

Response

Parameters Type/Description

Subscription

Array of objects

Request

<?php

require ('PATH_TO_AUTH');

$2CheckoutCustomerReference = CUSTOMER_REFERENCE;
//$ExternalCustomerReference = 'EXTERNAL_CUSTOMER_REFERENCE'; // optional

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

 

Rate this article:
Logo of Verifone