# POST /api/customers/add-stored-payment-method-async

Adds a new stored payment method to a customer's collection and persists it.

**Required permissions**: `Customers`, `Customers.Create`  
**Scope**: merchant

**Operation ID:** `customersAddStoredPaymentMethod`

## Authorization

Requires: Customers.Customers, Customers.Customers.Create, merchant scope.

Required permissions:
- `Customers.Customers`
- `Customers.Customers.Create`

## Parameters

| Name | In | Required | Type | Description |
| --- | --- | --- | --- | --- |
| customerId | query | no | string(uuid) | The customer to add the payment method to. |
| suppressNulls | query | no | boolean | If true, omit properties with null values. |

## Request Body

**Content type:** `application/json`

Schema: `AddStoredPaymentMethodInput`

Properties:
- `paymentMethodType` (object): Gets or sets the type of payment method (Card or Check). Conditional: When IsReaderTokenBacked is true. Must equal Card.
- `cardData` (object): Gets or sets the card data when `paymentMethodType` is Card. Required: When PaymentMethodType == Card and IsReaderTokenBacked is false. Conditional: When CardData is not null and PaymentMethodType == Card and IsReaderTokenBacked is false.
- `checkData` (object): Gets or sets the check data when `paymentMethodType` is Check. Required: When PaymentMethodType == Check. Conditional: When CheckData is not null and PaymentMethodType == Check.
- `isDefault` (boolean): Gets or sets whether this should be the customer's default payment method.
- `customName` (string): Gets or sets an optional user-defined display name (e.g., "Marriott Chase").
- `initialSchemeTransactionId` (string): Optional initial (first-in-series) network / scheme transaction id captured from the  authorization response of the cardholder-initiated transaction that stored this credential.  Populated only on the transaction-driven save-card path (the manual Customer admin add has no  authorization response); persisted onto the stored payment method so later charges can echo  it without a consent lookup. Non-sensitive card-network protocol metadata.
- `schemeTransactionIdBrand` (string): Optional card brand at capture time (e.g. "Visa") tagged alongside  `initialSchemeTransactionId`. Ignored when the initial id is absent.
- `schemeTransactionIdProcessor` (string): Optional originating processor ("tsys" / "fiserv") tagged alongside  `initialSchemeTransactionId`. Ignored when the initial id is absent.
- `readerToken` (string): The processor reader token to store for a PAN-less card (a decrypt-and-forward processor such  as MagTek DAF, where the gateway never sees the PAN). When set, this input mints a reader-token  stored method: the token is written encrypted onto the backing vault token's  `ProcessorTokens` and there is no card data to vault. Set by the server only: a value  supplied over the API is not accepted. Never logged.
- `readerTokenProcessorName` (string): The processor key ("magtekdaf") the `readerToken` belongs to, used as the  `ProcessorTokens` selection key. Required when `readerToken` is set. Required: When IsReaderTokenBacked is true.
- `readerTokenProcessorProfileId` (string(uuid)): The processor profile the `readerToken` was captured under, used as the second part  of the `ProcessorTokens` selection key. Optional.
- `readerTokenRequestorId` (string): Optional token-requestor id captured alongside the `readerToken`. Stored on the  backing token's `ProcessorTokens` entry for lineage. Non-sensitive.
- `readerTokenMaskedCardNumber` (string): The masked card number of the card the `readerToken` stands in for, in the  platform's masked shape (for example `411111******1111`), read off the approved  authorization. Optional: absent when the processor response carried no card identity.  Display only. It is never a charge credential and never a dedupe input (two distinct reader  tokens can share a last four; `ReaderTokenFingerprint` stays the only matching key).  The consuming services re-mask it before persisting, so a full PAN cannot travel through  this field. Ignored unless `readerToken` is set.
- `readerTokenCardBrand` (string): The card brand ("Visa", "Mastercard", ...) resolved for the card behind the  `readerToken`, or `null` when neither the processor response nor  the BIN lookup produced one. Best-effort display metadata; ignored unless  `readerTokenMaskedCardNumber` is set.
- `isReaderTokenBacked` (boolean): True when this input describes a reader-token (PAN-less) stored method rather than a  PAN- or account-backed one. In that case `cardData` is absent by design.

