PayStar API Documentation
  1. API DOC | EN
  • MERCHANT
    • PRODUCTS | EN
    • ПРОДУКТЫ | RU
    • Untitled Doc
    • FEATURES | EN
      • Deposits & Payouts
      • Issues (Tickets)
      • Secure data (One-time secret)
      • Summary Report
      • Payment Analytics
      • Payment Form Analytics
      • Unified audit log
      • Export reports
      • Black list
      • Routing & Cascading
      • Limits
      • Commissions
      • Team
      • My Account
      • PayStar in 100 Questions
    • ВОЗМОЖНОСТИ | RU
      • Депозиты и выплаты
      • Issues (Задачи)
      • Защищённые данные (One-time secret)
      • Сводный отчёт
      • Аналитика по платежам
      • Единый журнал событий
      • Аналитика платёжной формы
      • Экспорт отчётов
      • Черный список
      • Мавршрутизация и Каскады
      • Лимиты
      • Комиссии
      • Команда
      • Мой аккаунт
      • PayStar в 100 вопросах
    • API DOC | EN
      • Introduction
      • Glossary
      • Authorization key
      • Sandbox
      • Additional fields
      • Currencies
      • Bank names
      • Telecom operators
      • Callbacks
      • Error descriptions
      • Tech FAQ
      • Events
      • Payment history v2
        • Payment history - backward compatibility (legacy `X.Y.Z.W`)
      • Integratins
        • Stripe
        • Inwizo
        • 2Checkout
        • Adyen
        • AffiniPay
        • Alikassa
        • AlliancePay
        • Amazon Pay
        • AnyMoney
        • AstroPay
        • Aureavia
        • AurisMyChanger
        • Authorize.Net
        • Avatarix
      • Balance H2H
        GET
      • Deposit H2H - Card & P2P
        POST
      • Deposit H2H - Token
        POST
      • Deposit H2C - Card
        POST
      • Deposit status H2H - PayStar ID
        GET
      • Deposit status H2H - Merch ID
        GET
      • Payout H2H
        POST
      • Payout status H2H - PayStar ID
        GET
      • Payout status H2H - Merch ID
        GET
  • AGENT (REFERRAL)
  1. API DOC | EN

Authorization key

INFO
This section explains how to obtain authorization keys, generate a token, modify keys, and configure either Test or Production mode.
Important
Each flow (e.g., deposits and payouts) will have separate authorization keys. Make sure to use the correct key for each type of operation.

Requesting an Authorization Token#

Please contact your Account manager to obtain your authorization credentials. You can request one of the following options:
A publicKey and privateKey pair
A pre-generated bearer token
⚠️ Note: Authorization keys have two possible statuses — test mode and production.
You can start with test mode, and later either request to switch status to production or request a new Authorization keys.
If you suspect your keys may have been compromised, please request a new key pair immediately.
If you plan to receive Сallbacks, make sure to review the signature verification process described in the Callbacks section.

How to Generate a Bearer Token#

Bearer tokens are generated using JWT (JSON Web Token) with the HS256 algorithm. The token payload includes your publicKey, and it is signed using your privateKey.
Payload structure:
publicKey: your public key that corresponds to the private key used for signing
privateKey: used to sign the JWT (not included in the token itself)

Python Example#

Requirements: Install the pyjwt library via pip install pyjwt.

.NET Core Example#

Requirements: Install the System.IdentityModel.Tokens.Jwt package via NuGet.
Previous
Glossary
Next
Sandbox
Built with