> This page is for API Reference.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.navipartner.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.navipartner.com/_mcp/server.

# Retrieve membership payment methods

GET https://api.npretail.app/{tenant}/{environment}/{company}/membership/{membershipId}/paymentmethods

Retrieve membership payment methods.

Reference: https://docs.navipartner.com/apis/api-reference/memberships/service-paymentmethod/get-payment-methods

## Authentication

- `x-np-api-key` header (required) — API Key authentication via header

## Request

### Path parameters

- `tenant` (string, required) — Your Entra Tenant ID. [More details.](/paths#1-tenant)
- `environment` (string, required) — Your Business Central Environment. [More details.](/paths#2-environment)
- `company` (string, required) — Your Business Central Company. [More details.](/paths#3-company)
- `membershipId` (UUID, required) — Unique identifier for a membership.

## Response

### 200

- `paymentMethods` (list of PaymentMethodRetrieveDTO, required)

## Types

### PaymentMethodRetrieveDTO

The PaymentMethodRetrieveDTO extends the PaymentMethodDTO and includes additional property - the payment method ID. This DTO is used when retrieving infromation about existing payment methods.

- `accountId` (UUID, required)
- `id` (UUID, required) — Unique identifier for a payment method.
- `PANLastDigits` (string, optional) — The last 4 digits of the payment card number.
- `PSP` (enum, optional) — The payment service provider of the payment method.
  - Allowed values: `Adyen`, `Vipps`
- `alias` (string, optional) — A short description that can be assigned to each payment method by the end user.
- `default` (boolean, optional) — Indicates whether the payment method should be set up as default.
- `expiryDate` (date, optional) — The expiry date of the card.
- `maskedPAN` (string, optional) — The masked PAN of the card. The exact structure depends on the PSP.
- `paymentBrand` (string, optional) — The payment method brand.
- `paymentInstrument` (string, optional) — The payment method type.
- `status` (enum, optional) — The status of the payment method.
  - Allowed values: `Active`, `Archived`

## Examples

**Response**

```json
{
  "paymentMethods": [
    {
      "accountId": "e2cfea9f-385e-4d83-8b50-42256885b03a",
      "id": "a7b41af8-d187-48d9-89e0-a57c47039004",
      "PANLastDigits": "1234",
      "PSP": "Adyen",
      "alias": "my main card",
      "default": true,
      "expiryDate": "2029-09-30",
      "maskedPAN": "541333 **** 1234",
      "paymentBrand": "visa",
      "paymentInstrument": "Card",
      "status": "Active"
    },
    {
      "accountId": "e2cfea9f-385e-4d83-8b50-42256885b03a",
      "id": "5f705a42-0bb8-439f-8914-6f80cfde1414",
      "PANLastDigits": "5678",
      "PSP": "Vipps",
      "alias": "my backup card",
      "default": false,
      "expiryDate": "2029-09-30",
      "maskedPAN": "541333 **** 5678",
      "paymentBrand": "visa",
      "paymentInstrument": "Card",
      "status": "Active"
    },
    {
      "accountId": "e2cfea9f-385e-4d83-8b50-42256885b03a",
      "id": "eadda754-7ae0-475a-813c-445da84a6801",
      "PANLastDigits": "1234",
      "PSP": "Adyen",
      "alias": "",
      "default": false,
      "expiryDate": "2024-10-31",
      "maskedPAN": "541333 **** 1234",
      "paymentBrand": "visa",
      "paymentInstrument": "Card",
      "status": "Archived"
    }
  ]
}
```

**SDK Code**

```python ExampleGetPaymentMethods
import requests

url = "https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./membership/cdef7890-abcd-0123-1234-567890abcdef/paymentmethods"

headers = {"x-np-api-key": "<NaviPartner API Key>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript ExampleGetPaymentMethods
const url = 'https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./membership/cdef7890-abcd-0123-1234-567890abcdef/paymentmethods';
const options = {method: 'GET', headers: {'x-np-api-key': '<NaviPartner API Key>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go ExampleGetPaymentMethods
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./membership/cdef7890-abcd-0123-1234-567890abcdef/paymentmethods"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("x-np-api-key", "<NaviPartner API Key>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby ExampleGetPaymentMethods
require 'uri'
require 'net/http'

url = URI("https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./membership/cdef7890-abcd-0123-1234-567890abcdef/paymentmethods")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["x-np-api-key"] = '<NaviPartner API Key>'

response = http.request(request)
puts response.read_body
```

```java ExampleGetPaymentMethods
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./membership/cdef7890-abcd-0123-1234-567890abcdef/paymentmethods")
  .header("x-np-api-key", "<NaviPartner API Key>")
  .asString();
```

```php ExampleGetPaymentMethods
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./membership/cdef7890-abcd-0123-1234-567890abcdef/paymentmethods', [
  'headers' => [
    'x-np-api-key' => '<NaviPartner API Key>',
  ],
]);

echo $response->getBody();
```

```csharp ExampleGetPaymentMethods
using RestSharp;

var client = new RestClient("https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./membership/cdef7890-abcd-0123-1234-567890abcdef/paymentmethods");
var request = new RestRequest(Method.GET);
request.AddHeader("x-np-api-key", "<NaviPartner API Key>");
IRestResponse response = client.Execute(request);
```

```swift ExampleGetPaymentMethods
import Foundation

let headers = ["x-np-api-key": "<NaviPartner API Key>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./membership/cdef7890-abcd-0123-1234-567890abcdef/paymentmethods")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```