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

# Create Vault Payment Account

POST https://javelin.runpayments.io/api/v1/vault_payment_accounts
Content-Type: application/json

Creates a new vault payment account for secure storage of payment information

Reference: https://docs.runpayments.io/reference/payments-api/create-vault-payment-account

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Body (application/json)

This endpoint expects an object.

- `name` (string, required) — Cardholder name or account holder name
- `mid` (string, required) — Merchant ID associated with this vault
- `account_token` (string, required) — Tokenized representation of the payment account.
- `vault_id` (integer, optional) — Unique identifier for the vault payment method. *Required if updating an existing vault.
- `is_default` (boolean, optional) — Whether this is the default payment method for the customer
- `address1` (string, optional) — Billing address line 1
- `city` (string, optional) — Billing address city
- `region` (string, optional) — Billing address state/province/region
- `country` (string, optional) — Billing address country code
- `account_zip` (string, optional) — Billing address ZIP/postal code
- `email` (string, optional) — Customer email address
- `phone` (string, optional) — Customer phone number
- `custom06` (string, optional) — Custom field for merchant-specific data
- `custom07` (string, optional) — Custom field for merchant-specific data
- `custom08` (string, optional) — Custom field for merchant-specific data
- `custom09` (string, optional) — Custom field for merchant-specific data
- `custom10` (string, optional) — Custom field for merchant-specific data

## Response

### 200

Vault payment account created successfully

- `uuid` (string, required) — Universal unique identifier for the payment account
- `vault_id` (integer, required) — Unique identifier for the vault payment method
- `mid` (string, required) — Merchant ID associated with this vault
- `name` (string, required) — Cardholder name or account holder name
- `account_type` (integer, required) — Type of payment account (1=Credit, 2=Debit, 3=Checking, 4=Savings)
- `is_default` (boolean, required) — Whether this is the default payment method for the customer
- `zipcode` (string, required) — Billing address ZIP/postal code
- `address1` (string, required) — Billing address line 1
- `address2` (string, required, nullable) — Billing address line 2
- `city` (string, required) — Billing address city
- `region` (string, required) — Billing address state/province/region
- `country` (string, required) — Billing address country code
- `phone` (string, required) — Customer phone number
- `email` (string, required) — Customer email address
- `account_token` (string, required) — Tokenized representation of the payment account
- `custom06` (string, required, nullable) — Custom field for merchant-specific data
- `custom07` (string, required, nullable) — Custom field for merchant-specific data
- `custom08` (string, required, nullable) — Custom field for merchant-specific data
- `custom09` (string, required, nullable) — Custom field for merchant-specific data
- `custom10` (string, required, nullable) — Custom field for merchant-specific data
- `created_date` (string, required) — Timestamp when the vault was created

## Errors

### 400 Bad Request Error

Bad request

- `error` (string, optional) — Error code
- `error_description` (string, optional) — Detailed error description

### 401 Unauthorized Error

Unauthorized

- `error` (string, optional) — Error code
- `error_description` (string, optional) — Detailed error description

## Examples

**Request**

```json
{
  "name": "Testing Test",
  "mid": "800000001780",
  "account_token": "9546584504635454",
  "vault_id": 1,
  "is_default": true,
  "address1": "123 Winding Way",
  "city": "San Francisco",
  "region": "CA",
  "country": "US",
  "account_zip": "55555",
  "email": "test@test.com",
  "phone": "5485429876",
  "custom06": "User 5",
  "custom07": "NW Territory",
  "custom08": "786352"
}
```

**Response**

```json
{
  "uuid": "1f0ebd06-1df3-6b70-87a3-b640c0589dea",
  "vault_id": 59803,
  "mid": "800000001780",
  "name": "Testing Test",
  "account_type": 1,
  "is_default": true,
  "zipcode": "55555",
  "address1": "123 Winding Way",
  "address2": "string",
  "city": "San Francisco",
  "region": "CA",
  "country": "US",
  "phone": "5485429876",
  "email": "test@test.com",
  "account_token": "9546584504635454",
  "custom06": "User 5",
  "custom07": "NW Territory",
  "custom08": "786352",
  "custom09": null,
  "custom10": null,
  "created_date": "2026-01-07T13:54:28.182Z"
}
```

**SDK Code**

