Skip to content
API reference/Payment links

Create a link

POSThttps://api.cadmospay.com/machine/v1/gateway/links

The link belongs to your business wallet. Send the checkoutUrl to your customer.

Jump to request body

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.

descriptionstringRequired

Shown to the payer. Trimmed.

length 1 to 200
externalReferencestringRequired

Your own reference, such as an order number. Returned with every settlement. Trimmed.

length 1 to 120
requestIdstringOptional

A 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 stringOptional

Cash methods the link should also accept, such as whish. The ones your account may not offer are left out and listed in refusedLocalMethods. Absent: crypto only.

items at most 5no duplicateseach: pattern ^[a-z0-9_-]{2,40}$
amountUsdstringOptional

The 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})?$
An order of $100
{
  "description": "Order #42",
  "externalReference": "order-42",
  "requestId": "0b6f5a8e-1c2d-4e3f-9a8b-7c6d5e4f3a2b",
  "amountUsd": "100.00",
  "localMethods": [
    "whish"
  ]
}
The payer chooses what to send
{
  "description": "Donation",
  "externalReference": "donation-7",
  "requestId": "5d4c3b2a-1f0e-4d9c-8b7a-6f5e4d3c2b1a"
}

Responses

The link, ready to pay.

Response schema · CreatedLink

uuidstringRequired
format uuid
statusstringRequired
one of active
tokenstringRequired

The checkout secret inside checkoutUrl.

pattern ^[A-Za-z0-9_-]{43}$
checkoutUrlstringRequired

The page to send your customer.

format uri
receiverAddressstringRequired

The link's own receiving address on Arbitrum.

pattern ^0x[0-9a-fA-F]{40}$
externalReferencestring or nullRequired
localMethodsarray of stringRequired

The cash methods the link accepts.

refusedLocalMethodsarray of stringRequired

The cash methods you asked for that the link does not accept.

paymentReferencestring or nullRequired

The code a cash payer gives, when the link accepts a cash method.

amountUsdstring or nullRequired

The price, or null for an open amount.

pattern ^\d+\.\d{2}$
countedUsdstringRequired

What the link's settled payments count for, before the Gateway Fee.

pattern ^\d+\.\d{2}$
leftUsdstring or nullRequired

What is still due; "0.00" once paid; null for an open amount.

pattern ^\d+\.\d{2}$
paidbooleanRequired

True 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.

Next in api referenceRead a link

We use necessary cookies to run this site. With your permission, we also use analytics and advertising technologies to measure visits and downloads.