AX Card Payment SDK
A drop-in card form for your checkout page.
Demo: https://demo.alphax.asia/playground/payment-cs-microform
1. Initialize
Add the script and the element. Use the script URL and client ID we shared with you.
2. Submit
Wait for the form to be ready, then call submit(). It resolves with a token, or null if it failed.
3. Confirm the payment
From your backend, call the Confirm card payment API with the token to confirm and capture the payment. Authenticate with your API key (see Authentication).
Never call this API from the browser. Your API key must stay on your server.
amount is in cents (e.g. 1050 = 10.50 USD). Check transaction.status in the response: AUTHORIZED means the payment succeeded, FAILED means it was declined, and PROCESSING means it is still in progress.
