Payment Links
Create a Payment Link
Section titled “Create a Payment Link”Overview
Section titled “Overview”Creates a payment link for a fixed amount and currency.
POST
/v1/payment-linksAuthentication
Section titled “Authentication”Requires an API key — see Authentication.
Authorization: Bearer sk_test_placeholderRequest
Section titled “Request”| Field | Type | Required | Description |
|---|---|---|---|
amount |
number | Yes | Amount in the smallest currency unit |
currency |
string | Yes | Three-letter ISO currency code |
curl https://api.example.com/v1/payment-links \ -H "Authorization: Bearer sk_test_placeholder" \ -H "Content-Type: application/json" \ -d '{"amount": 2000, "currency": "usd"}'const response = await fetch("https://api.example.com/v1/payment-links", { method: "POST", headers: { Authorization: "Bearer sk_test_placeholder", "Content-Type": "application/json", }, body: JSON.stringify({ amount: 2000, currency: "usd" }),});import requests
response = requests.post( "https://api.example.com/v1/payment-links", headers={"Authorization": "Bearer sk_test_placeholder"}, json={"amount": 2000, "currency": "usd"},)req, _ := http.NewRequest("POST", "https://api.example.com/v1/payment-links", body)req.Header.Set("Authorization", "Bearer sk_test_placeholder")req.Header.Set("Content-Type", "application/json")resp, err := http.DefaultClient.Do(req)Response
Section titled “Response”{ "id": "plink_placeholder_123", "amount": 2000, "currency": "usd", "status": "active"}Errors
Section titled “Errors”| Status | Code | Meaning |
|---|---|---|
400 |
invalid_request |
Missing or malformed field |
401 |
unauthorized |
Missing or invalid API key |