```python
import requests

url = "https://javelin.runpayments.io/api/v1/vault_payment_accounts"

payload = {
    "name": "Testing Test",
    "mid": "800000001780",
    "account_token": "9546584504635454",
    "vault_id": 1,
    "is_default": True,
    "address1": "123 Winding Way",
    "city": "San Francisco",
    "region": "CA",
    "country": "US",
    "account_zip": "55555",
    "email": "test@test.com",
    "phone": "5485429876",
    "custom06": "User 5",
    "custom07": "NW Territory",
    "custom08": "786352"
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://javelin.runpayments.io/api/v1/vault_payment_accounts';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"name":"Testing Test","mid":"800000001780","account_token":"9546584504635454","vault_id":1,"is_default":true,"address1":"123 Winding Way","city":"San Francisco","region":"CA","country":"US","account_zip":"55555","email":"test@test.com","phone":"5485429876","custom06":"User 5","custom07":"NW Territory","custom08":"786352"}'
};

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

```go
package main

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

func main() {

	url := "https://javelin.runpayments.io/api/v1/vault_payment_accounts"

	payload := strings.NewReader("{\n  \"name\": \"Testing Test\",\n  \"mid\": \"800000001780\",\n  \"account_token\": \"9546584504635454\",\n  \"vault_id\": 1,\n  \"is_default\": true,\n  \"address1\": \"123 Winding Way\",\n  \"city\": \"San Francisco\",\n  \"region\": \"CA\",\n  \"country\": \"US\",\n  \"account_zip\": \"55555\",\n  \"email\": \"test@test.com\",\n  \"phone\": \"5485429876\",\n  \"custom06\": \"User 5\",\n  \"custom07\": \"NW Territory\",\n  \"custom08\": \"786352\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

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

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

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

}
```

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

url = URI("https://javelin.runpayments.io/api/v1/vault_payment_accounts")

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

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"name\": \"Testing Test\",\n  \"mid\": \"800000001780\",\n  \"account_token\": \"9546584504635454\",\n  \"vault_id\": 1,\n  \"is_default\": true,\n  \"address1\": \"123 Winding Way\",\n  \"city\": \"San Francisco\",\n  \"region\": \"CA\",\n  \"country\": \"US\",\n  \"account_zip\": \"55555\",\n  \"email\": \"test@test.com\",\n  \"phone\": \"5485429876\",\n  \"custom06\": \"User 5\",\n  \"custom07\": \"NW Territory\",\n  \"custom08\": \"786352\"\n}"

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

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

HttpResponse<String> response = Unirest.post("https://javelin.runpayments.io/api/v1/vault_payment_accounts")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"name\": \"Testing Test\",\n  \"mid\": \"800000001780\",\n  \"account_token\": \"9546584504635454\",\n  \"vault_id\": 1,\n  \"is_default\": true,\n  \"address1\": \"123 Winding Way\",\n  \"city\": \"San Francisco\",\n  \"region\": \"CA\",\n  \"country\": \"US\",\n  \"account_zip\": \"55555\",\n  \"email\": \"test@test.com\",\n  \"phone\": \"5485429876\",\n  \"custom06\": \"User 5\",\n  \"custom07\": \"NW Territory\",\n  \"custom08\": \"786352\"\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://javelin.runpayments.io/api/v1/vault_payment_accounts', [
  'body' => '{
  "name": "Testing Test",
  "mid": "800000001780",
  "account_token": "9546584504635454",
  "vault_id": 1,
  "is_default": true,
  "address1": "123 Winding Way",
  "city": "San Francisco",
  "region": "CA",
  "country": "US",
  "account_zip": "55555",
  "email": "test@test.com",
  "phone": "5485429876",
  "custom06": "User 5",
  "custom07": "NW Territory",
  "custom08": "786352"
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://javelin.runpayments.io/api/v1/vault_payment_accounts");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"name\": \"Testing Test\",\n  \"mid\": \"800000001780\",\n  \"account_token\": \"9546584504635454\",\n  \"vault_id\": 1,\n  \"is_default\": true,\n  \"address1\": \"123 Winding Way\",\n  \"city\": \"San Francisco\",\n  \"region\": \"CA\",\n  \"country\": \"US\",\n  \"account_zip\": \"55555\",\n  \"email\": \"test@test.com\",\n  \"phone\": \"5485429876\",\n  \"custom06\": \"User 5\",\n  \"custom07\": \"NW Territory\",\n  \"custom08\": \"786352\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "name": "Testing Test",
  "mid": "800000001780",
  "account_token": "9546584504635454",
  "vault_id": 1,
  "is_default": true,
  "address1": "123 Winding Way",
  "city": "San Francisco",
  "region": "CA",
  "country": "US",
  "account_zip": "55555",
  "email": "test@test.com",
  "phone": "5485429876",
  "custom06": "User 5",
  "custom07": "NW Territory",
  "custom08": "786352"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://javelin.runpayments.io/api/v1/vault_payment_accounts")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

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()
```