_Example: Add Card_

Adds a credit/debit card to the customer's stored payment methods. Set IsDefault = true to mark this as the customer's default payment method (any prior default is automatically demoted server-side).

```json
{
  "paymentMethodType": "Card",
  "cardData": {
    "cardNumber": "4111111111111111",
    "expirationDate": "2028-10-09",
    "cardVerificationValue": "123",
    "nameOnCard": "Jane Smith",
    "entryMode": "Manual",
    "cvPresence": "None",
    "billingAddress": {
      "address1": "456 Oak Ave",
      "city": "Reno",
      "state": "NV",
      "zip": "89501",
      "country": "USA"
    }
  },
  "isDefault": true,
  "customName": "Personal Visa"
}
```

_Example: Add ACH / eCheck_

Adds a US checking or savings account for ACH debits/credits. Routing + account numbers are required; the account is tokenized server-side.

```json
{
  "paymentMethodType": "Check",
  "checkData": {
    "nameOnCheck": "Acme Corp",
    "routingNumber": "021000021",
    "accountNumber": "123456789",
    "checkType": "Business",
    "accountType": "Checking"
  },
  "customName": "Operating Account"
}
```

**Content type:** `text/json`

Schema: `AddStoredPaymentMethodInput`

Properties:
- `paymentMethodType` (object): Gets or sets the type of payment method (Card or Check). Conditional: When IsReaderTokenBacked is true. Must equal Card.
- `cardData` (object): Gets or sets the card data when `paymentMethodType` is Card. Required: When PaymentMethodType == Card and IsReaderTokenBacked is false. Conditional: When CardData is not null and PaymentMethodType == Card and IsReaderTokenBacked is false.
- `checkData` (object): Gets or sets the check data when `paymentMethodType` is Check. Required: When PaymentMethodType == Check. Conditional: When CheckData is not null and PaymentMethodType == Check.
- `isDefault` (boolean): Gets or sets whether this should be the customer's default payment method.
- `customName` (string): Gets or sets an optional user-defined display name (e.g., "Marriott Chase").
- `initialSchemeTransactionId` (string): Optional initial (first-in-series) network / scheme transaction id captured from the  authorization response of the cardholder-initiated transaction that stored this credential.  Populated only on the transaction-driven save-card path (the manual Customer admin add has no  authorization response); persisted onto the stored payment method so later charges can echo  it without a consent lookup. Non-sensitive card-network protocol metadata.
- `schemeTransactionIdBrand` (string): Optional card brand at capture time (e.g. "Visa") tagged alongside  `initialSchemeTransactionId`. Ignored when the initial id is absent.
- `schemeTransactionIdProcessor` (string): Optional originating processor ("tsys" / "fiserv") tagged alongside  `initialSchemeTransactionId`. Ignored when the initial id is absent.
- `readerToken` (string): The processor reader token to store for a PAN-less card (a decrypt-and-forward processor such  as MagTek DAF, where the gateway never sees the PAN). When set, this input mints a reader-token  stored method: the token is written encrypted onto the backing vault token's  `ProcessorTokens` and there is no card data to vault. Set by the server only: a value  supplied over the API is not accepted. Never logged.
- `readerTokenProcessorName` (string): The processor key ("magtekdaf") the `readerToken` belongs to, used as the  `ProcessorTokens` selection key. Required when `readerToken` is set. Required: When IsReaderTokenBacked is true.
- `readerTokenProcessorProfileId` (string(uuid)): The processor profile the `readerToken` was captured under, used as the second part  of the `ProcessorTokens` selection key. Optional.
- `readerTokenRequestorId` (string): Optional token-requestor id captured alongside the `readerToken`. Stored on the  backing token's `ProcessorTokens` entry for lineage. Non-sensitive.
- `readerTokenMaskedCardNumber` (string): The masked card number of the card the `readerToken` stands in for, in the  platform's masked shape (for example `411111******1111`), read off the approved  authorization. Optional: absent when the processor response carried no card identity.  Display only. It is never a charge credential and never a dedupe input (two distinct reader  tokens can share a last four; `ReaderTokenFingerprint` stays the only matching key).  The consuming services re-mask it before persisting, so a full PAN cannot travel through  this field. Ignored unless `readerToken` is set.
- `readerTokenCardBrand` (string): The card brand ("Visa", "Mastercard", ...) resolved for the card behind the  `readerToken`, or `null` when neither the processor response nor  the BIN lookup produced one. Best-effort display metadata; ignored unless  `readerTokenMaskedCardNumber` is set.
- `isReaderTokenBacked` (boolean): True when this input describes a reader-token (PAN-less) stored method rather than a  PAN- or account-backed one. In that case `cardData` is absent by design.

