Accept Payments
Integrate Plexy to accept payments via the Sessions or Advanced flow
Accept Payments
Sessions Flow
Embedded checkout — server creates a session, client renders the Plexy component
Advanced Flow
Direct API — your server calls the Payments API, you render the UI
Sessions flow
const session = await plexy.sessions.create({
amount: { value: 10000, currency: 'KZT' },
returnUrl: 'https://your-site.com/checkout/complete',
reference: 'order_12345',
});Advanced flow
const payment = await plexy.payments.create({
amount: { value: 10000, currency: 'KZT' },
paymentMethod: {
type: 'card',
encryptedCardNumber: '...',
encryptedExpiryMonth: '...',
encryptedExpiryYear: '...',
encryptedSecurityCode: '...',
},
reference: 'order_12345',
returnUrl: 'https://your-site.com/checkout/complete',
});