vpos_typeidentity_numbercc_no parameter must be sent in the following format: “first eight digits + **** + last four digits” or “first six digits + ****** + last four digits”.cc_no is 1234567897891234, it must be sent as follows:12345678****1234expiry_monthexpiry_year cvv#!/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}'
{
"status_code": 100,
"status_description": "Payment process successful",
"data": {
"sipay_status": 1,
"order_no": "VP17743529649617286",
"order_id": "VP17743529649617286",
"invoice_id": "insurancedeneme_1234",
"sipay_payment_method": 1,
"credit_card_no": "402278****8555",
"transaction_type": "Auth",
"payment_status": 1,
"payment_method": 1,
"error_code": 100,
"error": "Transaction Successful",
"auth_code": 138038,
"merchant_commission": 0,
"user_commission": 0,
"merchant_commission_percentage": 0,
"merchant_commission_fixed": 0,
"installment": 1,
"amount": 5,
"payment_reason_code": "",
"payment_reason_code_detail": "",
"total": 5,
"currency_code": "TRY",
"hash_key": "c9a69ff1e438596e5e979d63f9d9c916f1b66eb0c3d3ab104748872d0ea9c277",
"original_bank_error_code": "",
"original_bank_error_description": "",
"host_reference_id": ""
}
}