Payclave developers
SDKs
Official libraries for server, browser, React, and React Native integrations.
Use the server library to create checkout sessions with a secret key, then open the returned checkout URL in your frontend. Browser and mobile libraries use publishable keys. Fulfill orders from verified webhooks.
Official libraries
Node.js
Create checkout sessions, read payment records, and verify webhook signatures on your backend.
Read guideReact Native and Expo
Open checkout in the system browser and follow payment progress in your mobile app.
Read guide
Install
Choose the tab for your package manager and install only the packages your app uses. The commands pin versions so the examples have a defined contract. Check the package's release notes before upgrading; workspace-only methods may not be available in a published version.
The recommended integration creates checkout sessions with @payclave/sdk-server on your backend, then opens the returned checkout URL on your frontend.
requireUser and loadPayableOrderForUser in this example are functions you implement in your application. They authenticate the customer and return an order the customer is allowed to pay. idempotencyKey is an SDK request option; it becomes the HTTP header rather than a field in the JSON request body.
Handle SDK errors
Catch PayclaveError on the server and retain its code, status, and requestId. Validation and permission failures need a corrected request or configuration. For a timeout during creation, retry with the original idempotency key before creating another order attempt. See API basics for retry rules.
Browser and React
createPayclaveClient opens hosted checkout from plain JavaScript. PayclaveCheckoutButton provides the button in a React client component. Both examples below create a limited publishable-key checkout. They do not authorize a shopping-cart price or decide whether an order should be fulfilled.
For simple, fixed-price integrations, use a publishable key. For production order pricing, create the session on your backend instead.
Mobile
Use @payclave/sdk-react-native to open hosted checkout in the system browser, follow status with a publishable key, and return to your app. Do not use an embedded WebView or fulfill orders from a deep link. Your backend must verify payment webhooks.
Have your backend create the session and return its ID to the app. Use a publishable key from the same mode to follow its status. If the customer closes the browser, show the order's current state from your backend; a payment may still be confirming. A successful return to the app is a reason to refresh the order, not a fulfillment trigger.
The mobile integration guide covers React Native and Expo setup, return links, app lifecycle, and native Swift, Kotlin, and Flutter examples.