Plexy
Pay API
Gate APISDKDashboard
Pay API
Gate APISDKDashboard
  1. Server Integration
  • Overview
  • Authorization
  • Webhooks
  • API Errors
  • Test Scenarios
  • Ecommerce Plugins
  • API
    • Payments
      • Overview
      • Transaction Errors
      • Payment Links
        • Create Payment Link
        • List Payment Links
        • Retrieve Payment Link by Order Reference
        • Cancel Payment Link
        • Retrieve Payment Link
        • Update Payment Link Expiration
        • Retrieve Payment Links Statistics
      • Reccurent Payments
        • Create Merchant-Initiated Payment
      • Direct Payments
        • Get Keys
        • Create Host-to-Host Payment
      • Transaction Management
        • Find Transaction's History by ID
        • Find Transaction by Payment Link ID
        • Find Transaction by ID
        • Find Transaction by Order reference
      • Payment Management
        • Cancel Payment
        • Capture Payment
        • Process Refund
      • Split Requests
        • Create
        • List
        • Update
        • Get By Id
        • Delete
    • Payouts
      • Retrieve Payout Transactions
      • Process Payout
      • Save Card for Payouts
    • Customers
      • Get Customer's Card Tokens
      • List Customers
      • Create Customer
      • Get Customer by ID
      • Get Customer's Transactions
    • Merchants
      • Payment Beneficiary
        • Create
        • Update
        • Gey By Id
        • List
        • Transfer from beneficiary balance to merchant balance
        • Create manual settlement for beneficiary
      • Retrieve Merchant's Details
    • Wallet
      • Authorize
      • Сapture
      • Refund
      • Cancel
    • Payment Methods
      • Google Pay™ Integration
    • Invoice
      • List Bank Invoices
      • Create Bank Invoice
      • Get Bank Invoice
    • Distributions
      • Create distribution
      • List distributions
      • Get distribution by ID
      • Get distributions balance
  • Client SDK
    • SDK Overview
    • Wallet
      • Apple Pay
      • Google Pay
    • Android
      • Android Components
      • Android SDK
      • Android Drop-in
      • Android Customization
    • React Native
      • React Native SDK
    • Flutter
      • Flutter SDK
    • iOS
      • iOS Components
      • iOS Drop-in
      • iOS Customization
      • iOS SDK
    • Server Integration
      • Overview
      • Sessions Flow
      • Advanced Flow
      • Authentication
      • Result Codes and Errors
      • Payment Methods and Checkout Settings
      • Test and Live Payments
      • API Reference
      • Payment Methods
        • Get a list of available payment methods
      • Payments
        • Start a transaction
        • Submit details for a payment
      • Sessions
        • Create a payment session
        • Get the result of a payment session
    • Web
      • Web SDK
      • Web Customization
      • Web Drop-in
      • Web Components
  • Schemas
    • Schemas
      • response.TransactionList
      • entity.SplitRequest
      • entity.PaymentBeneficiary
      • request.CreatePaymentBeneficiary
      • entity.SettlementPaymentOrder
      • entity.PayoutRequest
      • entity.PayoutRequestRowData
      • entity.UserProfile Copy
      • entity.Store
      • request.AssignStoreToUser
      • request.RemoveStoreFromUser
      • entity.AccountExternalSystem
      • response.AssignStoreToUser
      • request.CreateStore
      • response.Store
      • response.UserList
      • request.WalletAuthorizeRequest
      • entity.ShortWalletTransaction
      • response.WalletAuthorizeResponse
      • request.WalletCapture
      • response.RemoveStoreFromUser
      • command.HandleThreeDResult
      • domain.Report
      • entity.CardSaveSessionCustomer
      • entity.Permission
      • entity.UserProfile
      • entity.UserRole
      • git_plexypay_com_ecom_back_api_internal_domain_view.Page-domain_Report
      • git_plexypay_com_ecom_back_api_internal_domain_view.Page-entity_UserProfile
      • models.CSVApiRequest
      • models.CreateBussinessDetails
      • models.KeyResponse
      • models.OnboardingRequest
      • models.Transaction
      • paymentcore.Address
      • paymentcore.CustomerDetails
      • request.AuthorizePayment
      • request.BrowserDetails
      • request.CardData
      • request.ChangeUserRole
      • request.ContinueThreeDS
      • request.CreateCardSaveSession
      • request.CreateInviteSession
      • request.CreatePaymentLink
      • request.CreatePaymentLinkMetadata
      • request.HandlePayout
      • request.MerchantInitiatedPayment
      • request.PasswordRequest
      • request.Recurring
      • request.RefundPayment
      • request.SaveCard
      • request.SaveOneCustomer
      • request.TwoStepAuthorizePayment
      • request.UpdateMerchantSettingsRequest
      • request.UpdatePaymentLink
      • response.AcquirerResponseThreeDSecure
      • response.AuthorizeAndCapturePayment
      • response.AuthorizePayment
      • response.CancelPaymentResponse
      • response.CapturePaymentResponse
      • response.ContinueThreeDS
      • response.Currency
      • response.Customer
      • response.CustomerTransaction
      • response.CustomerTransactions
      • response.Customers
      • response.Merchant
      • response.MerchantInitiatedPayment
      • response.MerchantSettings
      • response.PaymentLink
      • response.PaymentLinkInfo
      • response.PaymentLinkMetadata
      • response.PaymentLinksInfo
      • response.PaymentLinksStatistics
      • response.PaymentLinksStatisticsItem
      • response.Payout
      • response.Permission
      • response.RefundPaymentResponse
      • response.Report
      • response.SavedCard
      • response.Session
      • response.Settlement
      • response.SettlementTransaction
      • response.Store
      • response.Stores
      • response.Transaction
      • response.TransactionDetails
      • response.TransactionEvents
      • response.TransactionHistoryEvent
      • response.TransactionHistoryEventData
      • response.TransactionResponse
      • response.TransactionWebhookDetails
      • response.Transactions
      • response.UpdateMerchantSettingsResponse
      • response.UserProfile
      • value.PaymentMethod
    • receipt
    • Error
    • response.BankInvoice
    • DistributionStatus
    • LivenessResponse
    • DecimalAmount
    • errors.Source
    • Currency
    • AmountDto
    • ProductType
    • errors.Message
    • DistributionRecipient
    • PaymentMethodsRequestDto
    • ProductCategory
    • request.CreateBankInvoice
    • DistributionCreateRequest
    • PaymentMethodDto
    • Product
    • git_plexypay_com_ecom_back_api_internal_platform_errors.Code
    • DistributionBase
    • StoredPaymentMethodDto
    • response.Error
    • Order
    • DistributionCreatedResponse
    • PaymentMethodsResponseDto
    • AgentBalance
    • response.BankInvoiceList
    • DistributionDetailResponse
    • CreatePaymentDto
    • AgentDeposit
    • errors.Type
    • DistributionListItem
    • AdditionalDataDto
    • TopupRequest
    • DistributionListResponse
    • ActionDto
    • CreateOrderRequest
    • DistributionBalanceResponse
    • CreatePaymentResponseDto
    • PaymentDetailsDto
    • PaymentDetailsRequestDto
    • PaymentActionDto
    • FraudResultDto
    • ResponsePaymentMethodDto
    • PaymentDetailsResponseDto
    • ApplePayMerchantValidationRequestDto
    • ApplePayMerchantSessionResponseDto
    • ApplePaySessionRequestDto
    • ApplePaySessionResponseDto
    • GooglePayDecodeRequestDto
    • GooglePayPaymentMethodDetails
    • GooglePayDecryptedData
    • GooglePayDecodeSuccessResponseDto
    • RiskDataDto
    • GooglePayPaymentMethodDto
    • BrowserInfoDto
    • GooglePayPaymentRequestDto
    • EncryptedCardDataDto
    • GooglePayPaymentResponseDto
    • GooglePayPaymentErrorResponseDto
    • LineItemDto
    • AddressDto
    • CreateCheckoutSessionRequestDto
    • CreateCheckoutSessionResponseDto
    • PaymentDto
    • SessionResultResponseDto
    • EncryptedSessionDataDto
    • DecryptPaymentRequestDto
    • DecryptPaymentResponseDto
    • ThreeDSDetailsDto
    • SessionPaymentDetailsRequestDto
    • SessionPaymentDetailsResponseDto
    • CardDetailsRequestDto
    • CardBrandDetailsDto
    • CardDetailsResponseDto
    • PublicKeyResponseDto
  1. Server Integration

