A payment link is a hosted checkout page for one price. Share its url by text, email, DM or QR code, put it behind a button on your site, or create one per order from your backend and send the customer straight to it. Customers pay by card, Apple Pay or Google Pay, and by bank account where you have turned it on.
Links made for invoices and subscription plans are managed with those and don't appear here.
The payment link object
{
"object": "payment_link",
"id": "pl_4kTz8QwN2xYb6RcD1mPa",
"url": "https://anytime-capital.com/pay/business/pl_4kTz8QwN2xYb6RcD1mPa",
"title": "Consulting — October",
"description": "Two strategy sessions",
"amountCents": 12500,
"currency": "usd",
"active": true,
"singleUse": false,
"shippingCents": 0,
"collectShipping": false,
"allowDiscountCodes": false,
"successUrl": null,
"confirmationMessage": "Thanks! We'll email your session times within a day.",
"requireTermsConsent": false,
"metadata": {
"campaign": "fall-launch"
},
"items": [],
"createdAt": "2026-10-01T09:30:00.000Z",
"deactivatedAt": null,
"allowQuantity": false,
"maxQuantity": null,
"customFields": [],
"tipsEnabled": false,
"payWhatYouWant": false,
"minAmountCents": null
}| Field | Type | Description |
|---|---|---|
id | string | pl_ followed by 20 letters and digits. |
url | string | The pay page. Share it, redirect to it or embed it. |
title, description | string | What the customer sees at the top of checkout. |
amountCents | integer | The price in cents. With payWhatYouWant, the suggested amount. |
currency | string | usd. |
active | boolean | False once the link is deactivated (deactivatedAt is set). |
singleUse | boolean | The link closes after its first successful payment. |
shippingCents, collectShipping | integer, boolean | Flat shipping added to each payment; whether a shipping address is asked for. |
allowDiscountCodes | boolean | Customers may enter one of your discount codes. |
successUrl, confirmationMessage | string or null | Where customers go, or what they read, after paying. A link has at most one of them. |
requireTermsConsent | boolean | Customers must agree to your terms before paying. |
metadata | object | Your own key/value pairs, copied onto each payment made on the link. |
items | array | Catalog products, for links made in the dashboard from products. Empty for single-price links. |
allowQuantity, maxQuantity | boolean, integer or null | Customers choose how many, up to maxQuantity. |
customFields | array | Questions asked at checkout. |
tipsEnabled | boolean | A tip is offered at checkout. |
payWhatYouWant, minAmountCents | boolean, integer or null | Customers choose the amount, at least minAmountCents. |
createdAt, deactivatedAt | string, string or null | ISO 8601 times in UTC. |
Endpoints
List payment links
/api/v1/payment-linksYour payment links, newest first, each with the choices it offers the buyer.
Query
activebooleantruefor links taking payments,falsefor deactivated ones.limitinteger- How many objects per page. See Pagination.
cursorstring- The previous page's
nextCursor, for the page after it.
curl "https://anytime-capital.com/api/v1/payment-links?active=true&limit=10" \
-H "Authorization: Bearer $ANYTIME_API_KEY"{
"object": "list",
"data": [
{
"object": "payment_link",
"id": "pl_4kTz8QwN2xYb6RcD1mPa",
"url": "https://anytime-capital.com/pay/business/pl_4kTz8QwN2xYb6RcD1mPa",
"title": "Consulting — October",
"description": "Two strategy sessions",
"amountCents": 12500,
"currency": "usd",
"active": true,
"singleUse": false,
"shippingCents": 0,
"collectShipping": false,
"allowDiscountCodes": false,
"successUrl": null,
"confirmationMessage": "Thanks! We'll email your session times within a day.",
"requireTermsConsent": false,
"metadata": {
"campaign": "fall-launch"
},
"items": [],
"createdAt": "2026-10-01T09:30:00.000Z",
"deactivatedAt": null,
"allowQuantity": false,
"maxQuantity": null,
"customFields": [],
"tipsEnabled": false,
"payWhatYouWant": false,
"minAmountCents": null
}
],
"hasMore": false,
"nextCursor": null
}Create a payment link
/api/v1/payment-linksCreates a single-price link and answers 201 with it. Supports Idempotency-Key.
Body
titlestringrequired- What the customer is paying for, up to 120 characters.
amountCentsintegerrequired- The price, from 100 ($1.00) to 1000000 ($10,000.00).
descriptionstring- Shown under the title, up to 500 characters.
singleUseboolean- Close the link after its first successful payment. Use it for one link per order. Default
false. shippingCentsinteger- Flat shipping added to each payment, up to $1,000.00. Default 0.
collectShippingboolean- Ask for a shipping address. Default
false. allowDiscountCodesboolean- Let customers enter one of your discount codes. Default
false. successUrlstring- An
https://page on your site to send customers to after paying. Not withconfirmationMessage. confirmationMessagestring- Up to 500 characters shown on our confirmation page after paying, instead of a
successUrl. requireTermsConsentboolean- Customers must tick “I agree to the terms” before paying. Needs a terms link in Settings → Payments (
409 TERMS_URL_REQUIREDotherwise). Defaultfalse. metadataobject- Up to 20 of your own key/value pairs, e.g.
{"orderId": "1042"}. Keys: up to 40 letters, numbers,-and_; values: text up to 500 characters. Copied onto each payment; customers never see it. allowQuantityboolean- Let customers choose how many. Default
false. maxQuantityinteger- With
allowQuantity: the most per payment, 1–99. Default 10. tipsEnabledboolean- Offer a tip (10%, 15%, 20% or an amount). Default
false. payWhatYouWantboolean- Customers choose the amount;
amountCentsis the suggestion. Not with quantity, tips or discount codes. Defaultfalse. minAmountCentsinteger- With
payWhatYouWant: the smallest amount. Default 100. customFieldsarray- Up to 3 checkout questions:
{ id, label, type, options, required }with a label up to 60 characters,typeone oftext,long_text,phoneordropdown, and 2–10optionsfor a dropdown.
Headers
Idempotency-Keystring- Recommended. See Idempotency.
curl -X POST https://anytime-capital.com/api/v1/payment-links \
-H "Authorization: Bearer $ANYTIME_API_KEY" \
-H "Idempotency-Key: order-1042-link" \
-H "Content-Type: application/json" \
-d '{
"title": "Consulting — October",
"description": "Two strategy sessions",
"amountCents": 12500,
"metadata": { "campaign": "fall-launch" }
}'{
"object": "payment_link",
"id": "pl_4kTz8QwN2xYb6RcD1mPa",
"url": "https://anytime-capital.com/pay/business/pl_4kTz8QwN2xYb6RcD1mPa",
"title": "Consulting — October",
"description": "Two strategy sessions",
"amountCents": 12500,
"currency": "usd",
"active": true,
"singleUse": false,
"shippingCents": 0,
"collectShipping": false,
"allowDiscountCodes": false,
"successUrl": null,
"confirmationMessage": "Thanks! We'll email your session times within a day.",
"requireTermsConsent": false,
"metadata": {
"campaign": "fall-launch"
},
"items": [],
"createdAt": "2026-10-01T09:30:00.000Z",
"deactivatedAt": null,
"allowQuantity": false,
"maxQuantity": null,
"customFields": [],
"tipsEnabled": false,
"payWhatYouWant": false,
"minAmountCents": null
}Retrieve a payment link
/api/v1/payment-links/{id}Returns the link, or 404 NOT_FOUND if it isn't one of yours.
curl https://anytime-capital.com/api/v1/payment-links/pl_4kTz8QwN2xYb6RcD1mPa \
-H "Authorization: Bearer $ANYTIME_API_KEY"{
"object": "payment_link",
"id": "pl_4kTz8QwN2xYb6RcD1mPa",
"url": "https://anytime-capital.com/pay/business/pl_4kTz8QwN2xYb6RcD1mPa",
"title": "Consulting — October",
"description": "Two strategy sessions",
"amountCents": 12500,
"currency": "usd",
"active": true,
"singleUse": false,
"shippingCents": 0,
"collectShipping": false,
"allowDiscountCodes": false,
"successUrl": null,
"confirmationMessage": "Thanks! We'll email your session times within a day.",
"requireTermsConsent": false,
"metadata": {
"campaign": "fall-launch"
},
"items": [],
"createdAt": "2026-10-01T09:30:00.000Z",
"deactivatedAt": null,
"allowQuantity": false,
"maxQuantity": null,
"customFields": [],
"tipsEnabled": false,
"payWhatYouWant": false,
"minAmountCents": null
}Update a payment link
/api/v1/payment-links/{id}Send only what changes; everything else stays as it is. Changes apply to the link straight away; payments already made keep what they were charged. Supports Idempotency-Key.
Body
title, descriptionstring- As on create. A
nulldescription removes it. successUrl, confirmationMessagestring or null- What customers see after paying. Setting one clears the other;
nullclears it. requireTermsConsentboolean- Turning it on needs a terms link in Settings → Payments.
metadataobject or null- Replaces all of the link's metadata;
nullor{}clears it. customFieldsarray- Replaces the link's checkout questions;
[]removes them. tipsEnabled, allowQuantity, maxQuantity, collectShippingboolean / integer- As on create. Quantity and tips stay off on a link where customers choose the amount.
curl -X POST https://anytime-capital.com/api/v1/payment-links/pl_4kTz8QwN2xYb6RcD1mPa \
-H "Authorization: Bearer $ANYTIME_API_KEY" \
-H "Idempotency-Key: 1d2c4b6a-update-title" \
-H "Content-Type: application/json" \
-d '{
"title": "Consulting — November",
"metadata": { "campaign": "winter" }
}'{
"object": "payment_link",
"id": "pl_4kTz8QwN2xYb6RcD1mPa",
"url": "https://anytime-capital.com/pay/business/pl_4kTz8QwN2xYb6RcD1mPa",
"title": "Consulting — November",
"description": "Two strategy sessions",
"amountCents": 12500,
"currency": "usd",
"active": true,
"singleUse": false,
"shippingCents": 0,
"collectShipping": false,
"allowDiscountCodes": false,
"successUrl": null,
"confirmationMessage": "Thanks! We'll email your session times within a day.",
"requireTermsConsent": false,
"metadata": {
"campaign": "winter"
},
"items": [],
"createdAt": "2026-10-01T09:30:00.000Z",
"deactivatedAt": null,
"allowQuantity": false,
"maxQuantity": null,
"customFields": [],
"tipsEnabled": false,
"payWhatYouWant": false,
"minAmountCents": null
}The price is fixed once a link exists: amountCents, items, payWhatYouWant, minAmountCents, shippingCents, allowDiscountCodes and singleUse answer 400 NOT_EDITABLE. Create a new link to sell at a new price, and deactivate the old one.
Deactivate a payment link
/api/v1/payment-links/{id}/deactivateThe link stops taking payments; anyone who opens it sees that it's closed. Payments already made are unaffected. Deactivating a link that is already off returns it unchanged. Supports Idempotency-Key.
curl -X POST https://anytime-capital.com/api/v1/payment-links/pl_4kTz8QwN2xYb6RcD1mPa/deactivate \
-H "Authorization: Bearer $ANYTIME_API_KEY" \
-H "Idempotency-Key: deactivate-pl_4kTz8Q"{
"object": "payment_link",
"id": "pl_4kTz8QwN2xYb6RcD1mPa",
"url": "https://anytime-capital.com/pay/business/pl_4kTz8QwN2xYb6RcD1mPa",
"title": "Consulting — October",
"description": "Two strategy sessions",
"amountCents": 12500,
"currency": "usd",
"active": false,
"singleUse": false,
"shippingCents": 0,
"collectShipping": false,
"allowDiscountCodes": false,
"successUrl": null,
"confirmationMessage": "Thanks! We'll email your session times within a day.",
"requireTermsConsent": false,
"metadata": {
"campaign": "fall-launch"
},
"items": [],
"createdAt": "2026-10-01T09:30:00.000Z",
"deactivatedAt": "2026-10-16T10:00:00.000Z",
"allowQuantity": false,
"maxQuantity": null,
"customFields": [],
"tipsEnabled": false,
"payWhatYouWant": false,
"minAmountCents": null
}Prefill checkout
Fill in details for your customer by adding parameters to a link's url. A value that isn't valid is ignored, never an error.
| Parameter | What it does |
|---|---|
prefilled_email | The customer's email for their receipt. They can still change it. |
code | One of your discount codes, applied when checkout opens, on links that accept codes. |
ref | Your own reference for the payment, up to 200 letters, numbers, spaces and _ . : / # @ + -. Stored on the payment as clientReference and returned by the API and in webhooks. |
https://anytime-capital.com/pay/business/pl_4kTz8QwN2xYb6RcD1mPa?prefilled_email=jordan%40example.com&code=FALL20&ref=order_1042On your own website, the Pay button and the inline checkout take the same values as data-email, data-code and data-ref. See Checkout.
One link per order
For a cart or an order whose total you work out yourself, create a singleUse link per order with the order id in metadata, send the customer to its url, and mark the order paid when the payment.succeeded webhook arrives: data.metadata carries your order id and data.source.id the link id. Use a stored Idempotency-Key so a retry never makes a second link. For a fixed price you sell again and again, one reusable link with ?ref= per customer does the same job.