1. Payment
Sipay API Documentation
  • Overview
    • Getting Started
  • Authentication
    • Generating Token
      POST
  • Installments
    • Getting Installment Information
      POST
    • Installments
      POST
  • Commissions
    • Commission
      POST
  • HASH
    • Hash Information
  • Non Secure Payment
    • Non-Secure Payment Flow
    • Non-Secure Card Payment
      POST
    • Non-Secure Recurring Payment
      POST
    • Non-Secure Insurance Payment
      POST
    • Non-Secure Pre-Authorization 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
    • 3D Secure Agriculture Payment
      POST
  • Payment
    • Check Status
      POST
    • Confirm Payment
      POST
    • Complete Payment
      POST
    • Non-Secure and 3D Payment with Sipay
      POST
    • Refund
      POST
  • Payment with Saved Card
    • Card Registration
    • Pay by Card Token
    • Retrieving Saved Card
    • Edit Saved Card
    • Delete Saved Card
    • Non-Secure Payment with Hidden Card
  • Recurring
    • Recurring Query Search
    • Recurring Plan Process
    • Recurring Plan Update
  • Cashout
    • Cashout to Bank
  • Webhook
    • Webhook
  • Status Codes
    • Status Codes
  1. Payment

Confirm Payment

Testing
Testing Env
https://provisioning.sipay.com.tr
Testing Env
https://provisioning.sipay.com.tr
POST
/ccpayment/api/confirmPayment
confirm_payment endpoint is used to confirm the payment.
The confirm endpoint must be triggered when the payment_completed_by parameter is sent to the merchant.
If this endpoint is not sent, it will be automatically canceled by the bank in approximately 20 business days.

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

Hash Parameters#

The parameters and their order to be used for the hash algorithm are as follows.
merchant_key
invoice_id
status
app_secret

Request

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

Examples

Responses

🟢200Success
application/json
Body

⚪68Failed
Request Request Example
Shell
JavaScript
Java
Swift
#!/usr/bin/env bash

 

generate_hash_key() {
  local merchant_key="$1"
  local invoice_id="$2"
  local status="$3"
  local app_secret="$4"

 

  local data="${merchant_key}|${invoice_id}|${status}"

 

  local iv
  iv=$(openssl rand -hex 16 | openssl sha1 | awk '{print $2}' | cut -c1-16)

 

  local password
  password=$(printf "%s" "$app_secret" | openssl sha1 | awk '{print $2}')

 

  local salt
  salt=$(openssl rand -hex 16 | openssl sha1 | awk '{print $2}' | cut -c1-4)

 

  local salt_with_password
  salt_with_password=$(printf "%s" "${password}${salt}" | openssl sha256 | awk '{print $2}' | cut -c1-32)

 

  local key_hex
  key_hex=$(printf "%s" "$salt_with_password" | xxd -p -c 256)

 

  local iv_hex
  iv_hex=$(printf "%s" "$iv" | xxd -p -c 256)

 

  local encrypted_base64
  encrypted_base64=$(printf "%s" "$data" | openssl enc -aes-256-cbc -K "$key_hex" -iv "$iv_hex" -base64)

 

  local msg="${iv}:${salt}:${encrypted_base64}"
  msg="${msg//\//__}"

 

  echo "$msg"
}

 

merchant_key="test_merchant_123"
invoice_id="INV-2026-0001"
status="1"
app_secret="my_secret_key_456"

 

result=$(generate_hash_key "$merchant_key" "$invoice_id" "$status" "$app_secret")
echo "Hash Key: $result"
Response Response Example
200 - Success
{
    "status_code": 100,
    "status_description": "The transaction has been Approved",
    "transaction_status": "Completed",
    "order_id": "VP17697652077026116",
    "invoice_id": "VUONVW35PWK2TDY-1769765203"
}
Modified at 2026-04-20 11:23:17
Previous
Check Status
Next
Complete Payment
Built with