_Example: Add Card_

Adds a credit/debit card to the customer's stored payment methods. Set IsDefault = true to mark this as the customer's default payment method (any prior default is automatically demoted server-side).

```json
{
  "paymentMethodType": "Card",
  "cardData": {
    "cardNumber": "4111111111111111",
    "expirationDate": "2028-10-09",
    "cardVerificationValue": "123",
    "nameOnCard": "Jane Smith",
    "entryMode": "Manual",
    "cvPresence": "None",
    "billingAddress": {
      "address1": "456 Oak Ave",
      "city": "Reno",
      "state": "NV",
      "zip": "89501",
      "country": "USA"
    }
  },
  "isDefault": true,
  "customName": "Personal Visa"
}
```

_Example: Add ACH / eCheck_

Adds a US checking or savings account for ACH debits/credits. Routing + account numbers are required; the account is tokenized server-side.

```json
{
  "paymentMethodType": "Check",
  "checkData": {
    "nameOnCheck": "Acme Corp",
    "routingNumber": "021000021",
    "accountNumber": "123456789",
    "checkType": "Business",
    "accountType": "Checking"
  },
  "customName": "Operating Account"
}
```

**Content type:** `application/*+json`

Schema: `AddStoredPaymentMethodInput`

Properties:
- `paymentMethodType` (object): Gets or sets the type of payment method (Card or Check). Conditional: When IsReaderTokenBacked is true. Must equal Card.
- `cardData` (object): Gets or sets the card data when `paymentMethodType` is Card. Required: When PaymentMethodType == Card and IsReaderTokenBacked is false. Conditional: When CardData is not null and PaymentMethodType == Card and IsReaderTokenBacked is false.
- `checkData` (object): Gets or sets the check data when `paymentMethodType` is Check. Required: When PaymentMethodType == Check. Conditional: When CheckData is not null and PaymentMethodType == Check.
- `isDefault` (boolean): Gets or sets whether this should be the customer's default payment method.
- `customName` (string): Gets or sets an optional user-defined display name (e.g., "Marriott Chase").
- `initialSchemeTransactionId` (string): Optional initial (first-in-series) network / scheme transaction id captured from the  authorization response of the cardholder-initiated transaction that stored this credential.  Populated only on the transaction-driven save-card path (the manual Customer admin add has no  authorization response); persisted onto the stored payment method so later charges can echo  it without a consent lookup. Non-sensitive card-network protocol metadata.
- `schemeTransactionIdBrand` (string): Optional card brand at capture time (e.g. "Visa") tagged alongside  `initialSchemeTransactionId`. Ignored when the initial id is absent.
- `schemeTransactionIdProcessor` (string): Optional originating processor ("tsys" / "fiserv") tagged alongside  `initialSchemeTransactionId`. Ignored when the initial id is absent.
- `readerToken` (string): The processor reader token to store for a PAN-less card (a decrypt-and-forward processor such  as MagTek DAF, where the gateway never sees the PAN). When set, this input mints a reader-token  stored method: the token is written encrypted onto the backing vault token's  `ProcessorTokens` and there is no card data to vault. Set by the server only: a value  supplied over the API is not accepted. Never logged.
- `readerTokenProcessorName` (string): The processor key ("magtekdaf") the `readerToken` belongs to, used as the  `ProcessorTokens` selection key. Required when `readerToken` is set. Required: When IsReaderTokenBacked is true.
- `readerTokenProcessorProfileId` (string(uuid)): The processor profile the `readerToken` was captured under, used as the second part  of the `ProcessorTokens` selection key. Optional.
- `readerTokenRequestorId` (string): Optional token-requestor id captured alongside the `readerToken`. Stored on the  backing token's `ProcessorTokens` entry for lineage. Non-sensitive.
- `readerTokenMaskedCardNumber` (string): The masked card number of the card the `readerToken` stands in for, in the  platform's masked shape (for example `411111******1111`), read off the approved  authorization. Optional: absent when the processor response carried no card identity.  Display only. It is never a charge credential and never a dedupe input (two distinct reader  tokens can share a last four; `ReaderTokenFingerprint` stays the only matching key).  The consuming services re-mask it before persisting, so a full PAN cannot travel through  this field. Ignored unless `readerToken` is set.
- `readerTokenCardBrand` (string): The card brand ("Visa", "Mastercard", ...) resolved for the card behind the  `readerToken`, or `null` when neither the processor response nor  the BIN lookup produced one. Best-effort display metadata; ignored unless  `readerTokenMaskedCardNumber` is set.
- `isReaderTokenBacked` (boolean): True when this input describes a reader-token (PAN-less) stored method rather than a  PAN- or account-backed one. In that case `cardData` is absent by design.

