1. 3D Secure Payment
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
      POST
  • 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
    • 3D Secure Pay by Card Token
    • Non-3DS Pay by Card Token
    • Retrieving Saved Card
    • Edit Saved Card
    • Delete Saved Card
  • 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. 3D Secure Payment

3D Secure Card Payment

Testing Env
https://provisioning.sipay.com.tr
Testing Env
https://provisioning.sipay.com.tr
POST
/ccpayment/api/paySmart3D
This endpoint is used to transmit order and card information from the merchant’s server to the Sipay payment integration system.
A token must be obtained before initiating the payment transaction. Therefore, the payment form cannot be submitted directly to Sipay. The merchant must first send a token generation request and then submit the payment request to Sipay using the obtained token.
For 3D Secure transactions, requests must be made server-to-server. User redirections are managed by the merchant based on the payment result. For successful transactions, the user is redirected to the return URL; for failed or cancelled transactions, the user is redirected to the cancel URL.

PaySmart3D 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.

Response Details:#

payment_status == 0 means that operation failed.
payment_status == 1 and transaction_type == “Pre-Authorization” means that the transaction is successful and the transaction amount is blocked from the credit card.
In order to withdraw the blocked amount from the card,
Complete Payment Endpoint and Confirm Payment Endpoint must be called.
payment_status == 1 and transaction_type == “Auth” means that the transaction is successful and the transaction amount is immediately deducted from the card.

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.

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

🟠404Failed
🟢200HTML Form
Request Request Example
Shell
JavaScript
Java
Swift
HASH
#!/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
200 - Success
{
	"sipay_status": "1",
	"order_no": "VP17749690188158024",
	"order_id": "VP17749690188158024",
	"invoice_id": "7PAXU5D2IMBQ3KD-1774969017",
	"status_code": "100",
	"status_description": "Payment Successfully Completed",
	"sipay_payment_method": "1",
	"credit_card_no": "450803****4509",
	"transaction_type": "Auth",
	"payment_status": "1",
	"payment_method": "1",
	"error_code": "100",
	"error": "Payment Successfully Completed",
	"auth_code": "P54802",
	"merchant_commission": "0.1",
	"user_commission": "0",
	"merchant_commission_percentage": "1",
	"merchant_commission_fixed": "0",
	"installment": "1",
	"amount": "5",
	"payment_reason_code": null,
	"payment_reason_code_detail": null,
	"hash_key": "7fa34583e3b2dd60:32f6:6sEV__qFOEiSvNHEVXCW4EJaJvD+dzeQzqoKiQG0kEDADdcGcrniJFJh5jdM+r2aBAMkOn71VUffdxEZ9BaEpUg==",
	"md_status": "1",
	"original_bank_error_code": null,
	"original_bank_error_description": null,
	"host_reference_id": "609000105269"
}
Previous
3D Secure Payment Flow
Next
3D Secure Recurring Payment
Built with