Retrieve subscription payment information
Overview
Use the getSubscriptionPaymentInformation method to retrieve information related to the payment made for a subscription.
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. | |
subscriptionReference | Required (String) |
The reference of the subscription you want to retrieve payment information for. |
Response
Parameters | Type/Description | |
---|---|---|
Type |
String |
|
|
Payment method type. |
|
Currency |
String |
|
|
ISO code of the order currency. |
|
PaymentMethod |
Object |
|
|
FirstDigits |
String |
|
|
First 4 digits of the card used on the order. |
|
LastDigits |
String |
|
|
Last 4 digits of the card used on the order. |
|
CardType |
String |
|
|
Type of card used on the order. |
Request
<?php require ('PATH_TO_AUTH'); $subscriptionReference = "Subscription_Code"; try { $paymentInformation = $client->getSubscriptionPaymentInformation($sessionID, $subscriptionReference); } catch (SoapFault $e) { echo $e->getMessage(); } var_dump($paymentInformation);