Skip to main content

BUY BUTTON

Buy Button - Unity

Two simple ways to add external payments to your Unity app: redirect users to your Web Shop, or launch Pay Station's native in-app UI. Both are production-ready โ€” pick the one that fits your workflow.

Buy Button Solution

Full payment UI handled natively inside your app โ€” no browser redirect.

  • Want a fully native integration
  • Need 1,000+ payment methods out of the box
  • Prefer Xsolla to manage the payment UI
  • Want automatic regional compliance

important

To enable link-outs only where they're permitted, first detect the storefront country code: Android (U.S., effective Oct 29, 2025) ยท iOS (U.S., Japan, and Brazil).

// Provide Web Shop URL in settings
var settings = XsollaClientSettings.Builder.Create()
// An URL to your Xsolla-based web shop.
.SetWebShopUrl("https://yourwebshop.xsolla.site")
// A deeplink URL used to return the purchase result to your app.
// E.g. `myapp://open`.
.SetRedirectUrl("<schema>://<host>")
.Build();

// Enable Web Shop simple mode and pass user identifier
var configuration = XsollaClientConfiguration.Builder.Builder.Create()
.SetSettings(settings)
// Make sure the mode is switched to `XsollaClientConfiguration.SimpleMode.WebShop` for link-outs.
.SetSimpleMode(XsollaClientConfiguration.SimpleMode.WebShop)
// User ID to be associated with the purchase.
.SetUserId("<USER_ID>")
.Build();

This opens your Web Shop in the device browser. Fulfillment happens via your server-side webhooks โ€” see webhook setup.

Still not sure?

Web Shop is great if you have an existing store or want to start with minimal changes. Pay Station is the fastest path to a fully native integration. Both support the same payment methods and regions worldwide.