Plexy
Pay APIGate APIDashboard
Pay APIGate APIDashboard
  1. Server flow
  • Overview
  • Authorization
  • Webhooks
  • API Errors
  • Test Scenarios
  • Ecommerce Plugins
  • API
    • Payments
      • Overview
      • 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
      • Settlement Payment Order
        • Create
        • Get by id
        • List
    • 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
  • Client SDK
    • Server flow
      • Advanced server flow
      • Session server flow
    • Web
      • Web Drop-in
      • Web Components
    • Flutter
      • Flutter Drop-in
      • Flutter Components
  • Schemas
    • Schemas
      • response.TransactionList
      • entity.SplitRequest
      • entity.PaymentBeneficiary
      • request.CreatePaymentBeneficiary
      • entity.SettlementPaymentOrder
      • entity.PayoutRequest
      • entity.PayoutRequestRowData
      • command.HandleThreeDResult
      • domain.Report
      • entity.CardSaveSessionCustomer
      • entity.Permission
      • entity.UserProfile
      • entity.UserRole
      • errors.Message
      • errors.Source
      • errors.Type
      • git_plexypay_com_ecom_back_api_internal_domain_view.Page-domain_Report
      • git_plexypay_com_ecom_back_api_internal_domain_view.Page-entity_UserProfile
      • git_plexypay_com_ecom_back_api_internal_platform_errors.Code
      • 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.Error
      • 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
    • DecimalAmount
    • ProductType
    • ProductCategory
    • Product
    • Order
    • AgentBalance
    • AgentDeposit
    • TopupRequest
    • CreateOrderRequest
Pay APIGate APIDashboard
Pay APIGate APIDashboard
  1. Server flow

Advanced server flow

How it works#

For a integration, you must implement the following parts:
Your payment server: sends the API requests to get available payment methods, make a payment, and send additional payment details.
Your client app: shows the the Component/Drop-in UI where the shopper makes the payment. The Component/Drop-id uses the data from the API responses fto handle the payment flow and additional actions on your client app.
Your webhook server: receives webhooks that include the outcome of each payment.
The parts of your integration work together to complete the payment flow:
1.
The shopper goes to the checkout screen.
2.
Your server uses the shopper's country and currency information from your client to get available payment methods.
3.
The Component collects the shopper's payment details, handles the additional action, and shows the payment result to the shopper.
4.
Your webhook server receives the notification containing the payment outcome.

Get available payment methods#

When your shopper is ready to pay, get a list of the available payment methods based on their country, device, and the payment amount.
From your server, make a POST /paymentMethods request, providing the following parameters. While most parameters are optional, we recommend that you include them because Plexy uses these to tailor the list of payment methods for your shopper.
We use the optional parameters to tailor the list of available payment methods to your shopper.
Call startDropin to show the Drop-in, passing the following:
Parameter nameRequiredDescription
merchantAccountYour merchant account name.
amountThe currency of the payment and its value in minor units.
channelThe platform where the payment is taking place. For example, when you set this to iOS, Plexy returns only the payment methods available for iOS.
countryCodeThe shopper's country/region. Plexy returns only the payment methods available in this country.
shopperLocaleBy default, the shopperlocale is set to en-US. To change the language, set this to the shopper's language and country code. Your client app also uses this locale.
For example, to get the available payment methods for a shopper in the Netherlands, for a payment of EUR 10:
curl https://api.plexypay.com/v2/paymentMethods \
-H 'x-api-key: PLEXY_API_KEY' \
-H 'content-type: application/json' \
-d '{
  "merchantAccount": "PLEXY_MERCHANT_ACCOUNT",
  "countryCode": "NL",
  "amount": {
    "currency": "EUR",
    "value": 1000
  },
  "channel": "Android",
  "shopperLocale": "nl-NL"
}'

Make a payment#

When the shopper selects the Pay button or chooses to pay with a payment method that requires a redirection, Drop-in calls onSubmit.
1.
From your server, make a POST /payments request specifying:
Parameter nameRequiredDescription
merchantAccountYour merchant account name.
amountThe currency of the payment and its value in minor units.
referenceYour unique reference for this payment.
paymentMethodThe payment method from the payload of the onSubmit event from your client app.
returnUrlThe URL where the shopper should return to after a redirection.
For the following cases, you must include additional parameters in your request:
Integrating some payment methods. For more information, go to payment method integration guides.
Using our risk management features. For more information, see Required risk fields.
Native 3D Secure 2 authentication.
Tokenizing your shopper's payment details or making recurring payments.

Example of a payment request for EUR 10#

curl https://api.plexypay.com/v2/payments \
-H 'x-api-key: PLEXY_API_KEY' \
-H 'content-type: application/json' \
-d '{
  "amount":{
    "currency":"EUR",
    "value":1000
  },
  "reference":"YOUR_ORDER_NUMBER",
  "paymentMethod":{hint:paymentMethod field of an object passed from your client app}STATE_DATA{/hint},
  "returnUrl":"my-app://plexy",
  "merchantAccount":"PLEXY_MERCHANT_ACCOUNT"
}'

Example response redirect payment method#

{
  "resultCode": "RedirectShopper",
  "action": {
    "paymentMethodType": "ideal",
    "url": "https://sdk.plexypay.com/checkoutshopper/checkoutPaymentRedirect?redirectData=X6Xtf...",
    "method": "GET",
    "type": "redirect"
  }
}
2.
Map the response to one of the following PaymentEvent objects:
TypeDescription
FinishedThe payment is finished.
ActionAn additional action is required. Drop-in automatically handles the additional action.
ErrorAn error has occured.
3.
Pass the object to your client. The onSubmit callback expects it.

Errors#

If an error occurs, you get one of the following error codes:
Error codeDescriptionAction to take
canceledByShopperThe shopper canceled the payment.Take the shopper back to the checkout page.
notSupportedThe payment method isn't supported by the shopper's device.Tell the shopper that the payment method isn't supported by their device.
noClientKeyNo clientKey configured.Tell the shopper that an error occurred.
noPaymentNo payment information configured.Tell the shopper that an error occurred.
invalidPaymentMethodsCan't parse the paymentMethods list, or the list is empty.Tell the shopper that an error occurred.
noPaymentMethodCan't find the selected payment method.Tell the shopper that their selected payment method is currently unavailable.
Modified at 2025-11-23 14:21:12
Previous
Client SDK
Next
Session server flow
Built with