API Docs
Payment Links
API ReferencePayment LinksCreate

Create Payment Link

Create a shareable payment link.

POST /payment_link

Inherited from the business profile. A few fields that you might expect on this endpoint, like return_url and the order reference id, are not set per link. They are configured once at the business profile level and applied automatically to every payment a link generates. The merchant's own order reference can be sent on the resulting payment via merchant_order_reference_id once the customer completes the link.

Body Parameters

ParameterTypeRequiredDescription
currencystringYesThree-letter ISO 4217 currency code (e.g. USD, EUR).
amountintegerNoAmount in the smallest currency unit (e.g. 6540 for $65.40). Optional for donation links where the customer chooses the amount; required for one_time and recurring.
descriptionstringNoDescription shown on the payment page.
expirystringNoExpiration date in ISO 8601 format (e.g. 2024-12-31T23:59:59Z). After this time the link returns a sold-out response.
link_typestringNoType of link. One of one_time (default), recurring, or donation.
customer_idstringNoPre-fill the link with a known customer ID so the resulting payment is associated with that customer.
send_emailbooleanNoWhen true, the platform delivers the link to the customer's email. Requires email to be set. Defaults to false.
emailstringNoCustomer email used when send_email is true.
send_smsbooleanNoWhen true, the platform delivers the link to the customer over SMS. Defaults to false.
usage_limitintegerNoMaximum number of successful payments the link accepts. Once reached, further attempts see sold_out_message.
sold_out_messagestringNoMessage rendered on the link page once usage_limit is reached.
capture_methodstringNoOne of automatic (default) or manual. Determines whether captured funds are settled immediately or held for a manual capture call.
authentication_typestringNoOne of three_ds (default) or no_three_ds. Controls whether 3D Secure is forced for card payments.
require_customer_infobooleanNoWhen true, the link form collects customer name/email/phone before allowing payment. Defaults to false.
setup_future_usagestringNoStores the payment method for future merchant-initiated transactions. One of on_session or off_session.
payment_link_configobjectNoPer-link branding overrides (logo, colors, button labels, allowed payment methods). See Payment link configuration.

The payment_link_config object lets a single payment link override the merchant's default branding without touching the profile-level theme. Common fields:

FieldTypeDescription
themestringHex color used as the primary accent on the link page.
logostringURL of the logo rendered above the form.
seller_namestringBusiness name displayed on the link page and on the customer's statement copy.
sdk_layoutstringControls the SDK rendering mode. One of tabs, accordion, spaced_accordion.
display_sdk_onlybooleanWhen true, the link renders only the SDK (no header/footer). Useful for embedding.
enabled_saved_payment_methodbooleanAllow saved payment methods on the link form when the customer is recognised.
allowed_payment_method_typesarray of stringsRestricts which payment method types appear (e.g. ["card", "google_pay"]).

Request Example

curl -X POST 'https://api.v2.paychtec.com/payment_link' \  -H "Content-Type: application/json" \  -H "api-key: snd_YOUR_API_KEY" \  -d '{  "amount": 5000,  "currency": "USD",  "description": "Invoice #1234",  "link_type": "one_time",  "expiry": "2024-12-31T23:59:59Z",  "customer_id": "cus_xyz789",  "send_email": true,  "email": "customer@example.com",  "capture_method": "automatic",  "authentication_type": "three_ds",  "require_customer_info": true,  "payment_link_config": {    "theme": "#5B1166",    "seller_name": "Acme Inc.",    "sdk_layout": "tabs"  }}'

Response

{
  "payment_link_id": "plink_1234567890",
  "amount": 5000,
  "currency": "USD",
  "description": "Invoice #1234",
  "url": "https://buy.uprails.com/plink_1234567890",
  "status": "active",
  "created": "2024-01-22T10:00:00Z"
}

Next steps

  • Business profiles — learn how return_url and webhook_details are configured at the profile level.