> For the complete documentation index, see [llms.txt](https://cardknox.gitbook.io/sola-dev-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cardknox.gitbook.io/sola-dev-docs/api-reference/customer-and-recurring-api/payment-method.md). Agents can also search and read this documentation through its [MCP server](https://cardknox.gitbook.io/sola-dev-docs/~gitbook/mcp).

# Payment Method

## Create Payment Method

> Use this endpoint to create a stored payment method for an existing customer using tokenized payment data. The resulting payment method can be used for recurring schedules and one-time customer transactions without collecting payment details again.<br>

```json
{"openapi":"3.0.3","info":{"title":"Sola Payments - Payment Method APIs","version":"1.0.0"},"tags":[{"name":"Payment Method"}],"servers":[{"url":"https://api.cardknox.com","description":"Default API host"}],"paths":{"/v2/CreatePaymentMethod":{"post":{"summary":"Create Payment Method","description":"Use this endpoint to create a stored payment method for an existing customer using tokenized payment data. The resulting payment method can be used for recurring schedules and one-time customer transactions without collecting payment details again.\n","operationId":"API_051_CreatePaymentMethod","tags":["Payment Method"],"deprecated":false,"parameters":[{"in":"header","name":"Authorization","required":true,"schema":{"type":"string"},"description":"This endpoint is authenticated using your Sola API key. Include the key in the `Authorization` header.\n"},{"in":"header","name":"X-Recurring-Api-Version","required":true,"schema":{"type":"string"},"description":"Include the Customer and Recurring API minor version in the `X-Recurring-Api-Version` request header.\n"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"SoftwareName":{"type":"string","description":"The name of the software making the request.","X-required-conditional":false,"X-condition-logic":""},"SoftwareVersion":{"type":"string","description":"The version of the software making the request.","X-required-conditional":false,"X-condition-logic":""},"CustomerId":{"type":"string","description":"The ID of the customer.","X-required-conditional":false,"X-condition-logic":""},"Token":{"type":"string","description":"Sola token representing payment method.","X-required-conditional":false,"X-condition-logic":""},"TokenType":{"type":"string","description":"The Token payment type.","X-required-conditional":false,"X-condition-logic":""},"TokenAlias":{"type":"string","description":"Custom name for Token.","X-required-conditional":false,"X-condition-logic":""},"Exp":{"type":"string","description":"Credit card expiration date.\n\n**Conditional:** Required if Token is iFields and TokenType is cc.\n","X-required-conditional":true,"X-condition-logic":"Required if Token is iFields and TokenType is cc.","minLength":4,"maxLength":4},"Routing":{"type":"string","description":"ACH routing number.\n\n**Conditional:** Required if Token is iFields and TokenType is ach.\n","X-required-conditional":true,"X-condition-logic":"Required if Token is iFields and TokenType is ach."},"AccountType":{"type":"string","description":"Account type checking/savings.","X-required-conditional":false,"X-condition-logic":"Allowed if TokenType is check."},"Name":{"type":"string","description":"Name on account.\n\n**Conditional:** Required for ACH (check) transactions.\n","X-required-conditional":true,"X-condition-logic":"Required for ACH (check) transactions."},"Street":{"type":"string","description":"Billing street address.","X-required-conditional":false,"X-condition-logic":""},"Zip":{"type":"string","description":"Billing ZIP code.","X-required-conditional":false,"X-condition-logic":""},"SetAsDefault":{"type":"boolean","description":"Set as default payment method.","X-required-conditional":false,"X-condition-logic":""}},"required":["SoftwareName","SoftwareVersion","CustomerId","Token","TokenType"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"Result":{"type":"string","description":"The result of the API call. S=success E=error."},"RefNum":{"type":"string","description":"A unique request ID."},"Error":{"type":"string","description":"Error message if Result is E."},"PaymentMethodId":{"type":"string","description":"The ID of the created payment method."}}}}}}}}}}}
```

## Update Payment Method

> Use this endpoint to update an existing stored payment method linked to a customer. It is useful when default settings, metadata, or payment-method details need to be revised while preserving the existing customer relationship.<br>

```json
{"openapi":"3.0.3","info":{"title":"Sola Payments - Payment Method APIs","version":"1.0.0"},"tags":[{"name":"Payment Method"}],"servers":[{"url":"https://api.cardknox.com","description":"Default API host"}],"paths":{"/v2/UpdatePaymentMethod":{"post":{"summary":"Update Payment Method","description":"Use this endpoint to update an existing stored payment method linked to a customer. It is useful when default settings, metadata, or payment-method details need to be revised while preserving the existing customer relationship.\n","operationId":"API_052_UpdatePaymentMethod","tags":["Payment Method"],"deprecated":false,"parameters":[{"in":"header","name":"Authorization","required":true,"schema":{"type":"string"},"description":"This endpoint is authenticated using your Sola API key. Include the key in the `Authorization` header.\n"},{"in":"header","name":"X-Recurring-Api-Version","required":true,"schema":{"type":"string"},"description":"Include the Customer and Recurring API minor version in the `X-Recurring-Api-Version` request header.\n"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"SoftwareName":{"type":"string","description":"The name of the software making the request.","X-required-conditional":false,"X-condition-logic":""},"SoftwareVersion":{"type":"string","description":"The version of the software making the request.","X-required-conditional":false,"X-condition-logic":""},"Revision":{"type":"integer","description":"Revision number. Update fails if mismatch.","X-required-conditional":false,"X-condition-logic":""},"PaymentMethodId":{"type":"string","description":"The ID of the payment method to update.","X-required-conditional":false,"X-condition-logic":""},"TokenAlias":{"type":"string","description":"Custom name for Token.","X-required-conditional":false,"X-condition-logic":""},"Exp":{"type":"string","description":"Credit card expiration.","X-required-conditional":false,"X-condition-logic":""},"AccountType":{"type":"string","description":"Account type checking/savings.","X-required-conditional":false,"X-condition-logic":""},"Routing":{"type":"string","description":"ACH routing number.\n\n**Conditional:** \n","X-required-conditional":true,"X-condition-logic":""},"Name":{"type":"string","description":"Name on account.\n\n**Conditional:** Required for ACH if Routing\n","X-required-conditional":true,"X-condition-logic":"Required for ACH if Routing"},"Street":{"type":"string","description":"Billing street.","X-required-conditional":false,"X-condition-logic":""},"Zip":{"type":"string","description":"Billing ZIP.","X-required-conditional":false,"X-condition-logic":""},"SetAsDefault":{"type":"boolean","description":"Set as default.","X-required-conditional":false,"X-condition-logic":""}},"required":["SoftwareName","SoftwareVersion","Revision","PaymentMethodId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"Result":{"type":"string","description":"The result of the API call. S=success E=error."},"RefNum":{"type":"string","description":"A unique request ID."},"Error":{"type":"string","description":"Error message if Result is E."}}}}}}}}}}}
```

## Get Payment Method

> Use this endpoint to retrieve a stored payment method by its identifier. It is typically used to load the current payment-method details before an update, to inspect default-method configuration, or to support operational review.<br>

```json
{"openapi":"3.0.3","info":{"title":"Sola Payments - Payment Method APIs","version":"1.0.0"},"tags":[{"name":"Payment Method"}],"servers":[{"url":"https://api.cardknox.com","description":"Default API host"}],"paths":{"/v2/GetPaymentMethod":{"post":{"summary":"Get Payment Method","description":"Use this endpoint to retrieve a stored payment method by its identifier. It is typically used to load the current payment-method details before an update, to inspect default-method configuration, or to support operational review.\n","operationId":"API_053_GetPaymentMethod","tags":["Payment Method"],"deprecated":false,"parameters":[{"in":"header","name":"Authorization","required":true,"schema":{"type":"string"},"description":"This endpoint is authenticated using your Sola API key. Include the key in the `Authorization` header.\n"},{"in":"header","name":"X-Recurring-Api-Version","required":true,"schema":{"type":"string"},"description":"Include the Customer and Recurring API minor version in the `X-Recurring-Api-Version` request header.\n"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"SoftwareName":{"type":"string","description":"The name of the software making the request.","X-required-conditional":false,"X-condition-logic":""},"SoftwareVersion":{"type":"string","description":"The version of the software making the request.","X-required-conditional":false,"X-condition-logic":""},"PaymentMethodId":{"type":"string","description":"The ID of the payment method to retrieve.","X-required-conditional":false,"X-condition-logic":""},"ShowDeleted":{"type":"boolean","description":"Retrieve deleted items if true.","X-required-conditional":false,"X-condition-logic":""}},"required":["SoftwareName","SoftwareVersion","PaymentMethodId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"Result":{"type":"string","description":"The result of the API call. S=success E=error."},"RefNum":{"type":"string","description":"A unique request ID."},"Error":{"type":"string","description":"Error message if Result is E."},"PaymentMethodId":{"type":"string","description":"The ID of the payment method."},"Token":{"type":"string","description":"Payment method Token."},"TokenType":{"type":"string","description":"Payment method TokenType."},"TokenAlias":{"type":"string","description":"Payment method TokenAlias."},"Exp":{"type":"string","description":"Payment method Exp."},"AccountType":{"type":"string","description":"Payment method AccountType."},"Issuer":{"type":"string","description":"Payment method Issuer."},"MaskedCardNumber":{"type":"string","description":"Payment method MaskedCardNumber."},"Name":{"type":"string","description":"Payment method Name."},"Street":{"type":"string","description":"Payment method Street."},"Zip":{"type":"string","description":"Payment method Zip."},"CreatedDate":{"type":"string","description":"Payment method CreatedDate."}}}}}}}}}}}
```

## Delete Payment Method

> Use this endpoint to delete a stored payment method from the Customer & Recurring API. Use it when a customer payment method should no longer be available for recurring schedules or future customer transactions.<br>

```json
{"openapi":"3.0.3","info":{"title":"Sola Payments - Payment Method APIs","version":"1.0.0"},"tags":[{"name":"Payment Method"}],"servers":[{"url":"https://api.cardknox.com","description":"Default API host"}],"paths":{"/v2/DeletePaymentMethod":{"post":{"summary":"Delete Payment Method","description":"Use this endpoint to delete a stored payment method from the Customer & Recurring API. Use it when a customer payment method should no longer be available for recurring schedules or future customer transactions.\n","operationId":"API_054_DeletePaymentMethod","tags":["Payment Method"],"deprecated":false,"parameters":[{"in":"header","name":"Authorization","required":true,"schema":{"type":"string"},"description":"This endpoint is authenticated using your Sola API key. Include the key in the `Authorization` header.\n"},{"in":"header","name":"X-Recurring-Api-Version","required":true,"schema":{"type":"string"},"description":"Include the Customer and Recurring API minor version in the `X-Recurring-Api-Version` request header.\n"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"SoftwareName":{"type":"string","description":"The name of the software making the request.","X-required-conditional":false,"X-condition-logic":""},"SoftwareVersion":{"type":"string","description":"The version of the software making the request.","X-required-conditional":false,"X-condition-logic":""},"PaymentMethodId":{"type":"string","description":"The payment method ID to delete.","X-required-conditional":false,"X-condition-logic":""}},"required":["SoftwareName","SoftwareVersion","PaymentMethodId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"Result":{"type":"string","description":"The result of the API call. S=success E=error."},"RefNum":{"type":"string","description":"A unique request ID."},"Error":{"type":"string","description":"Error message if Result is E."}}}}}}}}}}}
```

## List Payment Methods

> Use this endpoint to list stored payment methods for a customer. It is useful for account-management screens, default payment-method selection, and backend workflows that need to inspect available billing instruments.<br>

```json
{"openapi":"3.0.3","info":{"title":"Sola Payments - Payment Method APIs","version":"1.0.0"},"tags":[{"name":"Payment Method"}],"servers":[{"url":"https://api.cardknox.com","description":"Default API host"}],"paths":{"/v2/ListPaymentMethods":{"post":{"summary":"List Payment Methods","description":"Use this endpoint to list stored payment methods for a customer. It is useful for account-management screens, default payment-method selection, and backend workflows that need to inspect available billing instruments.\n","operationId":"API_055_ListPaymentMethods","tags":["Payment Method"],"deprecated":false,"parameters":[{"in":"header","name":"Authorization","required":true,"schema":{"type":"string"},"description":"This endpoint is authenticated using your Sola API key. Include the key in the `Authorization` header.\n"},{"in":"header","name":"X-Recurring-Api-Version","required":true,"schema":{"type":"string"},"description":"Include the Customer and Recurring API minor version in the `X-Recurring-Api-Version` request header.\n"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"SoftwareName":{"type":"string","description":"The name of the software making the request.","X-required-conditional":false,"X-condition-logic":""},"SoftwareVersion":{"type":"string","description":"The version of the software making the request.","X-required-conditional":false,"X-condition-logic":""},"PageSize":{"type":"integer","description":"The maximum number of items to retrieve for this request.","X-required-conditional":false,"X-condition-logic":""},"NextToken":{"type":"string","description":"A token that can be sent in to the following request to get the next set of payment methods.","X-required-conditional":false,"X-condition-logic":""},"SortOrder":{"type":"string","description":"The list order. Order is determined by payment method creation date.","X-required-conditional":false,"X-condition-logic":""},"Filters":{"type":"string","description":"Filters that can be applied to limit the result set. Filters will remove any items that do not contain the string for that filter value. If there are multiple filters applied, the item must match all of them. Available filters: Filters: IsDeleted CustomerId PaymentMethodId Token TokenType TokenAlias.","X-required-conditional":false,"X-condition-logic":""}},"required":["SoftwareName","SoftwareVersion"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"Result":{"type":"string","description":"The result of the API call. S=success E=error."},"RefNum":{"type":"string","description":"A unique request ID."},"Error":{"type":"string","description":"Error message if Result is E."},"PaymentMethods":{"type":"string","description":"Array of payment method objects."},"NextToken":{"type":"string","description":"Token for next results."}}}}}}}}}}}
```


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://cardknox.gitbook.io/sola-dev-docs/api-reference/customer-and-recurring-api/payment-method.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
