Suave Aggregator
- Overview
- SDK Guide
- API Reference
Suave Checkout
- Introduction
- Use Cases
- API Documentation
- Authentication
- Data types
- Quote API
- Payment API
- Payment webhooks
- SDK Documentation
Payment API
Create Payment Link
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
Example:
"your_api_key_here"
Body
application/json
Response
200
application/json
A JSON object with payment order id and payment url
The response is of type object
.
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"
}
Assistant
Responses are generated using AI and may contain mistakes.