Retrieve subscription payment information
Last updated: 16-Oct-2019
Use the getSubscriptionPaymentInformation method to retrieve information related to the payment made for a subscription.
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. |
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. |
<?php
require ('PATH_TO_AUTH');
$subscriptionReference = "Subscription_Code";
try {
$paymentInformation = $client->getSubscriptionPaymentInformation($sessionID, $subscriptionReference);
} catch (SoapFault $e) {
echo $e->getMessage();
}
var_dump($paymentInformation);
Do you have a question? If you didn’t find the answer you are looking for in our documentation, you can contact our Support teams for more information. If you have a technical issue or question, please contact us. We are happy to help.
We’ll help you choose the right payment solution for your business, wherever you want to sell, in-person or online. Our team of experts will happily discuss your needs.