Install SDK
- Install the SDK as an npm package by running the command:
Copy
npm install --save @xsolla/pay-station-sdk
- Initialize the SDK by passing environment parameters:
Copy
- typescript
import { headlessCheckout } from '@xsolla/pay-station-sdk';
await headlessCheckout.init({
sandbox: true,
});
- Pass the payment token for the initialized SDK:
Copy
- typescript
await headlessCheckout.setToken(accessToken);
Was this article helpful?
Thank you for your feedback!
We’ll review your message and use it to help us improve your experience.Found a typo or other text error? Select the text and press Ctrl+Enter.