Skip to Content
RunePayDocs
API referencePayment links

Create a payment link

A reusable checkout URL. Pass `amount`, or omit it and pass `min_amount` and `max_amount` to let the buyer choose.

POST
/payment_links

A reusable checkout URL. Pass amount, or omit it and pass min_amount and max_amount to let the buyer choose.

Authorization

bearerAuth
headerAuthorizationBearer <token>

A secret key, sk_test_… or sk_live_….

Header Parameters

Idempotency-Key?string

Makes a retry safe: the same key and body within 24 hours does not repeat the request.

Request Body

application/json
  1. body
name*string

Shown to the buyer.

description?|

Shown to the buyer.

amount?|

Fixed amount in minor units.

min_amount?|

Lowest amount the buyer may choose, in minor units.

max_amount?|

Highest amount the buyer may choose, in minor units.

currency?|

ISO 4217 code, any case. Defaults to the account's currency.

success_url?|

Where the buyer goes after paying. Absolute http(s) URL.

metadata?|

Key-value strings stored on the object. Values that are not strings are ignored.

Response Body

Success.

application/json
  1. response
id*string
object*string
livemode*boolean
active*boolean
name*string
description*string|null
amount*|

Fixed amount in minor units, or null when the buyer chooses.

min_amount*integer|null
max_amount*integer|null
currency*string

Three-letter ISO 4217 code, uppercase.

success_url*string|null
metadata*

Your own key-value strings, returned as sent.

url*string

Share this URL with buyers.

created*integer

Unix timestamp in seconds.

updated*integer

Unix timestamp in seconds.

Example Request
curl -X POST 'https://runepay.co/api/v1/payment_links' \  -H 'Authorization: Bearer sk_test_...' \  -H 'Content-Type: application/json' \  -d '{  "name": "Pro plan",  "description": "One month of Pro",  "amount": 1999,  "success_url": "https://merchant.example/thanks",  "metadata": {    "plan": "pro"  }}'
Example Response
{  "id": "plink_01KA7D4E6F8G0H2J4K6M8N0P2Q",  "object": "payment_link",  "livemode": false,  "active": true,  "name": "Pro plan",  "description": "One month of Pro",  "amount": 1999,  "min_amount": null,  "max_amount": null,  "currency": "USD",  "success_url": "https://merchant.example/thanks",  "metadata": {    "plan": "pro"  },  "url": "https://runepay.co/pay/l/plink_01KA7D4E6F8G0H2J4K6M8N0P2Q",  "created": 1767225600,  "updated": 1767225600}