_Example: Add Card_

Adds a credit/debit card to the customer's stored payment methods. Set IsDefault = true to mark this as the customer's default payment method (any prior default is automatically demoted server-side).

```json
{
  "paymentMethodType": "Card",
  "cardData": {
    "cardNumber": "4111111111111111",
    "expirationDate": "2028-10-09",
    "cardVerificationValue": "123",
    "nameOnCard": "Jane Smith",
    "entryMode": "Manual",
    "cvPresence": "None",
    "billingAddress": {
      "address1": "456 Oak Ave",
      "city": "Reno",
      "state": "NV",
      "zip": "89501",
      "country": "USA"
    }
  },
  "isDefault": true,
  "customName": "Personal Visa"
}
```

_Example: Add ACH / eCheck_

Adds a US checking or savings account for ACH debits/credits. Routing + account numbers are required; the account is tokenized server-side.

```json
{
  "paymentMethodType": "Check",
  "checkData": {
    "nameOnCheck": "Acme Corp",
    "routingNumber": "021000021",
    "accountNumber": "123456789",
    "checkType": "Business",
    "accountType": "Checking"
  },
  "customName": "Operating Account"
}
```

## Responses

### 200

OK

**Content type:** `application/json`

Schema: `CustomerStoredPaymentMethodDto`

