create_2
POST
/v1/payment-links
const url = 'https://api.lydiagate.com/v1/payment-links';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"amount":1,"terminalId":"example","customerCommissionShareBps":1,"description":"example","redirectUrl":"example","allowedInstallmentCounts":[1],"items":[{"name":"example","note":"example","amount":1}],"payerName":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.lydiagate.com/v1/payment-links \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "amount": 1, "terminalId": "example", "customerCommissionShareBps": 1, "description": "example", "redirectUrl": "example", "allowedInstallmentCounts": [ 1 ], "items": [ { "name": "example", "note": "example", "amount": 1 } ], "payerName": "example" }'Authorizations
Bölüm başlığı “Authorizations”Request Bodyrequired
Bölüm başlığı “Request Bodyrequired”Media typeapplication/json
object
amount
required
integer format: int64
terminalId
required
string
customerCommissionShareBps
integer | null format: int32
description
string | null
redirectUrl
string | null
allowedInstallmentCounts
Array<integer> | null
items
Array<object> | null
object
name
required
string
note
string | null
amount
required
integer format: int64
payerName
string | null
Examplegenerated
{ "amount": 1, "terminalId": "example", "customerCommissionShareBps": 1, "description": "example", "redirectUrl": "example", "allowedInstallmentCounts": [ 1 ], "items": [ { "name": "example", "note": "example", "amount": 1 } ], "payerName": "example"}Responses
Bölüm başlığı “Responses”Ödeme linki oluşturuldu.
Media typeapplication/json
object
id
string
token
string
url
string
partnerReference
integer format: int64
status
string
amount
integer format: int64
customerCommissionShareBps
integer format: int32
description
string | null
redirectUrl
string | null
firstOpenedAt
string | null format: date-time
lastOpenedAt
string | null format: date-time
expiresAt
string format: date-time
createdAt
string format: date-time
updatedAt
string format: date-time
allowedInstallmentCounts
Array<integer> | null
items
Array<object> | null
object
name
string
note
string | null
amount
integer format: int64
payerName
string | null
Example
{ "status": "pending"}API anahtarı mutation kotası veya kaynak-IP hız limiti aşıldı; link oluşturulmadı.
Media typeapplication/json
object
error
object
code
string
message
string
traceId
string | null
Example
{ "error": { "code": "rate_limited" }}Headers
Bölüm başlığı “Headers”Retry-After
integer format: int64
Yeniden denemeden önce beklenecek saniye.