> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.paywithatoa.co.uk/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Payment Method

> Retrieve payment method via the Atoa Payment Methods API, request parameters, response schema and code samples in cURL, Python, JavaScript, PHP, Go and Java.

Retrieve details of a single saved payment method.

### Authorization

Bearer `<accessSecret>`

**Path Parameters**

<ParamField path="customerId" type="string" required>
  The customer UUID who owns the card.
</ParamField>

<ParamField path="cardId" type="string" required>
  The card identifier (from [List Payment Methods](./list-payment-methods) response).
</ParamField>

**Response**

<ResponseField name="id" type="string">
  Card identifier.
</ResponseField>

<ResponseField name="name" type="string">
  Cardholder name.
</ResponseField>

<ResponseField name="type" type="string">
  Card type (e.g., `credit`, `debit`).
</ResponseField>

<ResponseField name="lastFourDigits" type="string">
  Last 4 digits of the card number.
</ResponseField>

<ResponseField name="category" type="string">
  Card category.
</ResponseField>

<ResponseField name="cardType" type="string">
  Card type (e.g., `DEBIT`, `CREDIT`, `PREPAID`).
</ResponseField>

<ResponseField name="brand" type="string">
  Card network brand (e.g., `VISA`, `MASTERCARD`).
</ResponseField>

<ResponseField name="country" type="string">
  Card issuing country code.
</ResponseField>

<ResponseField name="recurrenceType" type="string">
  Recurrence type (`unscheduled`, `recurring`, `installment`). Default: `unscheduled`.
</ResponseField>

<ResponseField name="expiryDate" type="string">
  Card expiry date in `MM/YYYY` format.
</ResponseField>

<RequestExample>
  ```bash curl theme={null}
  curl --request GET \
    --url https://api.atoa.me/api/customers/{customerId}/cards/{cardId} \
    --header 'Authorization: Bearer <token>'
  ```

  ```python Python theme={null}
  import requests

  url = "https://api.atoa.me/api/customers/{customerId}/cards/{cardId}"
  headers = {"Authorization": "Bearer <token>"}

  response = requests.get(url, headers=headers)
  print(response.json())
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(
    "https://api.atoa.me/api/customers/{customerId}/cards/{cardId}",
    {
      headers: { Authorization: "Bearer <token>" },
    }
  );

  const data = await response.json();
  console.log(data);
  ```

  ```php PHP theme={null}
  <?php

  $curl = curl_init();

  curl_setopt_array($curl, [
    CURLOPT_URL => "https://api.atoa.me/api/customers/{customerId}/cards/{cardId}",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
      "Authorization: Bearer <token>"
    ],
  ]);

  $response = curl_exec($curl);
  curl_close($curl);
  echo $response;
  ```

  ```go Go theme={null}
  package main

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

  func main() {
    url := "https://api.atoa.me/api/customers/{customerId}/cards/{cardId}"

    req, _ := http.NewRequest("GET", url, nil)
    req.Header.Add("Authorization", "Bearer <token>")

    res, _ := http.DefaultClient.Do(req)
    defer res.Body.Close()
    body, _ := ioutil.ReadAll(res.Body)
    fmt.Println(string(body))
  }
  ```

  ```java Java theme={null}
  HttpResponse<String> response = Unirest.get("https://api.atoa.me/api/customers/{customerId}/cards/{cardId}")
    .header("Authorization", "Bearer <token>")
    .asString();
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "id": "card_abc123def456",
    "name": "John Doe",
    "type": "credit",
    "lastFourDigits": "4242",
    "category": "consumer",
    "cardType": "DEBIT",
    "brand": "VISA",
    "country": "GB",
    "recurrenceType": "unscheduled",
    "expiryDate": "12/2027"
  }
  ```

  ```json 404 theme={null}
  {
    "name": "NOT_FOUND",
    "message": "Card not found",
    "status": 404,
    "errors": []
  }
  ```
</ResponseExample>
