curl --request POST \
--url https://api.coinvoyage.io/v3/invoices \
--header 'Authorization: <api-key>' \
--header 'Authorization-Signature: <authorization-signature>' \
--header 'Content-Type: application/json' \
--data '
{
"from": {
"email": "billing@acme.com",
"name": "Acme Inc."
},
"invoice": {
"date": "2026-07-15",
"due_date": "2026-08-15",
"no": "INV-001"
},
"items": [
{
"name": "Consulting",
"quantity": "2",
"tax": "10",
"unitPrice": "100.00"
}
],
"recipient": {
"email": "jane@example.com",
"name": "Jane Doe"
}
}
'import requests
url = "https://api.coinvoyage.io/v3/invoices"
payload = {
"from": {
"email": "billing@acme.com",
"name": "Acme Inc."
},
"invoice": {
"date": "2026-07-15",
"due_date": "2026-08-15",
"no": "INV-001"
},
"items": [
{
"name": "Consulting",
"quantity": "2",
"tax": "10",
"unitPrice": "100.00"
}
],
"recipient": {
"email": "jane@example.com",
"name": "Jane Doe"
}
}
headers = {
"Authorization-Signature": "<authorization-signature>",
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Authorization-Signature': '<authorization-signature>',
Authorization: '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
from: {email: 'billing@acme.com', name: 'Acme Inc.'},
invoice: {date: '2026-07-15', due_date: '2026-08-15', no: 'INV-001'},
items: [{name: 'Consulting', quantity: '2', tax: '10', unitPrice: '100.00'}],
recipient: {email: 'jane@example.com', name: 'Jane Doe'}
})
};
fetch('https://api.coinvoyage.io/v3/invoices', 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.coinvoyage.io/v3/invoices",
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([
'from' => [
'email' => 'billing@acme.com',
'name' => 'Acme Inc.'
],
'invoice' => [
'date' => '2026-07-15',
'due_date' => '2026-08-15',
'no' => 'INV-001'
],
'items' => [
[
'name' => 'Consulting',
'quantity' => '2',
'tax' => '10',
'unitPrice' => '100.00'
]
],
'recipient' => [
'email' => 'jane@example.com',
'name' => 'Jane Doe'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Authorization-Signature: <authorization-signature>",
"Content-Type: application/json"
],
]);
$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.coinvoyage.io/v3/invoices"
payload := strings.NewReader("{\n \"from\": {\n \"email\": \"billing@acme.com\",\n \"name\": \"Acme Inc.\"\n },\n \"invoice\": {\n \"date\": \"2026-07-15\",\n \"due_date\": \"2026-08-15\",\n \"no\": \"INV-001\"\n },\n \"items\": [\n {\n \"name\": \"Consulting\",\n \"quantity\": \"2\",\n \"tax\": \"10\",\n \"unitPrice\": \"100.00\"\n }\n ],\n \"recipient\": {\n \"email\": \"jane@example.com\",\n \"name\": \"Jane Doe\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization-Signature", "<authorization-signature>")
req.Header.Add("Authorization", "<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.coinvoyage.io/v3/invoices")
.header("Authorization-Signature", "<authorization-signature>")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"from\": {\n \"email\": \"billing@acme.com\",\n \"name\": \"Acme Inc.\"\n },\n \"invoice\": {\n \"date\": \"2026-07-15\",\n \"due_date\": \"2026-08-15\",\n \"no\": \"INV-001\"\n },\n \"items\": [\n {\n \"name\": \"Consulting\",\n \"quantity\": \"2\",\n \"tax\": \"10\",\n \"unitPrice\": \"100.00\"\n }\n ],\n \"recipient\": {\n \"email\": \"jane@example.com\",\n \"name\": \"Jane Doe\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.coinvoyage.io/v3/invoices")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization-Signature"] = '<authorization-signature>'
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"from\": {\n \"email\": \"billing@acme.com\",\n \"name\": \"Acme Inc.\"\n },\n \"invoice\": {\n \"date\": \"2026-07-15\",\n \"due_date\": \"2026-08-15\",\n \"no\": \"INV-001\"\n },\n \"items\": [\n {\n \"name\": \"Consulting\",\n \"quantity\": \"2\",\n \"tax\": \"10\",\n \"unitPrice\": \"100.00\"\n }\n ],\n \"recipient\": {\n \"email\": \"jane@example.com\",\n \"name\": \"Jane Doe\"\n }\n}"
response = http.request(request)
puts response.read_body{
"archived_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"data": {
"from": {
"email": "billing@acme.com",
"name": "Acme Inc."
},
"invoice": {
"date": "2026-07-15",
"due_date": "2026-08-15",
"no": "INV-001"
},
"items": [
{
"name": "Consulting",
"quantity": "2",
"tax": "10",
"unitPrice": "100.00"
}
],
"recipient": {
"email": "jane@example.com",
"name": "Jane Doe"
}
},
"id": "cuidjkhg3e289y74u5t6v",
"order_id": "<string>",
"orders": [
{
"created_at": "2023-01-01T00:00:00Z",
"fulfillment": {
"amount": {
"raw": "100000000",
"ui": "100.0",
"value_usd": 100
},
"asset": {
"address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"chain_id": 1,
"decimals": 6,
"id": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48-1",
"name": "USD Coin",
"price_usd": 1,
"symbol": "USDC"
},
"custom_fee_bps": 50,
"fiat_unit": "USD",
"rate_usd": "1.00",
"recipient": "0x1234...abcd",
"swap": {
"slippage_bps": 50,
"trade_type": "EXACT_INPUT"
}
},
"hosted_url": "https://pay.coinvoyage.io/pay/cuidjkhg3e289y74u5t6v",
"id": "cuidjkhg3e289y74u5t6v",
"metadata": {
"items": [
{
"currency": "USD",
"description": "High-quality widget with extra features",
"image": "https://example.com/images/widget.png",
"name": "Premium Widget",
"quantity": 2,
"unit_price": 49.99
}
],
"refund": {
"additional_info": "Item was never shipped",
"currency": "USD",
"name": "Order Cancellation",
"reason": "Customer requested refund",
"refund_amount": 99.98
}
},
"mode": "SALE",
"organization_id": "org_123",
"payment": {
"destination_tx_hash": "0x5678...efgh",
"estimated_duration_seconds": 120,
"expires_at": "2023-01-01T00:00:00Z",
"fee_tx_hash": "0xfee1...fee2",
"input": {
"amount": {
"raw": "100000000",
"ui": "100.0",
"value_usd": 100
},
"balance": {
"raw": "100000000",
"ui": "100.0",
"value_usd": 100
},
"breakdown": {
"base": {
"raw": "100000000",
"ui": "100.0",
"value_usd": 100
},
"fees": {
"custom_fee": {
"raw": "100000000",
"ui": "100.0",
"value_usd": 100
},
"protocol_fee": {
"raw": "100000000",
"ui": "100.0",
"value_usd": 100
},
"relayer_fee": {
"raw": "100000000",
"ui": "100.0",
"value_usd": 100
},
"total_fee": {
"raw": "100000000",
"ui": "100.0",
"value_usd": 100
}
},
"gas": {
"raw": "100000000",
"ui": "100.0",
"value_usd": 100
},
"total": {
"raw": "100000000",
"ui": "100.0",
"value_usd": 100
}
},
"currency": {
"address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"chain_id": 1,
"decimals": 6,
"id": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48-1",
"name": "USD Coin",
"price_usd": 1,
"symbol": "USDC"
}
},
"output": {
"amount": {
"raw": "100000000",
"ui": "100.0",
"value_usd": 100
},
"amount_out_minimum": {
"raw": "100000000",
"ui": "100.0",
"value_usd": 100
},
"currency": {
"address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"chain_id": 1,
"decimals": 6,
"id": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48-1",
"name": "USD Coin",
"price_usd": 1,
"symbol": "USDC"
}
},
"payment_rail": "CRYPTO",
"recipient": "0x1234...abcd",
"refund": {
"address": "0x1234...abcd",
"reason": "execution failed: provider error",
"tx_hash": "0x9abc...ijkl"
},
"source_tx_hash": "0x1234...abcd",
"steps": [
{
"action": "swap",
"kind": "deposit",
"rail": "CRYPTO"
}
]
},
"settings": {
"card_payments": true,
"hide_footer": true
},
"status": "PENDING",
"updated_at": "2023-01-01T00:00:00Z"
}
],
"organization_id": "org_123",
"payment_url": "https://pay.coinvoyage.io/invoices/cuidjkhg3e289y74u5t6v",
"published_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"code": 400,
"error": "Bad Request",
"message": "Invalid request parameters"
}{
"code": 400,
"error": "Bad Request",
"message": "Invalid request parameters"
}{
"code": 400,
"error": "Bad Request",
"message": "Invalid request parameters"
}Create Invoice
Creates and publishes an invoice backed by a SALE pay order. The recipient is emailed a PDF invoice with a hosted payment link. Pass id to publish an existing draft.
curl --request POST \
--url https://api.coinvoyage.io/v3/invoices \
--header 'Authorization: <api-key>' \
--header 'Authorization-Signature: <authorization-signature>' \
--header 'Content-Type: application/json' \
--data '
{
"from": {
"email": "billing@acme.com",
"name": "Acme Inc."
},
"invoice": {
"date": "2026-07-15",
"due_date": "2026-08-15",
"no": "INV-001"
},
"items": [
{
"name": "Consulting",
"quantity": "2",
"tax": "10",
"unitPrice": "100.00"
}
],
"recipient": {
"email": "jane@example.com",
"name": "Jane Doe"
}
}
'import requests
url = "https://api.coinvoyage.io/v3/invoices"
payload = {
"from": {
"email": "billing@acme.com",
"name": "Acme Inc."
},
"invoice": {
"date": "2026-07-15",
"due_date": "2026-08-15",
"no": "INV-001"
},
"items": [
{
"name": "Consulting",
"quantity": "2",
"tax": "10",
"unitPrice": "100.00"
}
],
"recipient": {
"email": "jane@example.com",
"name": "Jane Doe"
}
}
headers = {
"Authorization-Signature": "<authorization-signature>",
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Authorization-Signature': '<authorization-signature>',
Authorization: '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
from: {email: 'billing@acme.com', name: 'Acme Inc.'},
invoice: {date: '2026-07-15', due_date: '2026-08-15', no: 'INV-001'},
items: [{name: 'Consulting', quantity: '2', tax: '10', unitPrice: '100.00'}],
recipient: {email: 'jane@example.com', name: 'Jane Doe'}
})
};
fetch('https://api.coinvoyage.io/v3/invoices', 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.coinvoyage.io/v3/invoices",
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([
'from' => [
'email' => 'billing@acme.com',
'name' => 'Acme Inc.'
],
'invoice' => [
'date' => '2026-07-15',
'due_date' => '2026-08-15',
'no' => 'INV-001'
],
'items' => [
[
'name' => 'Consulting',
'quantity' => '2',
'tax' => '10',
'unitPrice' => '100.00'
]
],
'recipient' => [
'email' => 'jane@example.com',
'name' => 'Jane Doe'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Authorization-Signature: <authorization-signature>",
"Content-Type: application/json"
],
]);
$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.coinvoyage.io/v3/invoices"
payload := strings.NewReader("{\n \"from\": {\n \"email\": \"billing@acme.com\",\n \"name\": \"Acme Inc.\"\n },\n \"invoice\": {\n \"date\": \"2026-07-15\",\n \"due_date\": \"2026-08-15\",\n \"no\": \"INV-001\"\n },\n \"items\": [\n {\n \"name\": \"Consulting\",\n \"quantity\": \"2\",\n \"tax\": \"10\",\n \"unitPrice\": \"100.00\"\n }\n ],\n \"recipient\": {\n \"email\": \"jane@example.com\",\n \"name\": \"Jane Doe\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization-Signature", "<authorization-signature>")
req.Header.Add("Authorization", "<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.coinvoyage.io/v3/invoices")
.header("Authorization-Signature", "<authorization-signature>")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"from\": {\n \"email\": \"billing@acme.com\",\n \"name\": \"Acme Inc.\"\n },\n \"invoice\": {\n \"date\": \"2026-07-15\",\n \"due_date\": \"2026-08-15\",\n \"no\": \"INV-001\"\n },\n \"items\": [\n {\n \"name\": \"Consulting\",\n \"quantity\": \"2\",\n \"tax\": \"10\",\n \"unitPrice\": \"100.00\"\n }\n ],\n \"recipient\": {\n \"email\": \"jane@example.com\",\n \"name\": \"Jane Doe\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.coinvoyage.io/v3/invoices")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization-Signature"] = '<authorization-signature>'
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"from\": {\n \"email\": \"billing@acme.com\",\n \"name\": \"Acme Inc.\"\n },\n \"invoice\": {\n \"date\": \"2026-07-15\",\n \"due_date\": \"2026-08-15\",\n \"no\": \"INV-001\"\n },\n \"items\": [\n {\n \"name\": \"Consulting\",\n \"quantity\": \"2\",\n \"tax\": \"10\",\n \"unitPrice\": \"100.00\"\n }\n ],\n \"recipient\": {\n \"email\": \"jane@example.com\",\n \"name\": \"Jane Doe\"\n }\n}"
response = http.request(request)
puts response.read_body{
"archived_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"data": {
"from": {
"email": "billing@acme.com",
"name": "Acme Inc."
},
"invoice": {
"date": "2026-07-15",
"due_date": "2026-08-15",
"no": "INV-001"
},
"items": [
{
"name": "Consulting",
"quantity": "2",
"tax": "10",
"unitPrice": "100.00"
}
],
"recipient": {
"email": "jane@example.com",
"name": "Jane Doe"
}
},
"id": "cuidjkhg3e289y74u5t6v",
"order_id": "<string>",
"orders": [
{
"created_at": "2023-01-01T00:00:00Z",
"fulfillment": {
"amount": {
"raw": "100000000",
"ui": "100.0",
"value_usd": 100
},
"asset": {
"address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"chain_id": 1,
"decimals": 6,
"id": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48-1",
"name": "USD Coin",
"price_usd": 1,
"symbol": "USDC"
},
"custom_fee_bps": 50,
"fiat_unit": "USD",
"rate_usd": "1.00",
"recipient": "0x1234...abcd",
"swap": {
"slippage_bps": 50,
"trade_type": "EXACT_INPUT"
}
},
"hosted_url": "https://pay.coinvoyage.io/pay/cuidjkhg3e289y74u5t6v",
"id": "cuidjkhg3e289y74u5t6v",
"metadata": {
"items": [
{
"currency": "USD",
"description": "High-quality widget with extra features",
"image": "https://example.com/images/widget.png",
"name": "Premium Widget",
"quantity": 2,
"unit_price": 49.99
}
],
"refund": {
"additional_info": "Item was never shipped",
"currency": "USD",
"name": "Order Cancellation",
"reason": "Customer requested refund",
"refund_amount": 99.98
}
},
"mode": "SALE",
"organization_id": "org_123",
"payment": {
"destination_tx_hash": "0x5678...efgh",
"estimated_duration_seconds": 120,
"expires_at": "2023-01-01T00:00:00Z",
"fee_tx_hash": "0xfee1...fee2",
"input": {
"amount": {
"raw": "100000000",
"ui": "100.0",
"value_usd": 100
},
"balance": {
"raw": "100000000",
"ui": "100.0",
"value_usd": 100
},
"breakdown": {
"base": {
"raw": "100000000",
"ui": "100.0",
"value_usd": 100
},
"fees": {
"custom_fee": {
"raw": "100000000",
"ui": "100.0",
"value_usd": 100
},
"protocol_fee": {
"raw": "100000000",
"ui": "100.0",
"value_usd": 100
},
"relayer_fee": {
"raw": "100000000",
"ui": "100.0",
"value_usd": 100
},
"total_fee": {
"raw": "100000000",
"ui": "100.0",
"value_usd": 100
}
},
"gas": {
"raw": "100000000",
"ui": "100.0",
"value_usd": 100
},
"total": {
"raw": "100000000",
"ui": "100.0",
"value_usd": 100
}
},
"currency": {
"address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"chain_id": 1,
"decimals": 6,
"id": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48-1",
"name": "USD Coin",
"price_usd": 1,
"symbol": "USDC"
}
},
"output": {
"amount": {
"raw": "100000000",
"ui": "100.0",
"value_usd": 100
},
"amount_out_minimum": {
"raw": "100000000",
"ui": "100.0",
"value_usd": 100
},
"currency": {
"address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"chain_id": 1,
"decimals": 6,
"id": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48-1",
"name": "USD Coin",
"price_usd": 1,
"symbol": "USDC"
}
},
"payment_rail": "CRYPTO",
"recipient": "0x1234...abcd",
"refund": {
"address": "0x1234...abcd",
"reason": "execution failed: provider error",
"tx_hash": "0x9abc...ijkl"
},
"source_tx_hash": "0x1234...abcd",
"steps": [
{
"action": "swap",
"kind": "deposit",
"rail": "CRYPTO"
}
]
},
"settings": {
"card_payments": true,
"hide_footer": true
},
"status": "PENDING",
"updated_at": "2023-01-01T00:00:00Z"
}
],
"organization_id": "org_123",
"payment_url": "https://pay.coinvoyage.io/invoices/cuidjkhg3e289y74u5t6v",
"published_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"code": 400,
"error": "Bad Request",
"message": "Invalid request parameters"
}{
"code": 400,
"error": "Bad Request",
"message": "Invalid request parameters"
}{
"code": 400,
"error": "Bad Request",
"message": "Invalid request parameters"
}Authorizations
HMAC-SHA256 signature. See the Authorization-Signature header parameter on signed operations.
Headers
HMAC-SHA256 signature header: 'APIKey=<api_key>,signature=,timestamp=<unix_timestamp>'. The signature is computed over METHOD + path (with the /v3 prefix stripped) + timestamp.
Body
Show child attributes
Show child attributes
{
"date": "2026-07-15",
"due_date": "2026-08-15",
"no": "INV-001"
}
Show child attributes
Show child attributes
{
"email": "billing@acme.com",
"name": "Acme Inc."
}
Show child attributes
Show child attributes
{
"email": "jane@example.com",
"name": "Jane Doe"
}
Show child attributes
Show child attributes
Response
Invoice created
Invoice details as provided on create.
Show child attributes
Show child attributes
"cuidjkhg3e289y74u5t6v"
Latest linked pay order id.
Show child attributes
Show child attributes
"org_123"
"https://pay.coinvoyage.io/invoices/cuidjkhg3e289y74u5t6v"
Was this page helpful?