curl --request POST \
--url https://api.agentaos.ai/api/v1/gateway/payment-links \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"amount": 49.99,
"currency": "EUR",
"name": "Pro plan",
"description": "Monthly access to Pro features"
}
'import requests
url = "https://api.agentaos.ai/api/v1/gateway/payment-links"
payload = {
"amount": 49.99,
"currency": "EUR",
"name": "Pro plan",
"description": "Monthly access to Pro features"
}
headers = {
"x-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-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
amount: 49.99,
currency: 'EUR',
name: 'Pro plan',
description: 'Monthly access to Pro features'
})
};
fetch('https://api.agentaos.ai/api/v1/gateway/payment-links', 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.agentaos.ai/api/v1/gateway/payment-links",
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([
'amount' => 49.99,
'currency' => 'EUR',
'name' => 'Pro plan',
'description' => 'Monthly access to Pro features'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-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.agentaos.ai/api/v1/gateway/payment-links"
payload := strings.NewReader("{\n \"amount\": 49.99,\n \"currency\": \"EUR\",\n \"name\": \"Pro plan\",\n \"description\": \"Monthly access to Pro features\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-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.agentaos.ai/api/v1/gateway/payment-links")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": 49.99,\n \"currency\": \"EUR\",\n \"name\": \"Pro plan\",\n \"description\": \"Monthly access to Pro features\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.agentaos.ai/api/v1/gateway/payment-links")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": 49.99,\n \"currency\": \"EUR\",\n \"name\": \"Pro plan\",\n \"description\": \"Monthly access to Pro features\"\n}"
response = http.request(request)
puts response.read_body{
"id": "3f1a2b4c-5d6e-7f8a-9b0c-1d2e3f4a5b6c",
"org_id": "9a8b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d",
"user_id": "1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d",
"secure_link_id": "mZrESFyR7RC9RPsJfZCVkg",
"amount": 49.99,
"currency": "EUR",
"description": "Monthly access to Pro features",
"metadata": {},
"checkout_fields": [],
"webhook_url": null,
"success_url": null,
"cancel_url": null,
"tax_rate_id": null,
"status": "active",
"payment_count": 0,
"supported_networks": [
"eip155:8453"
],
"expires_at": null,
"created_at": "2026-08-06T12:00:00.000Z",
"updated_at": "2026-08-06T12:00:00.000Z",
"name": "Pro plan",
"image_url": null,
"max_uses": null,
"seller_mode": "mor",
"type": "one_time",
"billing_interval": null,
"environment": "live",
"checkoutUrl": "https://app.agentaos.ai/pay/mZrESFyR7RC9RPsJfZCVkg",
"sellerMode": "mor"
}{
"statusCode": 400,
"message": "amount is required when creating a session without a link",
"timestamp": "2026-08-06T12:00:00.000Z"
}{
"statusCode": 401,
"message": "Invalid API key",
"timestamp": "2026-08-06T12:00:00.000Z"
}{
"statusCode": 403,
"message": "Payment link belongs to another organization",
"timestamp": "2026-08-06T12:00:00.000Z"
}Create a payment link
Creates a reusable, shareable payment link.
curl --request POST \
--url https://api.agentaos.ai/api/v1/gateway/payment-links \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"amount": 49.99,
"currency": "EUR",
"name": "Pro plan",
"description": "Monthly access to Pro features"
}
'import requests
url = "https://api.agentaos.ai/api/v1/gateway/payment-links"
payload = {
"amount": 49.99,
"currency": "EUR",
"name": "Pro plan",
"description": "Monthly access to Pro features"
}
headers = {
"x-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-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
amount: 49.99,
currency: 'EUR',
name: 'Pro plan',
description: 'Monthly access to Pro features'
})
};
fetch('https://api.agentaos.ai/api/v1/gateway/payment-links', 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.agentaos.ai/api/v1/gateway/payment-links",
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([
'amount' => 49.99,
'currency' => 'EUR',
'name' => 'Pro plan',
'description' => 'Monthly access to Pro features'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-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.agentaos.ai/api/v1/gateway/payment-links"
payload := strings.NewReader("{\n \"amount\": 49.99,\n \"currency\": \"EUR\",\n \"name\": \"Pro plan\",\n \"description\": \"Monthly access to Pro features\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-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.agentaos.ai/api/v1/gateway/payment-links")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": 49.99,\n \"currency\": \"EUR\",\n \"name\": \"Pro plan\",\n \"description\": \"Monthly access to Pro features\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.agentaos.ai/api/v1/gateway/payment-links")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": 49.99,\n \"currency\": \"EUR\",\n \"name\": \"Pro plan\",\n \"description\": \"Monthly access to Pro features\"\n}"
response = http.request(request)
puts response.read_body{
"id": "3f1a2b4c-5d6e-7f8a-9b0c-1d2e3f4a5b6c",
"org_id": "9a8b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d",
"user_id": "1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d",
"secure_link_id": "mZrESFyR7RC9RPsJfZCVkg",
"amount": 49.99,
"currency": "EUR",
"description": "Monthly access to Pro features",
"metadata": {},
"checkout_fields": [],
"webhook_url": null,
"success_url": null,
"cancel_url": null,
"tax_rate_id": null,
"status": "active",
"payment_count": 0,
"supported_networks": [
"eip155:8453"
],
"expires_at": null,
"created_at": "2026-08-06T12:00:00.000Z",
"updated_at": "2026-08-06T12:00:00.000Z",
"name": "Pro plan",
"image_url": null,
"max_uses": null,
"seller_mode": "mor",
"type": "one_time",
"billing_interval": null,
"environment": "live",
"checkoutUrl": "https://app.agentaos.ai/pay/mZrESFyR7RC9RPsJfZCVkg",
"sellerMode": "mor"
}{
"statusCode": 400,
"message": "amount is required when creating a session without a link",
"timestamp": "2026-08-06T12:00:00.000Z"
}{
"statusCode": 401,
"message": "Invalid API key",
"timestamp": "2026-08-06T12:00:00.000Z"
}{
"statusCode": 403,
"message": "Payment link belongs to another organization",
"timestamp": "2026-08-06T12:00:00.000Z"
}Authorizations
Your secret key, from app.agentaos.ai -> Settings -> Developers -> API Keys. The key's prefix is both its identity and its environment: sk_test_... (sandbox, free, no verification) or sk_live_... (real money, requires business verification). A missing or invalid key returns 401.
Body
Amount in currency units, e.g. 49.99.
0.01 <= x <= 1000000Defaults to your org's settlement currency. A fiat code is mapped to your org's default settlement token internally; the link stores the resolved token.
EUR, USD, EURC, EURe, USDC 1000Product name, for the catalog-style link surfaces. Separate from description.
120HTTPS only.
2048A subscription link requires billingInterval and settles on the card/bank rail (Merchant of Record); it can't be a crypto-settlement link.
one_time, subscription Required when type is subscription, must be omitted for one_time.
month, year 1 for single-use, N for a limited quantity, omitted for unlimited.
1 <= x <= 100000Must belong to your organization.
Show child attributes
Show child attributes
204820482048Arbitrary key-value data, returned unchanged on webhooks. Up to 8KB serialized.
CAIP-2 network IDs (e.g. eip155:8453), for crypto-settlement links. Ignored (and taken from your key's configuration instead) if your API key is scoped to specific networks.
Response
Payment link created.
Payment link UUID.
Public ID used in the checkout URL.
Currency units.
Settlement currency or token.
Your custom data.
Show child attributes
Show child attributes
active, cancelled Successful payments against this link so far.
null means unlimited.
mor (card + bank) or crypto (on-chain). The snake_case column equivalent of the computed sellerMode.
mor, crypto one_time, subscription month, year, null test, live Full URL to share with buyers. Computed, camelCase, no snake_case equivalent.
mor, crypto