Properties:
- `extraProperties` (object)
- `id` (string(uuid))
- `creationTime` (string(date-time)): The date and time when this entity was created.
- `creatorId` (string(uuid)): The ID of the user who created this entity.
- `lastModificationTime` (string(date-time)): The date and time when this entity was last modified.
- `lastModifierId` (string(uuid)): The ID of the user who last modified this entity.
- `isDeleted` (boolean): Indicates whether this entity has been deleted.
- `deleterId` (string(uuid)): The ID of the user who deleted this entity, if it is deleted.
- `deletionTime` (string(date-time)): The date and time when this entity was deleted, if it is deleted.
- `tenantId` (string(uuid)): Id of the related tenant.
- `concurrencyStamp` (string): Gets or sets the concurrency stamp used for optimistic concurrency control.
- `entityVersion` (integer(int32)): A version value that is increased whenever the entity is changed.
- `paymentMethodType` (object): Gets or sets the type of stored payment method (card, check, etc.).
- `cardData` (object): Gets or sets the card data when `paymentMethodType` is `Card`.
- `checkData` (object): Gets or sets the check/ACH data when `paymentMethodType` is `Check`.
- `isDefault` (boolean): Gets or sets a value indicating whether this is the customer's default payment method.
- `displayName` (string): Gets the human-readable display name for this payment method. When `customName`  is set, it takes priority over the computed brand + last-4 fallback.
- `customName` (string): Gets or sets an optional user-defined name for this payment method  (e.g., "Marriott Chase", "Bank of America Checkcard").
- `paymentTokenId` (string(uuid)): Gets or sets the identifier of the `PaymentToken` document that stores  the encrypted card/check data for this stored payment method.
- `publicReference` (string): Gets or sets the chargeable public reference (the opaque `pt_`-prefixed handle) of the  backing `PaymentToken`.
- `origin` (object): Gets or sets the surface / add-channel this stored payment method was captured through  (manual admin, hosted payment page, virtual terminal, or API). Null when the method predates  this field, which callers treat as `Unknown`.  Non-sensitive add-channel metadata.
- `isReaderTokenBacked` (boolean): Gets or sets whether this stored method is backed by a processor card token rather than a  stored card number: the card was captured by a card reader on a decrypt-and-forward processor,  so the platform never held its number and the method carries no expiration date. Such a method  is charged through its `publicReference` exactly like any other, but only on the  processor that issued the token. `false` for every card-number-backed card and  every bank account method.

### 403

Forbidden

**Content type:** `application/json`

Schema: `RemoteServiceErrorResponse`

Properties:
- `error` (RemoteServiceErrorInfo)

### 401

Unauthorized

**Content type:** `application/json`

Schema: `RemoteServiceErrorResponse`

Properties:
- `error` (RemoteServiceErrorInfo)

### 400

Bad Request

**Content type:** `application/json`

Schema: `RemoteServiceErrorResponse`

Properties:
- `error` (RemoteServiceErrorInfo)

### 404

Not Found

**Content type:** `application/json`

Schema: `RemoteServiceErrorResponse`

Properties:
- `error` (RemoteServiceErrorInfo)

### 501

Not Implemented

**Content type:** `application/json`

Schema: `RemoteServiceErrorResponse`

Properties:
- `error` (RemoteServiceErrorInfo)

### 500

Internal Server Error

**Content type:** `application/json`

Schema: `RemoteServiceErrorResponse`

Properties:
- `error` (RemoteServiceErrorInfo)

### default

The request failed. The body carries the standard error envelope: a machine-readable `error.code`, a human-readable `error.message`, and `error.validationErrors` when the failure was a validation rejection. See the error-code reference in this document's description for the values `error.code` can take.

**Content type:** `application/json`

Schema: `RemoteServiceErrorResponse`

Properties:
- `error` (RemoteServiceErrorInfo)

### 429

The request was refused because a rate limit was exceeded, or because something a later retry can clear stopped it. A rate limit refusal carries an `application/problem+json` body: wait at least the interval `Retry-After` names before retrying, then back off. Limits are tuned per deployment, so read the allowance from the response headers rather than assuming a fixed ceiling. Any other refusal carries the standard error envelope as `application/json`, and its `error.code` names the cause.

**Content type:** `application/problem+json`

Schema: `RateLimitProblemDetails`

Properties:
- `type` (string) required: The problem type identifier. Always the same value: the failure is the status code itself,  so there is no sub-type for a caller to branch on.
- `title` (string) required: A short, human-readable summary of the problem type.
- `status` (integer(int32)) required: The HTTP status code, repeated in the body as the problem-details format defines.
- `detail` (string) required: A human-readable explanation of this occurrence of the problem.
- `retryAfterSeconds` (integer(int32)) required: How long to wait before retrying, in whole seconds, carrying the same figure as the  `Retry-After` header. Always at least one: a value of zero would invite an immediate  retry that is certain to be rejected again.

