Create a payment link
curl --request POST \
--url https://api.staging.paywire.xyz/payments/links \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"amount": 49.9,
"currency": "USD",
"callbackUrl": "https://shop.example.com/webhooks/paywire",
"returnUrl": "https://shop.example.com/orders/1042",
"orderTtlMinutes": 20,
"allowedAssets": [
{
"network": "ethereum_sepolia",
"token": "0x1c7d4b196cb0c7b01d743fbc6116a902379c7238"
},
{
"network": "solana_devnet",
"token": "native"
}
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
amount: 49.9,
currency: 'USD',
callbackUrl: 'https://shop.example.com/webhooks/paywire',
returnUrl: 'https://shop.example.com/orders/1042',
orderTtlMinutes: 20,
allowedAssets: [
{
network: 'ethereum_sepolia',
token: '0x1c7d4b196cb0c7b01d743fbc6116a902379c7238'
},
{network: 'solana_devnet', token: 'native'}
]
})
};
fetch('https://api.staging.paywire.xyz/payments/links', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.staging.paywire.xyz/payments/links"
payload = {
"amount": 49.9,
"currency": "USD",
"callbackUrl": "https://shop.example.com/webhooks/paywire",
"returnUrl": "https://shop.example.com/orders/1042",
"orderTtlMinutes": 20,
"allowedAssets": [
{
"network": "ethereum_sepolia",
"token": "0x1c7d4b196cb0c7b01d743fbc6116a902379c7238"
},
{
"network": "solana_devnet",
"token": "native"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)using RestSharp;
var options = new RestClientOptions("https://api.staging.paywire.xyz/payments/links");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("{\n \"amount\": 49.9,\n \"currency\": \"USD\",\n \"callbackUrl\": \"https://shop.example.com/webhooks/paywire\",\n \"returnUrl\": \"https://shop.example.com/orders/1042\",\n \"orderTtlMinutes\": 20,\n \"allowedAssets\": [\n {\n \"network\": \"ethereum_sepolia\",\n \"token\": \"0x1c7d4b196cb0c7b01d743fbc6116a902379c7238\"\n },\n {\n \"network\": \"solana_devnet\",\n \"token\": \"native\"\n }\n ]\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
{
"id": "0193a0c4-5f2e-7c1d-9b8a-3e4f5a6b7c8d",
"merchantId": "0193a0b1-2c3d-7e4f-8a9b-0c1d2e3f4a5b",
"amount": 49.9,
"currency": "USD",
"allowedAssets": [
{
"network": "ethereum_sepolia",
"token": "0x1c7d4b196cb0c7b01d743fbc6116a902379c7238",
"decimals": 6
},
{
"network": "solana_devnet",
"token": "native",
"decimals": 9
}
],
"callbackUrl": "https://shop.example.com/webhooks/paywire",
"orderTtlMinutes": 20,
"policyOverride": null,
"returnUrl": "https://shop.example.com/orders/1042",
"isActive": true,
"createdAt": "2026-10-24T09:12:31.204Z"
}{
"title": "PaymentLink.NoAllowedAssets",
"status": 400,
"detail": "A link needs at least one allowed asset."
}{
"title": "Merchant.Disabled",
"status": 409,
"detail": "This merchant is disabled and can't take new payments."
}Payment links
Create a payment link
Creates a link for an amount in fiat, payable in any of allowedAssets. Send the payer to https://pay.staging.paywire.xyz/pay/{id}.
POST
/
payments
/
links
Create a payment link
curl --request POST \
--url https://api.staging.paywire.xyz/payments/links \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"amount": 49.9,
"currency": "USD",
"callbackUrl": "https://shop.example.com/webhooks/paywire",
"returnUrl": "https://shop.example.com/orders/1042",
"orderTtlMinutes": 20,
"allowedAssets": [
{
"network": "ethereum_sepolia",
"token": "0x1c7d4b196cb0c7b01d743fbc6116a902379c7238"
},
{
"network": "solana_devnet",
"token": "native"
}
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
amount: 49.9,
currency: 'USD',
callbackUrl: 'https://shop.example.com/webhooks/paywire',
returnUrl: 'https://shop.example.com/orders/1042',
orderTtlMinutes: 20,
allowedAssets: [
{
network: 'ethereum_sepolia',
token: '0x1c7d4b196cb0c7b01d743fbc6116a902379c7238'
},
{network: 'solana_devnet', token: 'native'}
]
})
};
fetch('https://api.staging.paywire.xyz/payments/links', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.staging.paywire.xyz/payments/links"
payload = {
"amount": 49.9,
"currency": "USD",
"callbackUrl": "https://shop.example.com/webhooks/paywire",
"returnUrl": "https://shop.example.com/orders/1042",
"orderTtlMinutes": 20,
"allowedAssets": [
{
"network": "ethereum_sepolia",
"token": "0x1c7d4b196cb0c7b01d743fbc6116a902379c7238"
},
{
"network": "solana_devnet",
"token": "native"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)using RestSharp;
var options = new RestClientOptions("https://api.staging.paywire.xyz/payments/links");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("{\n \"amount\": 49.9,\n \"currency\": \"USD\",\n \"callbackUrl\": \"https://shop.example.com/webhooks/paywire\",\n \"returnUrl\": \"https://shop.example.com/orders/1042\",\n \"orderTtlMinutes\": 20,\n \"allowedAssets\": [\n {\n \"network\": \"ethereum_sepolia\",\n \"token\": \"0x1c7d4b196cb0c7b01d743fbc6116a902379c7238\"\n },\n {\n \"network\": \"solana_devnet\",\n \"token\": \"native\"\n }\n ]\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
{
"id": "0193a0c4-5f2e-7c1d-9b8a-3e4f5a6b7c8d",
"merchantId": "0193a0b1-2c3d-7e4f-8a9b-0c1d2e3f4a5b",
"amount": 49.9,
"currency": "USD",
"allowedAssets": [
{
"network": "ethereum_sepolia",
"token": "0x1c7d4b196cb0c7b01d743fbc6116a902379c7238",
"decimals": 6
},
{
"network": "solana_devnet",
"token": "native",
"decimals": 9
}
],
"callbackUrl": "https://shop.example.com/webhooks/paywire",
"orderTtlMinutes": 20,
"policyOverride": null,
"returnUrl": "https://shop.example.com/orders/1042",
"isActive": true,
"createdAt": "2026-10-24T09:12:31.204Z"
}{
"title": "PaymentLink.NoAllowedAssets",
"status": 400,
"detail": "A link needs at least one allowed asset."
}{
"title": "Merchant.Disabled",
"status": 409,
"detail": "This merchant is disabled and can't take new payments."
}Create one link per purchase and send the payer to
https://pay.staging.paywire.xyz/pay/{id}. See Create a payment link for the full walkthrough.Authorizations
Your gateway's API key (w3g_...).
Body
application/json
Price in currency.
Coins the payer may pay with.
Minimum array length:
1Show child attributes
Show child attributes
Absolute https URL for webhooks.
Absolute https URL offered to the payer after paying.
How long a quote holds. Default 30.
Required range:
5 <= x <= 1440This link's own payment policy, replacing the company's.
Show child attributes
Show child attributes
Response
The payment link.
Show child attributes
Show child attributes
This link's own payment policy, replacing the company's.
Show child attributes
Show child attributes