Payment links
On this page
Create a payment link, send it to your customer and follow its payments. You need no website or checkout integration.
Check what your account may do
Payment links need two permissions from your payment institution. Both are off at first. Payment by link allows links with a fixed amount. Open amount allows links where the payer types the amount, and it is approved separately.
curl https://api.pf.organizer.tr/v1/payment_link_settings \
-H "Authorization: Bearer sk_sandbox_YOUR_KEY"
{
"object": "payment_link_settings",
"payment_links": {"status": "enabled", "requested_at": null},
"open_amount": {
"status": "enabled",
"requested_at": null,
"limits": {"currency": "try", "max_payment_amount": 5000000, "daily_total_amount": 25000000},
"limits_by_currency": [{"currency": "try", "max_payment_amount": 5000000, "daily_total_amount": 25000000}]
}
}
payment_links.status:enabledordisabled. While it isdisabled, creating a link returns403 payment_links_not_enabled.open_amount.status:disableduntil it is approved. Without it, creating an open-amount link returns403 payment_links_open_amount_not_enabled.open_amount.limits_by_currency: the limits for each currency you can use in open-amount links.max_payment_amountis the largest single payment.daily_total_amountis the most that open-amount links may collect in one business day. Your payment institution's risk team sets them and may change them at any time. The list is empty untilopen_amountisenabled.open_amount.limits: the limits in TRY, or in the first currency of the list when there are none in TRY. It isnulluntilopen_amountisenabled.
Request a permission in the merchant panel, on the My products tab of Business details. The page lists every product of your account, what you can ask for and what an enabled product still needs. GET /v1/merchant_products returns the same data, with a merchant panel session only.
The risk team of your payment institution decides on the request. While it is open, requested_at is set. If a permission is taken away later, the links it covers stop taking payments at once.
Create a link
{
"amount": 12500,
"currency": "try",
"description": "Sipariş SIP-2026-10423",
"max_installments": 3,
"customer": {"name": "Ayşe Yılmaz", "email": "ayse.yilmaz@example.com", "phone": "+905321234567"},
"metadata": {"order_id": "SIP-2026-10423"},
"expires_at": 1797759000
}
Save the request as link.json. expires_at is a unix time and must be in the future. If the sample's time has passed, send a later one. To get a time one week from now, run echo $(( $(date +%s) + 604800 )).
curl -X POST https://api.pf.organizer.tr/v1/payment_links \
-H "Authorization: Bearer sk_sandbox_YOUR_KEY" \
-H "Idempotency-Key: link-SIP-2026-10423" \
-H "Content-Type: application/json" \
-d @link.json
{
"id": "plink_01J9ZQ4V8K2M3N5P7R9T1W3Y5A",
"object": "payment_link",
"status": "active",
"url": "https://pay.example.com/pay/plt_3q2PZ0c1mJ8nB5vT7xK9aD4fG6hL0sW2yE1rU3iO5pA",
"amount": 12500,
"open_amount": false,
"min_amount": null,
"max_amount": null,
"currency": "try",
"description": "Sipariş SIP-2026-10423",
"reusable": false,
"max_payments": null,
"payments_completed": 0,
"amount_collected": 0,
"max_installments": 3,
"three_d_secure": "automatic",
"customer": {"name": "Ayşe Yılmaz", "email": "ayse.yilmaz@example.com", "phone": "+905321234567"},
"line_items": null,
"metadata": {"order_id": "SIP-2026-10423"},
"expires_at": 1797759000,
"last_paid_at": null,
"closed_at": null,
"created": 1795161600,
"updated": 1795161600,
"livemode": false
}
Send url to your customer by email, message or QR code. Anyone who has the address can open the payment page, so share it only with the person who should pay.
You can read url again at any time with GET /v1/payment_links/{id}. Webhook events leave it out.
| Field | What it does |
|---|---|
amount, currency |
A fixed amount, in minor units. |
description |
Required, up to 500 characters. The payer sees it on the payment page. |
reusable, max_payments |
A link takes one payment unless reusable is true. A reusable link takes any number of payments, or up to max_payments (at most 1,000,000). max_payments without reusable: true is refused. |
max_installments |
The highest installment count the page offers, from 1 to 12 (default 1). Your installment plan for the card decides what that card is offered. |
three_d_secure |
automatic follows the 3D Secure rules of your account. required always asks for 3D Secure. |
customer |
Fills in the name and email on the payment page. |
line_items |
Optional, for a fixed amount only. They must add up to amount. See Customers and order details. |
expires_at |
The unix time after which the link takes no payment. It must be in the future. |
Open-amount links
Leave out amount and send the range the payer may type:
{
"min_amount": 5000,
"max_amount": 5000000,
"currency": "try",
"description": "Moda Kitabevi",
"reusable": true
}
min_amountandmax_amountare both required.max_amountcannot be above themax_payment_amountof the link's currency (400 payment_link_amount_over_limit). The currency must be one oflimits_by_currency(400 payment_link_currency_not_allowed).- The payer must enter a name and a description or reference that says what the payment is for. The payment shows it in
payment_link_reference. - Open-amount payments always go through 3D Secure. Such a link is
three_d_secure: required, whatever you send. - The total of one business day cannot pass the
daily_total_amountof the link's currency. Once it is reached, the page asks the payer to try a smaller amount or to come back the next day. - All other limits and checks of your account apply, as for any payment.
What the payer sees
The payment page shows your trade name, the description and the amount. If the link has line items, the page lists them above the total. The payer enters the card and, if the link offers installments, picks one of the options for that card. When 3D Secure applies, the page takes the payer through it. At the end it shows whether the payment went through.
If the card is declined, the payer can try again while the link is active.
To try the page in the sandbox, open url in a browser and pay with a test card.
The payer types the card on our payment page, so the card never reaches your systems. You need no publishable key and no website.
The payment page is not part of the API. Its own requests, under /v1/checkout/… and /pay/{token}/session, are not versioned and may change without notice. Do not call them from your integration. Build on /v1/payment_links, the payment_link filter of the payment list and webhooks.
Status of a link
status |
Meaning |
|---|---|
active |
The link can be paid. |
paid |
A single-use link was paid, or a reusable link reached max_payments. |
expired |
expires_at has passed. |
deactivated |
You deactivated the link. |
Only an active link takes payments. The other three statuses are final.
A single-use link is paid at most once. While one payer is at the bank or in 3D Secure, a second payer is told that a payment is in progress. The page waits and checks again by itself. The second payer can pay only if the first payment fails or is abandoned.
A payer who does not finish 3D Secure holds the link until the 3D Secure timeout ends, 15 minutes by default. The abandoned payment is then canceled and the link takes payments again.
The payments of a link
A payment made through a link is an ordinary payment of your account, with the same fees, settlement and refunds. It has source: payment_link, and payment_link holds the link's id. List them with the payment_link filter:
curl "https://api.pf.organizer.tr/v1/payment_intents?payment_link=plink_01J9ZQ4V8K2M3N5P7R9T1W3Y5A" \
-H "Authorization: Bearer sk_sandbox_YOUR_KEY"
Refund such a payment like any other, with POST /v1/refunds.
Send a link to your customer
Send the link by SMS or email. The message names your business, the amount when it is fixed, and the link.
curl -X POST https://api.pf.organizer.tr/v1/payment_links/plink_01J9ZQ4V8K2M3N5P7R9T1W3Y5A/send \
-H "Authorization: Bearer sk_sandbox_YOUR_KEY" \
-H "Idempotency-Key: send-SIP-2026-10423-sms" \
-H "Content-Type: application/json" \
-d '{"channel": "sms", "recipient": "0532 123 45 67"}'
{
"id": "plsend_01J9ZQ6X2B4C6D8F0H2K4M6N8P",
"object": "payment_link_send",
"payment_link": "plink_01J9ZQ4V8K2M3N5P7R9T1W3Y5A",
"channel": "sms",
"recipient": "+90 *** *** ** 67",
"locale": "tr",
"status": "sent",
"failure_code": null,
"sent_by": "api_key:ak_01J9ZQ4V8K2M3N5P7R9T1W3Y5A",
"created": 1795161660,
"delivered_at": 1795161663
}
channelissmsoremail.recipientis a Turkish mobile number or an email address. You can write a number with spaces, a leading0or+90.- The message is in Turkish. Send
"locale": "en"for English. - Only an
activelink can be sent. A paid, expired or deactivated link returns409. - Read the text first with
POST /v1/payment_links/{id}/send_preview, which sends nothing. - To retry safely, send again with the same
Idempotency-Key. The customer gets one message. - Whoever can create links can send them. In the merchant panel, open the link and choose Send by SMS or email.
The full number or address is used only to send the message. We keep it masked everywhere else: in the response, in GET /v1/payment_links/{id}/sends, in the audit log and in the payment_link.sent event.
Sends are limited. One link can be sent 5 times an hour, and one account can send 300 times in 24 hours. One account can send to the same number or address 3 times in 24 hours. Past a limit, the call returns 429 payment_link_send_rate_limited with Retry-After. A send that fails does not count. Your payment institution may change these numbers.
| Error | Meaning |
|---|---|
400 recipient_invalid |
The number or address is not valid, or the provider cannot reach it. |
502 payment_link_send_failed |
The provider did not take the message. Try again. |
503 payment_link_send_unavailable |
This installation cannot send by the channel you chose. |
List, change or deactivate links
GET /v1/payment_links lists your links, newest first. Filter with status, open_amount, created and q (a link id or the start of a description).
While a link is active, you can change its description, expiry, customer, metadata, max_installments and three_d_secure. On a reusable link you can also change max_payments:
curl -X POST https://api.pf.organizer.tr/v1/payment_links/plink_01J9ZQ4V8K2M3N5P7R9T1W3Y5A \
-H "Authorization: Bearer sk_sandbox_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"description": "Sipariş SIP-2026-10423, kargo dahil", "expires_at": 1797845400}'
max_paymentsmust stay above the payments the link has taken. It also cannot go below the taken payments plus those still in progress (400 payment_link_max_payments_too_low). Try again when those have ended, or deactivate the link.- An open-amount link always stays
three_d_secure: required. - Changing a link that is not
activereturns409withpayment_link_paid,payment_link_expiredorpayment_link_deactivated. - You cannot change the amount, the currency or whether the link is reusable. Deactivate the link and create a new one.
curl -X POST https://api.pf.organizer.tr/v1/payment_links/plink_01J9ZQ4V8K2M3N5P7R9T1W3Y5A/deactivate \
-H "Authorization: Bearer sk_sandbox_YOUR_KEY"
A deactivated link takes no payment from that moment. A payment that is already at the bank still ends as the bank decides. Deactivating a link twice changes nothing. A paid or expired link returns 409.
Webhooks
| Event | When |
|---|---|
payment_link.created |
A link was created. |
payment_link.updated |
You changed a link, or a reusable link took a payment. |
payment_link.paid |
A single-use link was paid, or a reusable link took its last payment. |
payment_link.expired |
A link passed its expiry. |
payment_link.deactivated |
A link was deactivated. |
payment_link.sent |
A link was sent to a customer by SMS or email. |
data.object is the payment link without url. Each payment also sends its own payment_intent.* events, which carry payment_link. Fulfill the order on payment_intent.succeeded.
Keys and permissions
- A restricted key needs the scope
payment_links:readto read links andpayment_links:writeto create, change, deactivate and send them. - In the merchant panel, every user can see the links. Owners, admins and finance users create, change and deactivate them. Owners and admins request the permissions.
In the API reference
- Create a payment link
- Send a payment link to your customer
- List payment links
- Deactivate a payment link
Next: Receive payment_link.paid with Webhooks, and refund a link payment with Refunds.