1. Payment with Saved Card
Sipay API Documentation
EN
  • EN
  • TR
  • Overview
    • Getting Started
    • Test Cards
    • IP Restriction
  • Authentication
    • Token Generation
      POST
  • Installments & Commission
    • Installment Details
      POST
    • Commission
      POST
    • Merchant Installments
      POST
  • HASH
    • Hash Creation
    • Hash Validation
  • Non-3DS Payment
    • Non-3DS Payment Flow
    • Non-3DS Card Payment
      POST
    • Non-3DS Recurring Payment
      POST
    • Non-3DS Insurance Payment
      POST
    • Non-3DS Pre-Authorization Payment
      POST
    • Confirm 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
    • Complete Payment
      POST
    • Confirm Payment
      POST
    • 3D Secure Agriculture Payment
      POST
  • Non-3DS and 3DS Payment with Sipay
    • Purchase Link Example
    • Non-3DS and 3D Secure Payment with Sipay
  • DPL
    • DPL
    • Status Codes
    • Options for Creating a DPL
    • Create DPL
    • List Payment Links
    • Payment Link Details
    • Update DPL
    • Remove DPL
  • Check Status
    • Check Status
  • Payment with Saved Card
    • Card Registration
      POST
    • 3D Secure Pay by Card Token
      POST
    • Non-3DS Pay by Card Token
      POST
    • Retrieving Saved Card
      GET
    • Edit Saved Card
      POST
    • Delete Saved Card
      POST
  • Recurring
    • Recurring Query Search
    • Recurring Plan Process
    • Recurring Plan Update
  • Refund
    • Refund
  • Cashout
    • Cashout to Bank
  • Webhook
    • Webhook
  • Status Codes
    • Status Codes
  • Plugin
    • Magento v1
    • Magento v2
    • Opencart
    • Presta
    • Woocommerce
    • Shopify
  • Settings
    • DPL Settings
    • Settings Update
  1. Payment with Saved Card

3D Secure Pay by Card Token

Testing Env
https://provisioning.sipay.com.tr
Testing Env
https://provisioning.sipay.com.tr
POST
/ccpayment/api/payByCardToken
The stored card payment service is used to place orders using previously saved card information. After completing and submitting the payment form on the merchant’s website, the user is redirected directly to the bank’s authentication page.
The payment is verified at the bank gateway through an SMS-based verification code or another 3D Secure authentication method defined by the bank.
Pay by Card Token payment initiation requests must be sent server-to-server from the merchant’s server. The access token must be included in the Authorization: Bearer {token} header and stored only on the server side. Standard HTML forms do not support this header; therefore, the token must not be included in form fields.
Once the payment is successfully completed, the user is redirected to the merchant’s success URL. In case of failure or cancellation, the user is redirected to the cancellation URL specified by the merchant.
The hash key must be sent 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.
total
installment
currency_code
merchant_key
invoice_id
app_secret

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
Bodyapplication/json

Request Request Example
Shell
JavaScript
Java
Swift
#!/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}'
Response Response Example
{}
Previous
Card Registration
Next
Non-3DS Pay by Card Token
Built with