1. Non Secure 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. Non Secure Payment

Non-Secure Recurring Payment

Testing
Testing Env
https://provisioning.sipay.com.tr
Testing Env
https://provisioning.sipay.com.tr
POST
/ccpayment/api/paySmart2D
This endpoint and its parameters are used to process recurring payments.
For recurring payments to be processed, the order_type parameter must be set to 1 and the following parameters must not be empty:
recurring_payment_number
recurring_payment_cycle
recurring_payment_interval
recurring_web_hook_key

order_type#

Required
Type: Integer
Value : 1
Determines the type of the order.

recurring_payment_number#

Required
Type: Integer
Defines the total number of recurring payments.
Example:
If the initial amount is 100 USD and recurring_payment_number is set to 5, the total processed amount will be 100 USD × 5 = 500 USD.
Additional transaction fees may apply for each installment.

recurring_payment_cycle#

Required
Type : String
Specifies the unit type of the recurring interval.
Possible values:
D → Day
M → Month
Y → Year

recurring_payment_interval#

Required
Type: String
Defines the frequency of the recurring payment based on the selected cycle.
**Example: **
recurring_payment_cycle = M
recurring_payment_interval = 1
means that payment is charged every month.

recurring_web_hook_key#

Required
Type: String
A key used to receive notifications regarding the recurring payment status in your system.
This key can be obtained from the Sipay panel.
The initial payment is sent to the sale webhook, while subsequent payments are sent to the recurring webhook.

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.

Request

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

Body Params application/jsonRequired

Examples

Responses

🟢200Success
application/json
Body

⚪113Failed
🟠40Failed
Request Request Example
Shell
JavaScript
Java
Swift
#!/usr/bin/env bash

 

generate_hash_key() {
  local total="$1"
  local installment="$2"
  local currency_code="$3"
  local merchant_key="$4"
  local invoice_id="$5"
  local app_secret="$6"

 

  local data="${total}|${installment}|${currency_code}|${merchant_key}|${invoice_id}"

 

  local rand1
  rand1=$(openssl rand -hex 16)
  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=$(openssl rand -hex 16)
  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}' | cut -c1-32)

 

  # Python kodunda key ve iv doğrudan ASCII byte olarak veriliyor.
  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_encrypted_bundle="${iv}:${salt}:${encrypted_base64}"
  msg_encrypted_bundle="${msg_encrypted_bundle//\//__}"

 

  echo "$msg_encrypted_bundle"
}

 

total="100"
installment="1"
currency_code="TRY"
merchant_key="merchant_key"
invoice_id="invoice_id"
app_secret="app_secret"

 

result=$(generate_hash_key "$total" "$installment" "$currency_code" "$merchant_key" "$invoice_id" "$app_secret")
echo "$result"
Response Response Example
200 - Success
{
    "status_code": 100,
    "status_description": "Payment process successful",
    "data": {
        "sipay_status": 1,
        "order_no": "VP17743519948303411",
        "order_id": "VP17743519948303411",
        "invoice_id": "recurringdeneme-2345wd425456",
        "sipay_payment_method": 1,
        "credit_card_no": "540667****5403",
        "transaction_type": "Auth",
        "payment_status": 1,
        "payment_method": 1,
        "error_code": 100,
        "error": "",
        "auth_code": "P38633",
        "merchant_commission": 0.1,
        "user_commission": 0,
        "merchant_commission_percentage": 2,
        "merchant_commission_fixed": 0,
        "installment": 1,
        "amount": 5,
        "payment_reason_code": "",
        "payment_reason_code_detail": "",
        "hash_key": "f892db768f25b142:dc6b:UfN1yvRoaWKyWdOesEcu8qOhNHIHREBFjX9s2__YC3fiYlhxTcVIADREIUQsYXZluSNe2uXUhg5DajKKjGEzU4g==",
        "original_bank_error_code": "",
        "original_bank_error_description": "",
        "host_reference_id": "608300452783"
    }
}
Modified at 2026-04-17 11:47:49
Previous
Non-Secure Card Payment
Next
Non-Secure Insurance Payment
Built with