1. Cashout
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
      POST
  • Webhook
    • Webhook
  • Status Codes
    • Status Codes
  1. Cashout

Cashout to Bank

Testing
Testing Env
https://provisioning.sipay.com.tr
Testing Env
https://provisioning.sipay.com.tr
POST
/ccpayment/api/cashout/tobank
This API is used to cash out funds from a Sipay account to a bank account. Funds can also be transferred to customers’ bank accounts.
The API supports single or multiple withdrawal transactions based on the provided bank account details.
Data values can be an array. In case of multiple unsuccessful cash outs, the unsuccessful reasons will be in it.
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.
An example of the hash algorithm is included in the request.

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
Body

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

 

generate_cashout_api_hash_key() {
  local sum_of_amount_column="$1"
  local first_row_iban="$2"
  local first_row_amount="$3"
  local first_row_currency="$4"
  local first_row_gsm="$5"
  local app_secret="$6"

 

  first_row_gsm="${first_row_gsm//+/}"

 

  local data="${sum_of_amount_column}|${first_row_iban}|${first_row_amount}|${first_row_currency}|${first_row_gsm}"

 

  local rand1
  rand1=$((RANDOM * RANDOM))

 

  local iv
  iv=$(printf "%s" "$rand1" | openssl sha1 | awk '{print $2}' | cut -c1-16)

 

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

 

  local rand2
  rand2=$((RANDOM * RANDOM))

 

  local salt
  salt=$(printf "%s" "$rand2" | openssl sha1 | awk '{print $2}' | cut -c1-4)

 

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

 

  local key_ascii
  key_ascii=$(printf "%s" "$salt_with_password" | cut -c1-32)

 

  local key_hex
  key_hex=$(printf "%s" "$key_ascii" | 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"
}

 

sum_of_amount_column="1000"
first_row_iban="TR331111111111111111111111"
first_row_amount="250"
first_row_currency="TRY"
first_row_gsm="+905123456789"
app_secret="myAppSecretKey"

 

hash_key=$(generate_cashout_api_hash_key \
  "$sum_of_amount_column" \
  "$first_row_iban" \
  "$first_row_amount" \
  "$first_row_currency" \
  "$first_row_gsm" \
  "$app_secret")

 

echo "Hash Key: $hash_key"
Response Response Example
{
  "app_id": "6d4a7e9374a76c15260fcc75e315b0b9",
  "app_secret": "b46a67571aa1e7ef5641dc3fa6f1712a",
  "merchant_key": "$2y$10$HmRgYosneqcwHj.UH7upGuyCZqpQ1ITgSMj9Vvxn.t6f.Vdf2SQFO",
  "pf_id": 39048,
  "name": "John Doe",
  "vkn": 7483494730,
  "tckn": 83593451321,
  "city": "Istanbul",
  "address": "Sokak ABC, Istanbul, Turkey",
  "iso_country_code": 742,
  "post_code": 48400,
  "site_url": "https://site.com",
  "hash_key": "944357f199c09d70:1481:6ssfvYiTGF2iU3fYFI5F3A=="
}
Modified at 2026-04-16 17:12:49
Previous
Recurring Plan Update
Next
Webhook
Built with