**Content type:** `application/json`

Schema: `RemoteServiceErrorResponse`

Properties:
- `error` (RemoteServiceErrorInfo)

## Example request

Every block below sends the same request. Replace {{BASE_URL}} with the address of the API you are calling and {{API_KEY}} with your own key.

The request body is a AddStoredPaymentMethodInput. See the Request body section below for its fields.

### cURL

```bash
curl -X POST "{{BASE_URL}}/api/customers/add-stored-payment-method-async" \
  -H "api-key: {{API_KEY}}" \
  -H "Content-Type: application/json" \
  -d '{
  "paymentMethodType": "Card",
  "cardData": {
    "cardNumber": "4111111111111111",
    "expirationDate": "2028-10-09",
    "cardVerificationValue": "123",
    "nameOnCard": "Jane Smith",
    "entryMode": "Manual",
    "cvPresence": "None",
    "billingAddress": {
      "address1": "456 Oak Ave",
      "city": "Reno",
      "state": "NV",
      "zip": "89501",
      "country": "USA"
    }
  },
  "isDefault": true,
  "customName": "Personal Visa"
}'
```

### PowerShell

```powershell
$headers = @{
    'api-key' = '{{API_KEY}}'
}

$body = @'
{
  "paymentMethodType": "Card",
  "cardData": {
    "cardNumber": "4111111111111111",
    "expirationDate": "2028-10-09",
    "cardVerificationValue": "123",
    "nameOnCard": "Jane Smith",
    "entryMode": "Manual",
    "cvPresence": "None",
    "billingAddress": {
      "address1": "456 Oak Ave",
      "city": "Reno",
      "state": "NV",
      "zip": "89501",
      "country": "USA"
    }
  },
  "isDefault": true,
  "customName": "Personal Visa"
}
'@

$response = Invoke-RestMethod -Method POST -Uri '{{BASE_URL}}/api/customers/add-stored-payment-method-async' `
    -Headers $headers -ContentType 'application/json' -Body $body
```

### TypeScript (SDK)

```bash
npm install @winkpg/winkpg-api
```

```typescript
import { Configuration, CustomersApi } from '@winkpg/winkpg-api';

const api = new CustomersApi(new Configuration({
  basePath: '{{BASE_URL}}',
  apiKey: '{{API_KEY}}',
}));

const { data } = await api.customersAddStoredPaymentMethod({
  "paymentMethodType": "Card",
  "cardData": {
    "cardNumber": "4111111111111111",
    "expirationDate": "2028-10-09",
    "cardVerificationValue": "123",
    "nameOnCard": "Jane Smith",
    "entryMode": "Manual",
    "cvPresence": "None",
    "billingAddress": {
      "address1": "456 Oak Ave",
      "city": "Reno",
      "state": "NV",
      "zip": "89501",
      "country": "USA"
    }
  },
  "isDefault": true,
  "customName": "Personal Visa"
});
```

### TypeScript (raw HTTP)

```typescript
const response = await fetch('{{BASE_URL}}/api/customers/add-stored-payment-method-async', {
  method: 'POST',
  headers: {
    "api-key": "{{API_KEY}}",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "paymentMethodType": "Card",
    "cardData": {
      "cardNumber": "4111111111111111",
      "expirationDate": "2028-10-09",
      "cardVerificationValue": "123",
      "nameOnCard": "Jane Smith",
      "entryMode": "Manual",
      "cvPresence": "None",
      "billingAddress": {
        "address1": "456 Oak Ave",
        "city": "Reno",
        "state": "NV",
        "zip": "89501",
        "country": "USA"
      }
    },
    "isDefault": true,
    "customName": "Personal Visa"
  }),
});

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

### C# (SDK)

```bash
dotnet add package WinkPg.Api.Client
```

