Create a link
https://api.cadmospay.com/machine/v1/gateway/linksThe link belongs to your business wallet. Send the checkoutUrl to your customer.
Always send a requestId: it becomes the link's uuid, so retrying a create that timed out returns the same link instead of a second one. Limits: 30 creates a minute and 500 a day.
Authentication
Authorization: Bearer <accessToken>
The accessToken from POST /v1/external-auth/token, valid 15 minutes.
Store REQUEST_ID once per order. The first payment link guide walks through checkout.
Request body
application/json · CreateLinkRequest
Only the listed properties are accepted.
descriptionstringRequiredShown to the payer. Trimmed.
length 1 to 200externalReferencestringRequiredYour own reference, such as an order number. Returned with every settlement. Trimmed.
length 1 to 120requestIdstringOptionalA UUID v4 you choose; it becomes the link's
uuid. Reuse it to retry the same create.pattern ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$localMethodsarray of stringOptionalCash methods the link should also accept, such as
whish. The ones your account may not offer are left out and listed inrefusedLocalMethods. Absent: crypto only.items at most 5no duplicateseach: pattern ^[a-z0-9_-]{2,40}$amountUsdstringOptionalThe price in dollars, from 0.50 to 1000000, as a decimal string (
"100","99.5"), never a JSON number. The Gateway Fee is yours: it comes out of what is counted and the payer never sees it. Absent: the payer chooses what to send.pattern ^\d{1,7}(\.\d{1,2})?$
{
"description": "Order #42",
"externalReference": "order-42",
"requestId": "0b6f5a8e-1c2d-4e3f-9a8b-7c6d5e4f3a2b",
"amountUsd": "100.00",
"localMethods": [
"whish"
]
}{
"description": "Donation",
"externalReference": "donation-7",
"requestId": "5d4c3b2a-1f0e-4d9c-8b7a-6f5e4d3c2b1a"
}Responses
The link, ready to pay.
Response schema · CreatedLink
uuidstringRequiredformat uuidstatusstringRequiredone of activetokenstringRequiredThe checkout secret inside
checkoutUrl.pattern ^[A-Za-z0-9_-]{43}$checkoutUrlstringRequiredThe page to send your customer.
format urireceiverAddressstringRequiredThe link's own receiving address on Arbitrum.
pattern ^0x[0-9a-fA-F]{40}$externalReferencestring or nullRequiredlocalMethodsarray of stringRequiredThe cash methods the link accepts.
refusedLocalMethodsarray of stringRequiredThe cash methods you asked for that the link does not accept.
paymentReferencestring or nullRequiredThe code a cash payer gives, when the link accepts a cash method.
amountUsdstring or nullRequiredThe price, or
nullfor an open amount.pattern ^\d+\.\d{2}$countedUsdstringRequiredWhat the link's settled payments count for, before the Gateway Fee.
pattern ^\d+\.\d{2}$leftUsdstring or nullRequiredWhat is still due;
"0.00"once paid;nullfor an open amount.pattern ^\d+\.\d{2}$paidbooleanRequiredTrue once what is left is within min($0.49, max($0.02, 0.1 % of the amount)): a bridged payment can land a few cents under. Always false for an open amount.