1. Payment with Saved Card
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
    • Confirm Payment
    • Complete Payment
    • Non-Secure and 3D Payment with Sipay
    • Refund
  • Payment with Saved Card
    • Card Registration
      POST
    • Pay by Card Token
      POST
    • Retrieving Saved Card
      GET
    • Edit Saved Card
      POST
    • Delete Saved Card
      POST
    • Non-Secure Payment with Hidden Card
      POST
  • Recurring
    • Recurring Query Search
    • Recurring Plan Process
    • Recurring Plan Update
  • Cashout
    • Cashout to Bank
  • Webhook
    • Webhook
  • Status Codes
    • Status Codes
  1. Payment with Saved Card

Edit Saved Card

Testing
Testing Env
https://provisioning.sipay.com.tr
Testing Env
https://provisioning.sipay.com.tr
POST
/ccpayment/api/editCard
This endpoint is used to make changes to a customer’s card.

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.

Hash Parameters#

The parameters and their order to be used for the hash algorithm are as follows.
merchant_key
customer_number
card_token
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

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

generate_hash_key() {
  local merchant_key="$1"
  local customer_number="$2"
  local card_token="$3"
  local app_secret="$4"

  local data="${merchant_key}|${customer_number}|${card_token}"

  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 key
  key=$(printf "%s" "${password}${salt}" | openssl sha256 | awk '{print $2}' | cut -c1-32)

  local key_hex
  key_hex=$(printf "%s" "$key" | 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 result="${iv}:${salt}:${encrypted_base64}"
  result="${result//\//__}"

  echo "$result"
}

print_result=$(generate_hash_key "123456789" "CUST001" "card_abc123xyz" "mySecretKey123")
echo "$print_result"
Response Response Example
200 - Success
{
    "status_code": 100,
    "status_description": "The card token saved successfully",
    "card_token": "ad89a1169c075a21a4b2f5e30691539c"
}
Modified at 2026-04-16 15:22:22
Previous
Retrieving Saved Card
Next
Delete Saved Card
Built with