Pre-authorization is not implemented for PayTR yet (see https://github.com/czaydev/better-payment/issues/60).
PayTR has no void endpoint; a cancel is a full refund.
When price is not given, the paid amount is read with a status query.
Charges (all or part of) a pre-authorized amount
Verifies and maps the notification (Bildirim URL) POST.
After processing, the endpoint MUST respond with plain text "OK"; otherwise PayTR keeps re-sending the notification. The built-in handler does this. PayTR may send the same notification more than once: make order updates idempotent.
Non-3D direct payment (Direct API, sync_mode=1)
Requires the PayTR account to be authorized for non-3D payments.
Payment with a stored card (utoken + ctoken)
Returns an auto-submitting HTML form that posts to the PayTR Direct API from the customer's browser (3D Secure). The result is delivered to the notification URL like any other payment.
Deletes a saved card (/odeme/capi/delete)
Pre-authorization with 3D Secure. Complete it with completeThreeDSPayment()
as usual; success then means the amount is blocked.
iFrame payment (3D Secure handled by PayTR)
callbackUrl is where the customer's browser is redirected (merchant_ok_url /
merchant_fail_url). It does NOT carry the payment result: the result is sent
server-to-server to the notification URL configured in the PayTR panel.
installment: undefined = customer can choose any installment, 1 = single
payment only, n > 1 = up to n installments.
Installment options for a card, computed from the commission rates defined on the PayTR account (/odeme/taksit-oranlari) and the card family (BIN query).
A customer's saved cards (Kart Saklama, /odeme/capi/list)
Refund (full or partial). paymentId is the merchant_oid; price is in TL.
PayTR saves cards only during a Direct API payment: pass saveCard to
createPayment(), then read the utoken from the result or the notification.
Releases a pre-authorization; nothing is charged
PayTR payment provider