Sessions Flow

The Sessions flow is the fastest way to start accepting payments. With a single API call to create a session, Plexy handles payment method rendering, 3D Secure authentication, redirects, and result processing.

How Sessions Work#

1
Create a Session
Your server makes a single API call to /v2/sessions with payment details.
2
Initialize Checkout
Use the session ID to mount the Plexy checkout component on your page.
3
Customer Completes Payment
The customer enters their payment details in the embedded UI. Plexy handles
all payment method logic, 3D Secure challenges, and redirects.
4
Handle the Result
Receive the payment result via webhooks and update your order status.

Server-Side: Create a Session#

Create a payment session by calling the /v2/sessions endpoint with the payment amount, currency, and return URL.
APSE region
For production, use a live APSE x-api-key for /v2/sessions. For test transactions, use the test API key from the same merchant account and keep the client SDK environment live/APSE. Do not add live-apse to the request body; the APSE region is selected in the client SDK configuration. The SDK clientKey must belong to the same merchant account and mode as the backend x-api-key.
Response:
{
  "id": "ses_abc123xyz",
  "sessionData": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
  "expiresAt": "2024-12-31T23:59:59Z",
  "status": "active",
  "amount": {
    "value": 10000,
    "currency": "KZT"
  },
  "reference": "order_12345"
}

Client-Side: Mount the Checkout#

After creating a session, use the session data to initialize the Plexy checkout component on your frontend.
JavaScript
React
HTML

Customizing the Checkout Appearance#

You can customize the checkout appearance using style options:
Shopper locale
locale is the checkout interface language and regional formatting, for example ru-KZ, en-US, or kk-KZ. Do not use it as a currency field. Currency belongs only in amount.currency, for example KZT.

Webhook Integration#

Warning
Always verify payment status via webhooks. Do not rely solely on client-side
callbacks, as they can be manipulated.
See the Webhooks documentation for full setup, signature verification, and event reference.

Handling the Return URL#

When the customer completes the payment, they are redirected to your returnUrl. The URL includes query parameters with the payment result.
Info
The resultCode in the return URL is for display purposes only. Always verify
the payment status via webhooks or by calling the API from your server.

Session States#

StateDescription
activeSession is valid and ready for payment
completedPayment was successfully processed
expiredSession has passed its expiresAt time
cancelledCustomer cancelled the payment

Error Handling#

Handle errors gracefully in your checkout implementation:

Next Steps#

Configure checkout settings for your account
Understand result codes to handle all payment outcomes
Set up webhooks for production
Modified at 2026-07-07 10:25:45
Previous
Overview
Next
Advanced Flow
Built with