Skip to main content
POST
/
api
/
paylinks
Create a shareable payment link
curl --request POST \
  --url https://mag3nt.com/api/paylinks \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "card_id": "<string>",
  "amount": "<string>",
  "memo": "<string>",
  "accepted_protocols": [
    "<string>"
  ],
  "type": "SINGLE",
  "max_uses": 1,
  "expires_in": 123
}
'
{
  "id": "<string>",
  "code": "PL_a1b2c3d4",
  "url": "https://mag3nt.com/pay/PL_a1b2c3d4",
  "amount": "<string>",
  "asset": "<string>",
  "network": "<string>",
  "memo": "<string>",
  "uses": 123,
  "max_uses": 123,
  "expires_at": "2023-11-07T05:31:56Z",
  "qr_svg": "<string>"
}

Authorizations

Authorization
string
header
required

API key prefixed with 'Bearer sx_live_...'

Body

application/json
card_id
string
required
amount

Fixed amount (null for open-amount)

memo
string
accepted_protocols
string[]
type
enum<string>
default:SINGLE

SINGLE for one-time, RECURRING for multi-use

Available options:
SINGLE,
RECURRING
max_uses
integer
default:1
expires_in
number

Hours until expiry

Response

200 - application/json

Pay link created

id
string
code
string
Example:

"PL_a1b2c3d4"

url
string
Example:

"https://mag3nt.com/pay/PL_a1b2c3d4"

amount
asset
string
network
string
memo
string
status
enum<string>
Available options:
ACTIVE,
EXPIRED,
CANCELLED
uses
integer
max_uses
integer
expires_at
string<date-time> | null
qr_svg
string