1. 3D Secure Payment
Sipay API Documentation
EN
  • EN
  • TR
  • Overview
    • Getting Started
    • Test Cards
    • IP Restriction
  • Authentication
    • Token Generation
      POST
  • Installments & Commission
    • Installment Details
      POST
    • Commission
      POST
    • Merchant Installments
      POST
  • HASH
    • Hash Creation
    • Hash Validation
  • Non-3DS Payment
    • Non-3DS Payment Flow
    • Non-3DS Card Payment
      POST
    • Non-3DS Recurring Payment
      POST
    • Non-3DS Insurance Payment
      POST
    • Non-3DS Pre-Authorization Payment
      POST
    • Confirm Payment
      POST
  • 3D Secure Payment
    • 3D Secure Payment Flow
    • 3D Secure Card Payment
      POST
    • 3D Secure Recurring Payment
      POST
    • 3D Secure Pre-Authorization Payment
      POST
    • Complete Payment
      POST
    • Confirm Payment
      POST
    • 3D Secure Agriculture Payment
      POST
  • Non-3DS and 3DS Payment with Sipay
    • Purchase Link Example
    • Non-3DS and 3D Secure Payment with Sipay
      POST
  • DPL
    • DPL
    • Status Codes
    • Options for Creating a DPL
    • Create DPL
    • List Payment Links
    • Payment Link Details
    • Update DPL
    • Remove DPL
  • Check Status
    • Check Status
  • Payment with Saved Card
    • Card Registration
    • 3D Secure Pay by Card Token
    • Non-3DS Pay by Card Token
    • Retrieving Saved Card
    • Edit Saved Card
    • Delete Saved Card
  • Recurring
    • Recurring Query Search
    • Recurring Plan Process
    • Recurring Plan Update
  • Refund
    • Refund
  • Cashout
    • Cashout to Bank
  • Webhook
    • Webhook
  • Status Codes
    • Status Codes
  • Plugin
    • Magento v1
    • Magento v2
    • Opencart
    • Presta
    • Woocommerce
    • Shopify
  • Settings
    • DPL Settings
    • Settings Update
  1. 3D Secure Payment

3D Secure Pre-Authorization Payment

Testing Env
https://provisioning.sipay.com.tr
Testing Env
https://provisioning.sipay.com.tr
POST
/ccpayment/api/paySmart3D
Pre-authorization is a process in which a card's available limit is temporarily reserved for a payment transaction. The amount is not immediately captured from the card, but it is blocked from the cardholder’s available balance. The purpose is to secure the payment for a later finalization (complete-confirm).

1. Initiating Pre-Authorization#

For Secure Payments, all required parameters must be provided.
To initiate a pre-authorization transaction, the transaction_type parameter must be set to PreAuth.
The customer submits a pre-authorization request along with the payment:
The amount to be blocked is specified
Card details are included

Optional Parameter :#

A parameter named payment_completed_by is available to specify who is expected to complete the payment. This parameter can be sent with the following values.
When this value is sent by the app, the following actions are executed automatically. There is no need send any API Endpoints.
When the value is sent by the merchant, the following actions must be completed manually.
If payment_completed_byparameter is not provided, the system automatically treats the value as app and proceeds accordingly.

If payment_completed_by sending "Merchant"#

Complete Payment Endpoint#

After sending the pre-auth parameter, payment status will be Pre-Authorization Pending and then the Complete Payment endpoint must be called to initiate the pre-authorization process.
The Complete Payment endpoint must be called within 15 minutes.
If not called within this timeframe, the payment will automatically failed.
The cardholder’s bank performs the following checks:
Is the card limit sufficient?
Is the card active?
Fraud / risk controls

If successful:#

The specified amount is temporarily blocked.
An authorization code is returned.
md_status = 1.
If any check fails, the transaction is declined.
ℹ️ At this stage, no funds are withdrawn yet; the amount is only temporarily reserved from the card’s available balance.

Confirm Pre-Authorization Payment#

Once the Complete Payment endpoint is successfully called, the payment status is updated to Pre-Authorization.
After that, the Confirm Payment endpoint must be called.
The Confirm Payment process should be completed or canceled within approximately 25 business days. If not completed or canceled within this period, the payment will be automatically canceled.
Pre-authorization validity periods, overcapture limits, and transaction rules may vary by bank.
If the Confirm Payment endpoint is called, the payment status will be updated to either:
Pre-Auth Approved – if the payment is successfully confirmed.
Pre-Auth Declined – if the payment confirmation fails.


The hash key must be sent in the request.
Sample hash keys can be found in the request form panel on the side, corresponding to the selected programming language.

Request

Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Body Params application/jsonRequired

Examples

Responses

🟢200Success
application/json
Bodyapplication/json

⚪1Failed
🟠404Failed
Request Request Example
Shell
JavaScript
Java
Swift
HASH
#!/usr/bin/env bash
set -euo pipefail

# Example values. Load your merchant app_secret on your server.
# Use the exact amount text sent in the request.
parts=(
  "100.00" # total
  "1" # installments_number
  "TRY" # currency_code
  "merchant_example" # merchant_key
  "INV-DOCS-001" # invoice_id
)
app_secret="example_app_secret"

message=$(IFS='|'; printf '%s' "${parts[*]}")
printf '%s' "$message" | openssl dgst -sha256 -hmac "$app_secret" -r | awk '{print $1}'
Response Response Example
200 - Success
{
	"sipay_status": "1",
	"order_no": "VP1776849645922312",
	"order_id": "VP1776849645922312",
	"invoice_id": "XV7YO2ADFXZANAF-1776849645",
	"status_code": "100",
	"status_description": "Payment Successfully Completed",
	"sipay_payment_method": "1",
	"credit_card_no": "554960****6017",
	"transaction_type": "Pre-Authorization",
	"payment_status": "1",
	"payment_method": "1",
	"error_code": "100",
	"error": "Payment Successfully Completed",
	"auth_code": "1234456",
	"merchant_commission": "0.02",
	"user_commission": "0",
	"merchant_commission_percentage": "1",
	"merchant_commission_fixed": "0",
	"installment": "1",
	"amount": "2",
	"payment_reason_code": null,
	"payment_reason_code_detail": null,
	"hash_key": "a1111f9ee22ee8db:b8eb:BoR1Nc3eYPpi9oa7r2KkUxOKeBdq3QA4pLiwAMQphd__W5t+PaLSKn1FJ+hAgakz4v5koPQkSDKFKFJFJD3404857fnGWG9WV3L3sOIw==",
	"md_status": "1",
	"original_bank_error_code": null,
	"original_bank_error_description": null,
	"host_reference_id": null,
	"authorization_expires_at": "2026-05-15T10:00:00Z",
	"authorization_duration_days": 30
}
Previous
3D Secure Recurring Payment
Next
Complete Payment
Built with