Create a wallet
curl --request POST \
--url https://api.yara.cash/v1/wallets \
--header 'Content-Type: application/json' \
--header 'X-Idempotency-Key: <x-idempotency-key>' \
--header 'X-Yara-API-Key: <api-key>' \
--data '
{
"customer_id": "5ec10df5-acde-4e95-926c-2174279cf2fd",
"label": "Customer receipts"
}
'import requests
url = "https://api.yara.cash/v1/wallets"
payload = {
"customer_id": "5ec10df5-acde-4e95-926c-2174279cf2fd",
"label": "Customer receipts"
}
headers = {
"X-Idempotency-Key": "<x-idempotency-key>",
"X-Yara-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Idempotency-Key': '<x-idempotency-key>',
'X-Yara-API-Key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
customer_id: '5ec10df5-acde-4e95-926c-2174279cf2fd',
label: 'Customer receipts'
})
};
fetch('https://api.yara.cash/v1/wallets', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.yara.cash/v1/wallets",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'customer_id' => '5ec10df5-acde-4e95-926c-2174279cf2fd',
'label' => 'Customer receipts'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Idempotency-Key: <x-idempotency-key>",
"X-Yara-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.yara.cash/v1/wallets"
payload := strings.NewReader("{\n \"customer_id\": \"5ec10df5-acde-4e95-926c-2174279cf2fd\",\n \"label\": \"Customer receipts\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Idempotency-Key", "<x-idempotency-key>")
req.Header.Add("X-Yara-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.yara.cash/v1/wallets")
.header("X-Idempotency-Key", "<x-idempotency-key>")
.header("X-Yara-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"customer_id\": \"5ec10df5-acde-4e95-926c-2174279cf2fd\",\n \"label\": \"Customer receipts\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.yara.cash/v1/wallets")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Idempotency-Key"] = '<x-idempotency-key>'
request["X-Yara-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"customer_id\": \"5ec10df5-acde-4e95-926c-2174279cf2fd\",\n \"label\": \"Customer receipts\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"created_at": "2026-08-17T10:00:00Z",
"customer_id": "5ec10df5-acde-4e95-926c-2174279cf2fd",
"destinations": [
{
"address": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
"chain": "BASE",
"failure_reason": "provider unavailable",
"id": "ea38c60e-7a0b-44f6-bdf0-8ec13a7e471a",
"last_attempted_at": "2026-08-17T10:00:00Z",
"provisioned_at": "2026-08-17T10:00:02Z",
"status": "ACTIVE"
}
],
"id": "7f7c6713-3fdc-43fb-a9e7-d3c364e7c763",
"label": "Customer receipts",
"merchant_id": "8fca3c8d-5d48-4f4d-a286-2ef6d1cd2f01",
"status": "ACTIVE",
"updated_at": "2026-08-17T10:00:02Z"
},
"error": "<string>",
"message": "resource retrieved",
"status": "success"
}{
"data": {
"created_at": "2026-08-17T10:00:00Z",
"customer_id": "5ec10df5-acde-4e95-926c-2174279cf2fd",
"destinations": [
{
"address": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
"chain": "BASE",
"failure_reason": "provider unavailable",
"id": "ea38c60e-7a0b-44f6-bdf0-8ec13a7e471a",
"last_attempted_at": "2026-08-17T10:00:00Z",
"provisioned_at": "2026-08-17T10:00:02Z",
"status": "ACTIVE"
}
],
"id": "7f7c6713-3fdc-43fb-a9e7-d3c364e7c763",
"label": "Customer receipts",
"merchant_id": "8fca3c8d-5d48-4f4d-a286-2ef6d1cd2f01",
"status": "ACTIVE",
"updated_at": "2026-08-17T10:00:02Z"
},
"error": "<string>",
"message": "resource retrieved",
"status": "success"
}{
"data": {},
"error": "validation_error",
"message": "invalid JSON body",
"status": "error"
}{
"data": {},
"error": "validation_error",
"message": "invalid JSON body",
"status": "error"
}{
"data": {},
"error": "validation_error",
"message": "invalid JSON body",
"status": "error"
}Wallets
Create a wallet
Creates one wallet and generates a receive address for every supported deposit chain.
POST
/
v1
/
wallets
Create a wallet
curl --request POST \
--url https://api.yara.cash/v1/wallets \
--header 'Content-Type: application/json' \
--header 'X-Idempotency-Key: <x-idempotency-key>' \
--header 'X-Yara-API-Key: <api-key>' \
--data '
{
"customer_id": "5ec10df5-acde-4e95-926c-2174279cf2fd",
"label": "Customer receipts"
}
'import requests
url = "https://api.yara.cash/v1/wallets"
payload = {
"customer_id": "5ec10df5-acde-4e95-926c-2174279cf2fd",
"label": "Customer receipts"
}
headers = {
"X-Idempotency-Key": "<x-idempotency-key>",
"X-Yara-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Idempotency-Key': '<x-idempotency-key>',
'X-Yara-API-Key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
customer_id: '5ec10df5-acde-4e95-926c-2174279cf2fd',
label: 'Customer receipts'
})
};
fetch('https://api.yara.cash/v1/wallets', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.yara.cash/v1/wallets",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'customer_id' => '5ec10df5-acde-4e95-926c-2174279cf2fd',
'label' => 'Customer receipts'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Idempotency-Key: <x-idempotency-key>",
"X-Yara-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.yara.cash/v1/wallets"
payload := strings.NewReader("{\n \"customer_id\": \"5ec10df5-acde-4e95-926c-2174279cf2fd\",\n \"label\": \"Customer receipts\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Idempotency-Key", "<x-idempotency-key>")
req.Header.Add("X-Yara-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.yara.cash/v1/wallets")
.header("X-Idempotency-Key", "<x-idempotency-key>")
.header("X-Yara-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"customer_id\": \"5ec10df5-acde-4e95-926c-2174279cf2fd\",\n \"label\": \"Customer receipts\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.yara.cash/v1/wallets")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Idempotency-Key"] = '<x-idempotency-key>'
request["X-Yara-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"customer_id\": \"5ec10df5-acde-4e95-926c-2174279cf2fd\",\n \"label\": \"Customer receipts\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"created_at": "2026-08-17T10:00:00Z",
"customer_id": "5ec10df5-acde-4e95-926c-2174279cf2fd",
"destinations": [
{
"address": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
"chain": "BASE",
"failure_reason": "provider unavailable",
"id": "ea38c60e-7a0b-44f6-bdf0-8ec13a7e471a",
"last_attempted_at": "2026-08-17T10:00:00Z",
"provisioned_at": "2026-08-17T10:00:02Z",
"status": "ACTIVE"
}
],
"id": "7f7c6713-3fdc-43fb-a9e7-d3c364e7c763",
"label": "Customer receipts",
"merchant_id": "8fca3c8d-5d48-4f4d-a286-2ef6d1cd2f01",
"status": "ACTIVE",
"updated_at": "2026-08-17T10:00:02Z"
},
"error": "<string>",
"message": "resource retrieved",
"status": "success"
}{
"data": {
"created_at": "2026-08-17T10:00:00Z",
"customer_id": "5ec10df5-acde-4e95-926c-2174279cf2fd",
"destinations": [
{
"address": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
"chain": "BASE",
"failure_reason": "provider unavailable",
"id": "ea38c60e-7a0b-44f6-bdf0-8ec13a7e471a",
"last_attempted_at": "2026-08-17T10:00:00Z",
"provisioned_at": "2026-08-17T10:00:02Z",
"status": "ACTIVE"
}
],
"id": "7f7c6713-3fdc-43fb-a9e7-d3c364e7c763",
"label": "Customer receipts",
"merchant_id": "8fca3c8d-5d48-4f4d-a286-2ef6d1cd2f01",
"status": "ACTIVE",
"updated_at": "2026-08-17T10:00:02Z"
},
"error": "<string>",
"message": "resource retrieved",
"status": "success"
}{
"data": {},
"error": "validation_error",
"message": "invalid JSON body",
"status": "error"
}{
"data": {},
"error": "validation_error",
"message": "invalid JSON body",
"status": "error"
}{
"data": {},
"error": "validation_error",
"message": "invalid JSON body",
"status": "error"
}Authorizations
Your Yara API key. Send it in the X-Yara-API-Key header.
Headers
Idempotency key
Body
application/json
Wallet creation request