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

Advanced Flow

The Advanced flow gives you complete control over the payment experience. You build your own payment form, collect payment details, and handle the full payment lifecycle through three API calls.
Info
The Advanced flow requires more development effort but provides maximum
flexibility. If you're just getting started, consider the Sessions
flow first.

How Advanced Flow Works#

1
Get Available Payment Methods
Call /v2/paymentMethods to get payment methods available for your shopper.
2
Collect Payment Details
Render payment inputs in your own UI and collect the required payment data.
3
Make a Payment
Submit the payment details to /v2/payments to initiate the payment.
4
Handle Additional Actions
If required, handle 3D Secure or redirects by calling
/v2/payments/details.

Step 1: Get Payment Methods#

First, request available payment methods for the transaction. The response depends on your account configuration, the shopper's country, and the payment amount.
Shopper locale
shopperLocale / 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.
Response:
{
  "paymentMethods": [
    {
      "type": "scheme",
      "name": "Credit Card",
      "brands": ["visa", "mc", "amex"]
    },
    {
      "type": "applepay",
      "name": "Apple Pay",
      "configuration": {
        "merchantId": "merchant.com.plexy.example",
        "merchantName": "Your Store"
      }
    }
  ]
}

Step 2: Collect Payment Details#

Build your payment form to collect the required data. For card payments, you must use client-side encryption to protect sensitive card data.

Card Encryption (Client-Side)#

Warning
Never send raw card numbers to your server. Always encrypt card data
client-side using the Plexy encryption library.

Secure Input Fields (Recommended)#

For easier PCI compliance, use Plexy's secure input fields:

Step 3: Make a Payment#

Submit the payment to the /v2/payments endpoint from your server.
Response (Successful):
{
  "resultCode": "Authorised",
  "pspReference": "8835511210681324",
  "merchantReference": "order_12345"
}
Response (3D Secure Required):
{
  "resultCode": "IdentifyShopper",
  "action": {
    "type": "threeDS2",
    "subtype": "fingerprint",
    "token": "eyJ0aHJlZURTTWV0aG9kTm90...",
    "paymentMethodType": "scheme"
  }
}

Step 4: Handle Additional Actions#

If the payment requires additional action (3D Secure, redirect), handle it client-side and submit the result.

Handling 3D Secure#

Handling Redirects#

For payment methods that require a redirect (e.g., bank transfers):

Server-Side: Submit Additional Details#

Response:
{
  "resultCode": "Authorised",
  "pspReference": "8835511210681324",
  "merchantReference": "order_12345"
}

Complete Integration Example#

Here's a complete server-side example combining all the steps. Your server proxies each client request to the corresponding Plexy API endpoint:
Step 1 — Get payment methods:
Step 3 — Make a payment:
Step 4 — Submit additional details:

Alternative Payment Methods#

Different payment methods require different data. Here are examples for common methods:

Apple Pay#

Google Pay#

Error Handling#

Implement robust error handling for production. The Plexy API returns standard HTTP error responses — check the HTTP status code and the errorCode field in the response body:
400 — Invalid request data (missing or malformed fields)
401 — Invalid or missing API key
422 — Request was valid but could not be processed (e.g., amount too low)
500 — Server-side error; retry with exponential back-off
Map these to appropriate messages in your application and always log the full response body for debugging.

Next Steps#

Understand result codes to handle all payment outcomes
Implement 3D Secure for card authentication
Set up webhooks for asynchronous notifications
Configure checkout settings in the Dashboard
Modified at 2026-07-07 10:25:45
Previous
Sessions Flow
Next
Authentication
Built with