POST
/
api
/
v1
/
payment_link
curl --request POST \
  --url https://checkout.suave.money/api/v1/payment_link \
  --header 'Content-Type: application/json' \
  --header 'X-Api-Key: <x-api-key>' \
  --data '{
  "line_items": [
    {
      "title": "Acme NFT #1234",
      "description": "This Acme NFT is one of only 10000 in this collection. Your Acme NFT gives you premium access to watch the Road Runner evade Wile E. Coyote",
      "quantity": 1,
      "image_url": "https://www.artnews.com/wp-content/uploads/2022/01/unnamed-2.png"
    }
  ],
  "order_price": {
    "amount": 1000000000000000000,
    "decimals": 18,
    "currency": "USDC"
  },
  "env_mode": "live",
  "success_callback_url": "http://localhost:3000?success=true",
  "cancel_callback_url": "http://localhost:3000?cancel=true",
  "failure_callback_url": "http://localhost:3000?failure=true",
  "metadata": {
    "custom_field": "value"
  }
}'
{
  "payment_order_id": "sample_payment_order_id",
  "payment_url": "https://checkout.suave.money/payment/sample_payment_order_id"
}

Headers

X-Api-Key
string
required
Example:

"your_api_key_here"

Body

application/json
line_items
object[]
required
order_price
object
required
env_mode
enum<string>
required

Specify the env_mode to indicate the environment (e.g., test or live). On successful payment, webhook events are sent to subscriptions with the same env_mode as the payment link.

Available options:
test,
live
Example:

"live"

success_callback_url
string
required
cancel_callback_url
string
required
failure_callback_url
string
required
metadata
object

Response

200
application/json
A JSON object with payment order id and payment url
payment_order_id
string
payment_url
string