XPay lets a merchant accept payments inside its web or mobile experience. The merchant backend creates and manages XPay resources, while XPay Element securely collects customer payment details in the merchant frontend.
How a payment works
- The merchant frontend asks the merchant backend to start a payment.
- The merchant backend creates a PaymentIntent through XPay.
- The backend returns the PaymentIntent client secret and encryption key to the frontend.
- The frontend renders XPay Element and the customer enters payment details inside it.
- The frontend confirms the payment through the XPay SDK.
- XPay processes the payment and sends asynchronous updates to the merchant webhook endpoint.
- The merchant backend reconciles the payment with its order or customer record.
Main resources
Merchant and XPay responsibilities
Raw card details must remain inside XPay Element. Do not send them to the merchant backend or include them in logs.
Choose your next step
- Follow Accept your first payment for the minimum end-to-end flow.
- Read Payments to understand the complete payment journey.
- Choose the current XPay Web SDK for a Web integration.
- Use the XPay API reference for complete request and response schemas.