İçeriğe geç

create

POST
/v1/payments
curl --request POST \
--url https://api.lydiagate.com/v1/payments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "amount": 1, "partnerTxCode": "example", "terminalId": "example", "installment": 1, "description": "example", "returnUrl": "example" }'
Media typeapplication/json
object
amount
required
integer format: int64
>= 1
partnerTxCode
required
string
0 <= 128 characters
terminalId
required
string
>= 1 characters
installment
integer | null format: int32
>= 1
description
string | null
0 <= 512 characters
returnUrl
required
string
0 <= 2048 characters
Examplegenerated
{
"amount": 1,
"partnerTxCode": "example",
"terminalId": "example",
"installment": 1,
"description": "example",
"returnUrl": "example"
}

İdempotent tekrar: aynı partnerTxCode + aynı istek → ilk çağrının cevabı (idempotentReplay=true); yeni ödeme YARATILMADI.

Media typeapplication/json
object
paymentCode
string
status
string
Allowed values: initiated capture_pending captured failed expired voided partially_refunded refunded
paymentRef
string
handoffUrl
string
idempotentReplay
boolean
Example
{
"status": "initiated"
}

Yeni ödeme yaratıldı (idempotentReplay=false).

Media typeapplication/json
object
paymentCode
string
status
string
Allowed values: initiated capture_pending captured failed expired voided partially_refunded refunded
paymentRef
string
handoffUrl
string
idempotentReplay
boolean
Example
{
"status": "initiated"
}

API anahtarı veya kaynak-IP hız limiti aşıldı; işlem oluşturulmadı.

Media typeapplication/json
object
error
object
code
string
Allowed values: rate_limited
message
string
traceId
string | null
Example
{
"error": {
"code": "rate_limited"
}
}
Retry-After
integer format: int64

Yeniden denemeden önce beklenecek saniye.