Secure Payments, all required parameters must be provided.transaction_type parameter must be set to PreAuth.payment_completed_by is available to specify who is expected to complete the payment. This parameter can be sent with the following values.app, the following actions are executed automatically. There is no need send any API Endpoints.merchant, the following actions must be completed manually.payment_completed_byparameter is not provided, the system automatically treats the value as app and proceeds accordingly.payment_completed_by sending "Merchant"Pre-Authorization Pending and then the Complete Payment endpoint must be called to initiate the pre-authorization process.Pre-Authorization.#!/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}'
{
"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
}