Skip to main content
POST
/
api
/
v1
/
payment_link
Generates a new payment link for a customer to pay.
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": "<string>",
      "quantity": 123,
      "description": "<string>",
      "image_url": "<string>"
    }
  ],
  "order_price": {
    "currency": "<string>",
    "amount": 123,
    "decimals": 123
  },
  "env_mode": "live",
  "success_callback_url": "<string>",
  "cancel_callback_url": "<string>",
  "failure_callback_url": "<string>",
  "metadata": {}
}
'
{
  "payment_order_id": "<string>",
  "payment_url": "<string>"
}

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

A JSON object with payment order id and payment url

payment_order_id
string
payment_url
string