1. Authentication
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. Authentication

Token Generation

Testing
Testing Env
https://provisioning.sipay.com.tr
Testing Env
https://provisioning.sipay.com.tr
POST
/ccpayment/api/token
This endpoint generates a token used to authenticate the merchant in subsequent API requests.
📌
The endpoint also returns the payment integration option configured for the merchant. The corresponding response field is is_3d, which can take the following values: 0, 1, 2, and 4.
0 = Whitelabel Non 3DS only
1 = Whitelabel Non 3DS or 3D
2 = Whitelabel 3D only
4 = Branded payment solution
If the token API return is 1, the merchant website should display a checkbox for the user to select Non 3DS or 3D Secure Payment.
Each token has a validity period of 2 hours.

Token generation errors#

HTTP statusstatus_codestatus_description (app_lang=en)When it occurs
2001Validation message, e.g. The app id field is required.app_id or app_secret is missing, is not a string, or exceeds the length limit.
20014Merchant is not authorizedThe merchant is not authorized to use the API.
200403Token cannot be generated because neither a digital nor a physical contract has been accepted.The merchant has not accepted a digital or physical agreement.
4031002Your IP address is not authorized for this transaction type. Please contact Sipay Support for assistance.The caller’s IP address is not on the merchant’s allowlist.

Request

Body Params application/jsonRequired

Examples

Responses

🟢200Success
application/json
Bodyapplication/json

🔵30Failed
Request Request Example
Shell
JavaScript
Java
Swift
curl --location 'https://provisioning.sipay.com.tr/ccpayment/api/token' \
--header 'Content-Type: application/json' \
--data '{
  "app_id": "xxxx",
  "app_secret": "xxx",
  "app_lang": "en"
}'
Response Response Example
200 - Success
{
    "status_code": 100,
    "status_description": "Successfully Generated token",
    "data": {
        "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJqdGkiOiI0ZWJmYzJmOGNiOGZlMzlhYTc5ZGQzYmI1NDc4ZWI2ZjAzMGNjZmM5YzU4ZmExN2I5MjJiN2I1NTIwY2EzZDk5OTk0MWY2ZTAyMWNiZjkwMTEzYjk2ZWZkNmU3NmExZTExYjVlNWRjNDBhNGU1YWY5NmQ5NGVhNjFiYTMzOGNmYSIsImF1ZCI6MTAwMDcsInN1YiI6OTMsImNpZCI6MTgzMDksIm5iZiI6MTc3NTEyMTM1MiwiZXhwIjoxNzc1MTM1NzUyLCJpYXQiOjE3NzUxMjg1NTIsInNjb3BlcyI6W10sImRhdGEiOnsianRpIjoiNGViZmMyZjhjYjhmZTM5YWE3OWRkM2JiNTQ3OGViNmYwMzBjY2ZjOWM1OGZhMTdiOTIyYjdiNTUyMGNhM2Q5OTk5NDFmNmUwMjFjYmY5MDExM2I5NmVmZDZlNzZhMWUxMWI1ZTVkYzQwYTRlNWFmOTZkOTRlYTYxYmEzMzhjZmEifX0.jYPZapZZ-jWOnEc0HLIRX5_qjTdIM9rC8Im4x_DBOHmROOCqoZ1AoN7P6PU6324xcg0KLS8CDHTbwj7RIWnnCQ",
        "is_3d": 1,
        "expires_at": "2026-04-02 16:15:52"
    }
}
Previous
IP Restriction
Next
Installments & Commission
Built with