```csharp
using WinkPg.Api.Client.Api;
using WinkPg.Api.Client.Client;
using System.Text.Json;

var config = new Configuration { BasePath = "{{BASE_URL}}" };
config.AddApiKey("api-key", "{{API_KEY}}");

var api = new CustomersApi(config);
var body = JsonSerializer.Deserialize<AddStoredPaymentMethodInput>("""
    {
      "paymentMethodType": "Card",
      "cardData": {
        "cardNumber": "4111111111111111",
        "expirationDate": "2028-10-09",
        "cardVerificationValue": "123",
        "nameOnCard": "Jane Smith",
        "entryMode": "Manual",
        "cvPresence": "None",
        "billingAddress": {
          "address1": "456 Oak Ave",
          "city": "Reno",
          "state": "NV",
          "zip": "89501",
          "country": "USA"
        }
      },
      "isDefault": true,
      "customName": "Personal Visa"
    }
    """);

var result = await api.CustomersAddStoredPaymentMethodAsync(body);
```

### C# (raw HTTP)

```csharp
using System.Text;

using var http = new HttpClient { BaseAddress = new Uri("{{BASE_URL}}") };

var request = new HttpRequestMessage(new HttpMethod("POST"), "/api/customers/add-stored-payment-method-async");
request.Headers.Add("api-key", "{{API_KEY}}");

request.Content = new StringContent("""
    {
      "paymentMethodType": "Card",
      "cardData": {
        "cardNumber": "4111111111111111",
        "expirationDate": "2028-10-09",
        "cardVerificationValue": "123",
        "nameOnCard": "Jane Smith",
        "entryMode": "Manual",
        "cvPresence": "None",
        "billingAddress": {
          "address1": "456 Oak Ave",
          "city": "Reno",
          "state": "NV",
          "zip": "89501",
          "country": "USA"
        }
      },
      "isDefault": true,
      "customName": "Personal Visa"
    }
    """, Encoding.UTF8, "application/json");

var response = await http.SendAsync(request);
response.EnsureSuccessStatusCode();
var json = await response.Content.ReadAsStringAsync();
```

### Python (SDK)

```bash
pip install winkpg-api
```

```python
import winkpg_api

configuration = winkpg_api.Configuration(host="{{BASE_URL}}")
configuration.api_key["ApiKey"] = "{{API_KEY}}"

with winkpg_api.ApiClient(configuration) as client:
    api = winkpg_api.CustomersApi(client)
    body = winkpg_api.AddStoredPaymentMethodInput.from_dict({
      "paymentMethodType": "Card",
      "cardData": {
        "cardNumber": "4111111111111111",
        "expirationDate": "2028-10-09",
        "cardVerificationValue": "123",
        "nameOnCard": "Jane Smith",
        "entryMode": "Manual",
        "cvPresence": "None",
        "billingAddress": {
          "address1": "456 Oak Ave",
          "city": "Reno",
          "state": "NV",
          "zip": "89501",
          "country": "USA"
        }
      },
      "isDefault": True,
      "customName": "Personal Visa"
    })
    result = api.customers_add_stored_payment_method(body)
```

### Python (raw HTTP)

```bash
pip install requests
```

```python
import requests

headers = {
    "api-key": "{{API_KEY}}",
    "Content-Type": "application/json",
}

body = {
  "paymentMethodType": "Card",
  "cardData": {
    "cardNumber": "4111111111111111",
    "expirationDate": "2028-10-09",
    "cardVerificationValue": "123",
    "nameOnCard": "Jane Smith",
    "entryMode": "Manual",
    "cvPresence": "None",
    "billingAddress": {
      "address1": "456 Oak Ave",
      "city": "Reno",
      "state": "NV",
      "zip": "89501",
      "country": "USA"
    }
  },
  "isDefault": True,
  "customName": "Personal Visa"
}

response = requests.request(
    "POST",
    "{{BASE_URL}}/api/customers/add-stored-payment-method-async",
    headers=headers,
    json=body,
)
response.raise_for_status()
data = response.json()
```

## See also

- [All documentation](https://devportal-simpay-sbx.winkpg.io/llms.txt): the machine-readable index of every public page on this site.
