---
updatedAt: 2026-05-06T01:48:30.000Z
agentTools:
  projectIndex: https://docs.vopay.com/llms.txt
---

# API Reference

## Supported Operations

* Generate embed URL for card capture
* Charge a credit card
* Manage cards on file (retrieve, set default, delete)

<br />

## Endpoints

### Generate Embed URL

`POST /api/v2/credit-card/generate-embed-url`

Generates a URL for the hosted credit card capture iframe. Use this to securely collect card details without handling raw card data.

No additional parameters required beyond authentication.

***

### Charge

`POST /api/v2/credit-card/charge`

Charges a linked credit card.

#### Request Parameters

| Parameter             | Type    | Required    | Description                                           |
| --------------------- | ------- | ----------- | ----------------------------------------------------- |
| Amount                | decimal | Yes         | Charge amount                                         |
| Token                 | string  | Conditional | Credit card token. Required if no default card is set |
| ClientAccountID       | string  | Optional    | Link transaction to a sub-account                     |
| ClientReferenceNumber | string  | Optional    | Your internal reference number                        |
| IdempotencyKey        | string  | Optional    | Unique key to prevent duplicate charges               |
| Notes                 | string  | Optional    | Internal notes                                        |

***

### Get Charge Transaction

`GET /api/v2/credit-card/charge/transaction`

Returns details of a single credit card charge transaction.

#### Request Parameters

| Parameter     | Type   | Required | Description                                            |
| ------------- | ------ | -------- | ------------------------------------------------------ |
| TransactionID | string | Yes      | The transaction ID returned from `/credit-card/charge` |

***

### Get Cards on File

`GET /api/v2/credit-card`

Returns all credit cards linked to the account.

No additional parameters required.

***

### Set Default Credit Card

`POST /api/v2/credit-card/set-my-credit-card`

Sets a linked credit card as the default for the account.

#### Request Parameters

| Parameter | Type   | Required | Description                             |
| --------- | ------ | -------- | --------------------------------------- |
| Token     | string | Yes      | The credit card token to set as default |

***

### Get Default Credit Card

`GET /api/v2/credit-card/default-credit-card`

Returns the default credit card configured for the account.

No additional parameters required.

***

### Delete Credit Card

`POST /api/v2/credit-card/delete`

Removes a linked credit card from the account.

#### Request Parameters

| Parameter | Type   | Required | Description                     |
| --------- | ------ | -------- | ------------------------------- |
| Token     | string | Yes      | The credit card token to delete |