- v1 to v4 - for merchants currently using v1
- v3 to v4 - for merchants currently using v3
- v1 to v3 - historical reference
v4 replaces the LRS-only GlomoLrsCheckout with a unified GlomoCheckout that auto-detects order type (LRS, Standard, or Subscriptions) and provides a single onUserJourneyCompleted callback for all asynchronous payment flows.
For the complete v4 API reference, see the React Native SDK v4 documentation. For the full list of changes, see the Changelog.
| v1 | v4 |
|---|---|
GlomoLrsCheckout | GlomoCheckout |
GlomoLrsCheckoutRef | GlomoCheckoutRef |
GlomoLrsCheckoutProps | GlomoCheckoutProps |
GlomoLrsCheckoutPayload | GlomoCheckoutPayload |
GlomoLrsServer | GlomoServer |
LrsCheckoutStatus | CheckoutStatus |
useLrsCheckout | useGlomoCheckout (deprecated - use component ref instead) |
start()is now async - returnsPromise<boolean>instead ofboolean. Update call sites toawait ref.current?.start().- Asynchronous payment callbacks - v4 uses a single
onUserJourneyCompletedcallback with anASYNC_PAYMENT_EVENTSenum instead of separate per-flow callbacks. (These callbacks did not exist in v1, so no migration needed - just be aware of the v4 API when adding them.) - New statuses -
detecting_order_type,bank_transfer_submitted, andpay_via_bank_completedare additions toCheckoutStatus. onSdkErroris now required - was optional in v1. Must be provided in v4 to surface validation errors, device compliance failures, and configuration issues.
v1:
import { GlomoLrsCheckout, type GlomoLrsCheckoutRef } from "@glomopay/react-native-sdk";
const ref = useRef<GlomoLrsCheckoutRef>(null);
const started = ref.current?.start(); // booleanv4:
import {
GlomoCheckout,
ASYNC_PAYMENT_EVENTS,
type GlomoCheckoutRef,
} from "@glomopay/react-native-sdk";
const ref = useRef<GlomoCheckoutRef>(null);
const started = await ref.current?.start(); // Promise<boolean>
// In your component JSX:
<GlomoCheckout
ref={ref}
publicKey="live_pk_abc123"
orderId="order_xyz789"
onPaymentSuccess={(payload) => console.log("Success:", payload.paymentId)}
onPaymentFailure={(payload) => console.log("Failed:", payload.paymentId)}
onUserJourneyCompleted={(payload) => {
switch (payload.journeyType) {
case ASYNC_PAYMENT_EVENTS.BANK_TRANSFER_SUBMITTED:
console.log("Transfer ref:", payload.transactionReference);
break;
case ASYNC_PAYMENT_EVENTS.PAY_VIA_BANK_COMPLETED:
console.log("Pay via bank:", payload.status);
break;
}
}}
/>Checkout flows with camera-based bank authentication require native permissions:
- Android (
AndroidManifest.xml):<uses-permission android:name="android.permission.CAMERA" /> - iOS (
Info.plist):NSCameraUsageDescriptionkey
These are only required for flows that use camera-based bank authentication.
- Subscriptions checkout - pass
subscriptionIdinstead oforderId. See Subscriptions Checkout. - Asynchronous payment flows -
onUserJourneyCompletedcallback withASYNC_PAYMENT_EVENTSenum. See Asynchronous Payment Flows. - Camera permissions handling -
onUserRefusedCameraPermissionscallback. See Camera Permissions. - Order type auto-detection - the SDK determines the checkout flow automatically. The
detecting_order_typestatus is emitted during detection. - Mock mode extended -
mock_prefix keys now supported in addition totest_.
v4 consolidates the asynchronous payment flow callbacks into a single generic callback.
For the full list of changes, see the Changelog. For the complete v4 API reference, see the React Native SDK v4 documentation.
| v3 | v4 |
|---|---|
onBankTransferSubmitted | Use onUserJourneyCompleted with journeyType: ASYNC_PAYMENT_EVENTS.BANK_TRANSFER_SUBMITTED |
onPayViaBankCompleted | Use onUserJourneyCompleted with journeyType: ASYNC_PAYMENT_EVENTS.PAY_VIA_BANK_COMPLETED |
onPayViaBankBankConnectionSuccessful | Removed (no replacement) |
| v3 | v4 |
|---|---|
GlomoBankTransferPayload | Use GlomoUserJourneyCompletedPayload |
GlomoPayViaBankConnectionPayload | Removed |
| Type | Purpose |
|---|---|
ASYNC_PAYMENT_EVENTS | Enum of asynchronous payment event types |
GlomoUserJourneyCompletedPayload | Payload for onUserJourneyCompleted callback |
onSdkError was optional in v3. In v4 it is required. If you were not passing it, add it:
onSdkError={(errors) => {
errors.forEach((e) => console.error(e.type, e.message, e.field));
}}CheckoutStatusvaluesbank_transfer_submittedandpay_via_bank_completedremain unchanged.getStatus()continues to return granular status values.
v3:
<GlomoCheckout
onBankTransferSubmitted={(payload) => {
console.log("Transfer ref:", payload?.transactionReference);
}}
onPayViaBankCompleted={(payload) => {
console.log("Pay via bank:", payload.status);
}}
onPayViaBankBankConnectionSuccessful={(payload) => {
console.log("Bank connected:", payload?.bankName);
}}
// ...other props
/>v4:
import { ASYNC_PAYMENT_EVENTS } from "@glomopay/react-native-sdk";
<GlomoCheckout
onUserJourneyCompleted={(payload) => {
switch (payload.journeyType) {
case ASYNC_PAYMENT_EVENTS.BANK_TRANSFER_SUBMITTED:
console.log("Transfer ref:", payload.transactionReference);
break;
case ASYNC_PAYMENT_EVENTS.PAY_VIA_BANK_COMPLETED:
console.log("Pay via bank:", payload.status);
break;
}
}}
// ...other props
/>v3 replaces the LRS-only GlomoLrsCheckout with a unified GlomoCheckout that auto-detects order type (LRS, Standard, or Subscriptions).
For the complete v3 API reference, see the React Native SDK v3 documentation. For the full list of changes, see the Changelog.
| v1 | v3 |
|---|---|
GlomoLrsCheckout | GlomoCheckout |
GlomoLrsCheckoutRef | GlomoCheckoutRef |
GlomoLrsCheckoutProps | GlomoCheckoutProps |
GlomoLrsCheckoutPayload | GlomoCheckoutPayload |
GlomoLrsServer | GlomoServer |
LrsCheckoutStatus | CheckoutStatus |
useLrsCheckout | useGlomoCheckout |
start()is now async: ReturnsPromise<boolean>instead ofboolean. Update call sites toawait ref.current?.start().- New statuses:
bank_transfer_submittedandpay_via_bank_completedare new additions toCheckoutStatus. - New callbacks:
onBankTransferSubmitted,onPayViaBankCompleted,onPayViaBankBankConnectionSuccessful, andonUserRefusedCameraPermissionsare available.
v1:
import { GlomoLrsCheckout, type GlomoLrsCheckoutRef } from "@glomopay/react-native-sdk";
const ref = useRef<GlomoLrsCheckoutRef>(null);
const started = ref.current?.start(); // booleanv3:
import { GlomoCheckout, type GlomoCheckoutRef } from "@glomopay/react-native-sdk";
const ref = useRef<GlomoCheckoutRef>(null);
const started = await ref.current?.start(); // Promise<boolean>Checkout flows with camera-based bank authentication require native permissions:
- Android (
AndroidManifest.xml):<uses-permission android:name="android.permission.CAMERA" /> - iOS (
Info.plist):NSCameraUsageDescriptionkey
These are only required for flows that use camera-based bank authentication.
For the full changelog, see the Changelog.
The following features are new in v3 and have no v1 equivalent. No migration is needed for these - they are additive.
- Subscriptions checkout - pass
subscriptionIdinstead oforderIdto process subscription payments. See Subscriptions Checkout. - Bank transfer support -
onBankTransferSubmittedcallback for bank transfer flows. See Bank Transfer Support. - Pay via bank support -
onPayViaBankCompletedandonPayViaBankBankConnectionSuccessfulcallbacks. See Pay via Bank Support. - Camera permissions handling -
onUserRefusedCameraPermissionscallback. See Camera Permissions. - Order type auto-detection - the SDK determines the checkout flow automatically. The
detecting_order_typestatus is emitted during detection. - Mock mode extended -
mock_prefix keys now supported in addition totest_.
- React Native SDK v4 documentation - complete v4 API reference
- React Native SDK v3 documentation (Archived) - v3 API reference
- Changelog - all release notes
- React Native SDK v1 (Archived) - legacy version documentation