PayStar API Documentation
  1. Merchant EN
  • Merchant EN
    • Introduction
    • Glossary
    • Authorization key
    • Sandbox
    • Additional fields
    • Currencies
    • Bank names
    • Telecom operators
    • Callbacks
    • Error descriptions
    • Tech FAQ
    • 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
  1. Merchant 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.
Modified at 2025-04-24 16:30:32
Previous
Glossary
Next
Sandbox
Built with