> For the complete documentation index, see [llms.txt](https://docs.2checkout.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.2checkout.com/json-rpc-api-reference/json-rpc-api-6.0/api-requests/subscription/retrieve-subscription-payment-information.md).

# Retrieve subscription payment information

Use the **getSubscriptionPaymentInformation** method to retrieve information related to the payment made for a subscription.

## Request parameters

<table><thead><tr><th width="216.13330078125">Parameter</th><th>Type / Description</th></tr></thead><tbody><tr><td><code>sessionID</code></td><td><p><strong>Required (String)</strong></p><p>Session identifier, the output of the <strong>Login</strong> method. Include <code>sessionID</code> into all your requests. 2Checkout throws an exception if the values are incorrect. The <code>sessionID</code> expires in <strong>10 minutes</strong>.</p></td></tr><tr><td><code>subscriptionReference</code></td><td><p><strong>Required (string)</strong></p><p>The reference of the subscription you want to retrieve payment information for.</p></td></tr></tbody></table>

### Request sample

```php
<?php
require ('PATH_TO_AUTH');

$subscriptionReference = "Subscription_Code";

$jsonRpcRequest = new stdClass();
$jsonRpcRequest->jsonrpc = '2.0';
$jsonRpcRequest->method = 'getSubscriptionPaymentInformation';
$jsonRpcRequest->params = array($sessionID, $subscriptionReference);
$jsonRpcRequest->id = $i++;

$paymentInformation = callRPC($jsonRpcRequest, $host);
var_dump($paymentInformation);
```

## Response parameters

<table><thead><tr><th width="284.4000244140625">Parameter</th><th>Type / Description</th></tr></thead><tbody><tr><td><code>Type</code></td><td><p><strong>String</strong></p><p>Payment method type.</p></td></tr><tr><td><code>Currency</code></td><td><p><strong>String</strong></p><p>ISO code of the order currency.</p></td></tr><tr><td><code>PaymentMethod</code></td><td><strong>Object</strong></td></tr><tr><td><code>PaymentMethod.FirstDigits</code></td><td><p><strong>String</strong></p><p>First 4 digits of the card used on the order.</p></td></tr><tr><td><code>PaymentMethod.LastDigits</code></td><td><p><strong>String</strong></p><p>Last 4 digits of the card used on the order.</p></td></tr><tr><td><code>PaymentMethod.CardType</code></td><td><p><strong>String</strong></p><p>ype of card used on the order.</p></td></tr><tr><td><code>PaymentMethod.ExpirationMonth</code></td><td><p><strong>String</strong></p><p>Card expiration month.</p></td></tr><tr><td><code>PaymentMethod.ExpirationYear</code></td><td><p><strong>String</strong></p><p>Card expiration year.</p></td></tr><tr><td><code>PaymentMethod.CardUpdated</code></td><td><p><strong>Boolean</strong></p><p>The card updated by our internal account updater.</p></td></tr><tr><td><code>PaymentMethod.Authorize3DSUrl</code></td><td><p><strong>String</strong></p><p>URL address to which customers are redirected after the 3DS details get validated by the bank and the order is successfully authorized.</p></td></tr></tbody></table>

### Response sample

```json
{
    "Type": "CC",
    "Currency": "USD",
    "PaymentMethod": {
        "FirstDigits": "4111",
        "LastDigits": "1111",
        "ExpirationMonth": null,
        "ExpirationYear": null,
        "CardUpdated": false,
        "Authorize3DSUrl": null,
        "CardType": "Visa"
    }
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.2checkout.com/json-rpc-api-reference/json-rpc-api-6.0/api-requests/subscription/retrieve-subscription-payment-information.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
