Skip to main content
The paywit package opens the checkout in a Custom Tab on Android or SFSafariViewController on iOS, waits for the payment to settle, and returns the result. No URL schemes, no assetlinks.json, no manifest edits.
Your backend creates the payment with the secret key and returns the checkout URL. The app only opens it, so the amount is fixed server-side.
checkoutPayment needs no publishable key.

Quick path: create from the app

For prototypes, or when the amount is not security-sensitive, the app can create the payment itself with the publishable key.
Or drop in PaywitButton with onResult and onError callbacks.

Results

An unpaid payment is a result, not an exception:
canceled means the buyer came back to your app without finishing. They can still pay from their wallet afterwards. Release goods from your webhook, not from this result.
Cross-chain payments pass through PaymentStatus.bridging while funds move between chains. These never expire and the SDK keeps waiting.

Errors

Faults throw PaywitException, a sealed type: PaywitApiException (with statusCode and message), PaywitNetworkException, PaywitConfigException and PaywitBrowserException.

Platforms

Android SDK 23 and up, iOS 13 and up. Call paywit.dispose() when you are done with an instance.