{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-platform/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"GlomoPay React Native SDK v4","llmstxt":{"title":"Glomopay developer documentation","description":"Cross-border payments APIs, organised by product. Each product section carries both the explanation of its objects and the job-shaped integration guides that set them up.","details":{"content":"How to use these docs:\n\n- Get started is the front door. It carries a routing table from\n  \"what are you building\" to the page that builds it, plus how to get\n  API keys.\n- The product sections - Payin, Payout, Multi-currency accounts,\n  Verification, Request for Information (RFI) - each hold two kinds of page.\n  Pages titled as a noun (\"Subscriptions\", \"Bank Transfer\") explain what\n  an object is. Pages titled as a job (\"Set up recurring subscriptions\",\n  \"Collect LRS remittances from India\") are complete integration flows\n  and live one level under the object they set up. Match a user's goal\n  against the job-shaped titles first.\n- Reports and Identity and Access Management are the two subjects with no\n  API counterpart. There are no endpoints for reports, users, roles or\n  invites; both pages document the merchant dashboard. A dashboard\n  procedure for something the API also does (a refund, a payout) is NOT\n  here - it stays in the product that owns it.\n- API reference is generated from OpenAPI and carries endpoint detail.\n- The OpenAPI description itself is published as a single self-contained\n  document at /openapi.yaml, and the same document as JSON at\n  /openapi.json. Every $ref is resolved into it, so one fetch is the\n  whole contract: 61 paths, 81 operations, 68 schemas - the same\n  endpoints the API reference pages render. Fetch that instead of\n  reading the 129 pages under /api-reference/.\n- Developer resources covers what every integration touches and no single\n  product owns: auth, errors, pagination, rate limits, webhooks,\n  versioning, supported countries, quotes, and the client SDKs.\n"},"sections":[{"title":"Get started","description":"The front door. The routing table from a merchant's goal to the flow that delivers it, how to obtain API keys, and the platform glossary.","includeFiles":["**/get-started/**"]},{"title":"Payin","description":"Collecting money: customers, orders, checkout, payment links, payment methods (cards, bank transfer, pay via bank), refunds, disputes, purpose codes, fee models, custom fields, subscriptions, and resident India remittance under LRS. Includes the flows that set each up - bank transfers, subscriptions, LRS remittances, and server-to-server card payments.","includeFiles":["**/payin/**"]},{"title":"Payout","description":"Sending money: the payout life cycle, queued payouts, creating and cancelling a payout, rails, beneficiaries, purpose codes, and the action required state.","includeFiles":["**/payout/**"]},{"title":"Multi-currency accounts","description":"Holding money: balances, balance conversion, adding balance, withdrawing balance, and the settlement holiday calendar - the Indian and US bank and FX holidays on which settlement to the merchant's bank account, and money movement generally, is affected.","includeFiles":["**/multi-currency-account/**"]},{"title":"Verification","description":"Proving who someone is and that an account is theirs: KYC, bank account validation, and third-party verification (TPV) with the flow that verifies a payer's bank account.","includeFiles":["**/verification/**"]},{"title":"Request for Information (RFI)","description":"Responding to a compliance request for information, per object - payment link, order, payment, payout - plus compliance reviews and RFIs raised on already-successful payments.","includeFiles":["**/request-for-information/**"]},{"title":"Reports","description":"The downloadable and scheduled reports a merchant pulls from the dashboard for reconciliation, compliance and treasury: payment, subscription, settlement breakup, balance statement and KYC reports, plus scheduling one for recurring email delivery. Dashboard only - there is no reports API.","includeFiles":["**/reports/**"]},{"title":"Identity and Access Management","description":"Administering who can use a merchant account: one set of credentials across multiple MIDs, switching between them without logging out, the Admin / Member / Sales Partner roles and what each may see and do, and inviting a new member. Dashboard only - there is no users, roles or invites API.","includeFiles":["**/access-management/**"]},{"title":"API reference","description":"Endpoint reference generated from the Glomopay OpenAPI description.","includeFiles":["**/api-reference/**"]},{"title":"Developer resources","description":"What every integration touches and no single product owns: auth, errors, pagination, rate limits, webhooks, versioning, API validations, security, supported countries, quotes, and the client SDKs - React Native, Flutter, Android and the Unified Web SDK, with per-version references and changelogs. Reports and Identity and Access Management used to be listed here and are now their own sections.","includeFiles":["**/platform/**"]}]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"glomopay-react-native-sdk-v4","__idx":0},"children":["GlomoPay React Native SDK v4"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Official React Native SDK for integrating GlomoPay payment checkout flows into your mobile applications."]},{"$$mdtype":"Tag","name":"blockquote","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Upgrading from v1 or v3? See the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/platform/sdk/react-native-sdk/migration"},"children":["Migration Guide"]},". Full ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/platform/sdk/react-native-sdk/changelog"},"children":["Changelog"]}," is also available."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"prerequisites","__idx":1},"children":["Prerequisites"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Before using this SDK, you need:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["API credentials (Public Key) from your GlomoPay dashboard"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["An order ID created via the GlomoPay API (or a subscription ID for subscription payments)"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"system-requirements","__idx":2},"children":["System Requirements"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Requirement"},"children":["Requirement"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Version"},"children":["Version"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Node.js"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[">= 16.0.0"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["npm"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[">= 8.0.0"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["React"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[">= 17.0.0"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["React Native"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[">= 0.68.0"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["react-native-webview"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["^13.0.0"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["jail-monkey (optional, but strongly recommended)"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["^2.6.0"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"installation","__idx":3},"children":["Installation"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"react-native-cli","__idx":4},"children":["React Native CLI"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"npm install @glomopay/react-native-sdk react-native-webview\ncd ios && pod install\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"expo","__idx":5},"children":["Expo"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"npx expo install @glomopay/react-native-sdk react-native-webview\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"recommended-device-security-compliance","__idx":6},"children":["Recommended: Device Security Compliance"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For rooted/jailbroken device detection (strongly recommended for regulated flows):"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"npm install jail-monkey\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The SDK works without ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["jail-monkey"]},", but installing it enables automatic device security checks. Without it, the SDK logs a warning on every ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["start()"]}," call."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"quick-start","__idx":7},"children":["Quick Start"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"tsx","header":{"controls":{"copy":{}}},"source":"import React, { useRef } from \"react\";\nimport { View, Button } from \"react-native\";\nimport {\n  GlomoCheckout,\n  ASYNC_PAYMENT_EVENTS,\n  type GlomoCheckoutRef,\n  type GlomoCheckoutPayload,\n  type SdkError,\n} from \"@glomopay/react-native-sdk\";\n\nexport default function PaymentScreen() {\n  const checkoutRef = useRef<GlomoCheckoutRef>(null);\n\n  const handlePay = async () => {\n    const started = await checkoutRef.current?.start();\n    if (!started) {\n      console.log(\"Checkout could not start - check onSdkError for details\");\n    }\n  };\n\n  return (\n    <View style={{ flex: 1 }}>\n      <Button title=\"Pay Now\" onPress={handlePay} />\n\n      <GlomoCheckout\n        ref={checkoutRef}\n        publicKey=\"live_pk_abc123\"\n        orderId=\"order_xyz789\"\n        onPaymentSuccess={(payload: GlomoCheckoutPayload) => {\n          console.log(\"Payment success:\", payload.paymentId);\n        }}\n        onPaymentFailure={(payload: GlomoCheckoutPayload) => {\n          console.log(\"Payment failed:\", payload.paymentId);\n        }}\n        onPaymentTerminate={() => {\n          console.log(\"User dismissed checkout\");\n        }}\n        onConnectionError={(error) => {\n          console.log(\"Connection error:\", error);\n        }}\n        onUserJourneyCompleted={(payload) => {\n          switch (payload.journeyType) {\n            case ASYNC_PAYMENT_EVENTS.BANK_TRANSFER_SUBMITTED:\n              console.log(\"Bank transfer submitted:\", payload.transactionReference);\n              break;\n            case ASYNC_PAYMENT_EVENTS.PAY_VIA_BANK_COMPLETED:\n              console.log(\"Pay via bank completed:\", payload.status);\n              break;\n          }\n        }}\n        onUserRefusedCameraPermissions={() => {\n          console.log(\"User refused camera - cannot proceed with bank authentication\");\n        }}\n        onSdkError={(errors: SdkError[]) => {\n          errors.forEach((e) => console.error(e.type, e.message, e.field));\n        }}\n      />\n    </View>\n  );\n}\n","lang":"tsx"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"subscriptions-checkout","__idx":8},"children":["Subscriptions Checkout"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["To process subscription payments, pass a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["subscriptionId"]}," instead of an ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["orderId"]},":"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"tsx","header":{"controls":{"copy":{}}},"source":"<GlomoCheckout\n  ref={checkoutRef}\n  publicKey=\"live_pk_abc123\"\n  subscriptionId=\"sub_xyz789\"\n  onPaymentSuccess={(payload) => {\n    console.log(\"Subscription payment success:\", payload.paymentId);\n  }}\n  onPaymentFailure={(payload) => {\n    console.log(\"Subscription payment failed:\", payload.paymentId);\n  }}\n  onSdkError={(errors) => {\n    errors.forEach((e) => console.error(e.type, e.message));\n  }}\n/>\n","lang":"tsx"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["When ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["subscriptionId"]}," is provided:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The SDK skips order type detection (no API call)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["subscriptionId"]}," must start with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sub_"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onUserJourneyCompleted"]}," is not applicable - subscriptions are card-only (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onPaymentSuccess"]},"/",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onPaymentFailure"]},")"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Do not pass both ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["orderId"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["subscriptionId"]}," - the SDK will fire ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onSdkError"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["detecting_order_type"]}," status is not emitted for subscription flows"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"features","__idx":9},"children":["Features"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Cross-platform"]}," - works on both iOS and Android"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["TypeScript"]}," - full type definitions for all exports"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Unified checkout"]}," - renders the correct checkout flow automatically based on your order"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Asynchronous payment flows"]}," - single ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onUserJourneyCompleted"]}," callback for bank transfer and pay via bank events"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Camera permissions"]}," - built-in handling for bank authentication"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Device security"]}," - optional ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["(but strongly recommended)"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["jail-monkey"]}," integration for rooted/jailbroken device detection"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Input validation"]}," - publicKey and orderId format enforcement before checkout starts"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Mock mode"]}," - test with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["test_"]}," / ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["mock_"]}," prefixed keys without hitting production"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"api-reference","__idx":10},"children":["API Reference"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"glomocheckout-component","__idx":11},"children":["GlomoCheckout Component"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The unified checkout component. Place it in your render tree and control it via a ref."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"tsx","header":{"controls":{"copy":{}}},"source":"<GlomoCheckout ref={checkoutRef} {...props} />\n","lang":"tsx"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"props--glomocheckoutprops-","__idx":12},"children":["Props (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GlomoCheckoutProps"]},")"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Prop"},"children":["Prop"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Type"},"children":["Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Required"},"children":["Required"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["publicKey"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["string"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Your GlomoPay public key (must start with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["live_"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["mock_"]},", or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["test_"]},")"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["orderId"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["string"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No*"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Order ID from the GlomoPay API (must start with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["order_"]},")"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["subscriptionId"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["string"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No*"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Subscription ID (must start with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sub_"]},"). Bypasses order type detection."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onPaymentSuccess"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["(payload: GlomoCheckoutPayload) => void"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Called when payment succeeds"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onPaymentFailure"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["(payload: GlomoCheckoutPayload) => void"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Called when payment fails"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onConnectionError"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["(error: unknown) => void"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Called on network/connection errors"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onPaymentTerminate"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["() => void"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Called when user dismisses checkout (back button or swipe)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onSdkError"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["(errors: SdkError[]) => void"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Called on validation errors or device compliance failures"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onUserJourneyCompleted"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["(payload: GlomoUserJourneyCompletedPayload) => void"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Called when an asynchronous payment flow completes (bank transfer submission, pay via bank completion). Check ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["payload.journeyType"]}," to determine the flow."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onUserRefusedCameraPermissions"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["() => void"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Called when user denies camera access needed for bank authentication"]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["*Exactly one of ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["orderId"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["subscriptionId"]}," must be provided. If both or neither are set, ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onSdkError"]}," fires and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["start()"]}," returns ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["false"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"ref-methods--glomocheckoutref-","__idx":13},"children":["Ref Methods (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GlomoCheckoutRef"]},")"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Method"},"children":["Method"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Signature"},"children":["Signature"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["start()"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["() => Promise<boolean>"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Validates inputs, and opens the checkout modal. Resolves ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["true"]}," if successful, ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["false"]}," otherwise."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["getStatus()"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["() => CheckoutStatus"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Returns the current checkout status."]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"checkoutstatus","__idx":14},"children":["CheckoutStatus"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Status"},"children":["Status"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ready"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Initial state - checkout can be started"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["detecting_order_type"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Order type detection in progress (after ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["start()"]},", before checkout opens)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["payment_in_progress"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Checkout modal is open, user is interacting"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["payment_successful"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Payment completed successfully. Cannot restart with same order"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["payment_failed"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Payment failed. Can retry with same order"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["payment_cancelled"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["User dismissed checkout mid-flow. Can retry"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["bank_transfer_submitted"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["User submitted bank transfer details"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["pay_via_bank_completed"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Pay via bank flow completed"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"type-definitions","__idx":15},"children":["Type Definitions"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"glomocheckoutpayload","__idx":16},"children":["GlomoCheckoutPayload"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"ts","header":{"controls":{"copy":{}}},"source":"interface GlomoCheckoutPayload {\n  orderId: string;\n  paymentId: string;\n  signature: string;\n}\n","lang":"ts"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"async_payment_events","__idx":17},"children":["ASYNC_PAYMENT_EVENTS"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"ts","header":{"controls":{"copy":{}}},"source":"enum ASYNC_PAYMENT_EVENTS {\n  BANK_TRANSFER_SUBMITTED = \"bank_transfer_submitted\",\n  PAY_VIA_BANK_COMPLETED = \"pay_via_bank_completed\",\n}\n","lang":"ts"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"glomouserjourneycompletedpayload","__idx":18},"children":["GlomoUserJourneyCompletedPayload"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"ts","header":{"controls":{"copy":{}}},"source":"interface GlomoUserJourneyCompletedPayload {\n  journeyType: ASYNC_PAYMENT_EVENTS;\n  orderId?: string;\n  status?: string;\n  senderAccountNumber?: string;\n  transactionReference?: string;\n}\n","lang":"ts"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"sdkerror","__idx":19},"children":["SdkError"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"ts","header":{"controls":{"copy":{}}},"source":"interface SdkError {\n  type: \"validation_error\" | \"device_forbidden\";\n  message: string;\n  field?: \"publicKey\" | \"orderId\" | \"subscriptionId\" | \"baseCheckoutUrl\" | \"generatedCheckoutUrl\";\n}\n","lang":"ts"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"asynchronous-payment-flows","__idx":20},"children":["Asynchronous Payment Flows"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The SDK fires ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onUserJourneyCompleted"]}," when an asynchronous payment flow completes. Use ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["payload.journeyType"]}," to determine which flow triggered the callback:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"tsx","header":{"controls":{"copy":{}}},"source":"onUserJourneyCompleted={(payload) => {\n  switch (payload.journeyType) {\n    case ASYNC_PAYMENT_EVENTS.BANK_TRANSFER_SUBMITTED:\n      /**\n       * User submitted bank transfer details.\n       * Relevant fields: orderId, senderAccountNumber, transactionReference\n       * Note: fields may be absent if the checkout page omits them.\n       */\n      console.log(\"Transfer ref:\", payload.transactionReference);\n      break;\n    case ASYNC_PAYMENT_EVENTS.PAY_VIA_BANK_COMPLETED:\n      /**\n       * Pay via bank journey completed.\n       * Relevant fields: orderId, status\n       * The SDK deduplicates this event - fires only once per session.\n       */\n      console.log(\"Pay via bank status:\", payload.status);\n      break;\n  }\n}}\n","lang":"tsx"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The checkout status transitions to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["bank_transfer_submitted"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["pay_via_bank_completed"]}," respectively. Use ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["getStatus()"]}," for granular programmatic checks."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"camera-permissions","__idx":21},"children":["Camera Permissions"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Some checkout flows may require camera access for bank authentication. The SDK handles permission prompts automatically, but you must declare the permissions in your native project config."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"android","__idx":22},"children":["Android"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Add to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["android/app/src/main/AndroidManifest.xml"]},":"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"xml","header":{"controls":{"copy":{}}},"source":"<uses-permission android:name=\"android.permission.CAMERA\" />\n","lang":"xml"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"ios","__idx":23},"children":["iOS"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Add to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ios/<YourApp>/Info.plist"]},":"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"xml","header":{"controls":{"copy":{}}},"source":"<key>NSCameraUsageDescription</key>\n<string>Camera access is required for identity verification during checkout</string>\n","lang":"xml"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"behavior","__idx":24},"children":["Behavior"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Android"]},": SDK prompts the user via a native permission dialog. If denied, checkout closes and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onUserRefusedCameraPermissions"]}," fires."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["iOS"]},": SDK grants the WebView permission request; iOS shows its own system prompt. If the user denies at the system level, the WebView handles the denial."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"platform-behavior","__idx":25},"children":["Platform Behavior"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["iOS"]},": Checkout opens as a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["pageSheet"]}," modal (swipe-down to dismiss). Dismissing fires ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onPaymentTerminate"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Android"]},": Checkout opens fullscreen. The hardware back button dismisses it and fires ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onPaymentTerminate"]},"."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"device-security-compliance","__idx":26},"children":["Device Security Compliance"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The SDK optionally integrates with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["jail-monkey"]}," to detect rooted (Android) or jailbroken (iOS) devices."]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["If ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["jail-monkey"]}," is installed and the device is compromised: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["start()"]}," returns ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["false"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onSdkError"]}," fires with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["type: \"device_forbidden\""]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["If ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["jail-monkey"]}," is installed and the device is clean: checkout proceeds normally."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["If ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["jail-monkey"]}," is not installed: SDK logs a warning and proceeds without checking. This is not recommended for production deployments handling regulated transactions."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"mock-mode","__idx":27},"children":["Mock Mode"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The SDK infers mock mode from the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["publicKey"]}," prefix:"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Prefix"},"children":["Prefix"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Mode"},"children":["Mode"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Environment"},"children":["Environment"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["live_"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Live"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Production"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["test_"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Mock"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Test/sandbox"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["mock_"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Mock"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Test/sandbox"]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Mock mode keys route to the sandbox backend. No real transactions are created."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"connection-handling","__idx":28},"children":["Connection Handling"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The SDK detects connection errors from the WebView and fires ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onConnectionError"]},":"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["iOS"]},": NSURLErrorDomain codes (-1001 timeout, -1003 host not found, -1004 connection refused, -1009 offline)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Android"]},": ERR_EMPTY_RESPONSE, ERR_CONNECTION_REFUSED, ERR_NAME_NOT_RESOLVED, ERR_INTERNET_DISCONNECTED, ERR_CONNECTION_TIMED_OUT, ERR_NETWORK_CHANGED"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The checkout modal is automatically dismissed on connection errors."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"input-validation","__idx":29},"children":["Input Validation"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The SDK validates inputs before starting the checkout:"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Field"},"children":["Field"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Rule"},"children":["Rule"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["publicKey"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Must start with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["live_"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["mock_"]},", or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["test_"]},". Min 6 characters."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["orderId"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Must start with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["order_"]},". Min 7 characters. Required when ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["subscriptionId"]}," is absent."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["subscriptionId"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Must start with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sub_"]},". Trimmed and checked for emptiness. Required when ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["orderId"]}," is absent."]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Validation failures fire ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onSdkError"]}," with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["type: \"validation_error\""]}," and the relevant ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["field"]}," name. ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["start()"]}," returns ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["false"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Providing both ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["orderId"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["subscriptionId"]}," (or neither) also fires ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onSdkError"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"useglomocheckout-hook-deprecated","__idx":30},"children":["useGlomoCheckout Hook (Deprecated)"]},{"$$mdtype":"Tag","name":"blockquote","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Deprecated"]}," - Legacy hook, will be removed in a future major version."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["useGlomoCheckout"]}," is a legacy placeholder from the v1.x hook-based API. In v1.x, the equivalent"," ","hook (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["useLrsCheckout"]},") provided reactive WebView state and rendering primitives that merchants used"," ","to build custom checkout UIs. In v3+, the inner checkout components are no longer exported, making"," ","this hook ineffective for custom rendering."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The hook's public return type (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["UseGlomoCheckoutReturn"]},") exposes:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["start()"]}," - identical to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GlomoCheckoutRef.start()"]},". Returns ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Promise<boolean>"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["getStatus()"]}," - returns a point-in-time ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["CheckoutStatus"]}," snapshot. ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Not reactive"]}," - does not"," ","trigger re-renders when status changes."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Use the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GlomoCheckout"]}," component with a ref instead:"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"tsx","header":{"controls":{"copy":{}}},"source":"import React, { useRef } from \"react\";\nimport { GlomoCheckout, type GlomoCheckoutRef } from \"@glomopay/react-native-sdk\";\n\nconst checkoutRef = useRef<GlomoCheckoutRef>(null);\n\n// Start checkout\nconst started = await checkoutRef.current?.start();\n\n// Check status (point-in-time, same as hook)\nconst status = checkoutRef.current?.getStatus();\n","lang":"tsx"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The component-based API provides the same functionality with proper lifecycle management."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"troubleshooting","__idx":31},"children":["Troubleshooting"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"start-returns-false","__idx":32},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["start()"]}," returns ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["false"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Check ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onSdkError"]}," for details. Common causes:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Invalid ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["publicKey"]}," format (must start with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["live_"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["mock_"]},", or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["test_"]},")"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Invalid ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["orderId"]}," format (must start with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["order_"]},")"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Invalid ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["subscriptionId"]}," format (must start with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sub_"]},", non-empty after trimming)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Both ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["orderId"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["subscriptionId"]}," provided (or neither)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Device is rooted/jailbroken (when ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["jail-monkey"]}," is installed)"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"checkout-opens-but-shows-a-blank-screen","__idx":33},"children":["Checkout opens but shows a blank screen"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Verify network connectivity"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Check that the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["publicKey"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["orderId"]}," are valid"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"camera-permission-denied","__idx":34},"children":["Camera permission denied"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Ensure ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["AndroidManifest.xml"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Info.plist"]}," include camera permission declarations"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onUserRefusedCameraPermissions"]}," callback will fire when the user denies"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"onuserjourneycompleted-not-firing","__idx":35},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onUserJourneyCompleted"]}," not firing"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Ensure you are passing ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onUserJourneyCompleted"]}," as a prop to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GlomoCheckout"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Verify the checkout flow involves an asynchronous payment (bank transfer or pay via bank)"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"exports","__idx":36},"children":["Exports"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"ts","header":{"controls":{"copy":{}}},"source":"// Components\nexport { GlomoCheckout } from \"@glomopay/react-native-sdk\";\n\n// Hooks (deprecated - use GlomoCheckout component with ref instead)\nexport { useGlomoCheckout } from \"@glomopay/react-native-sdk\";\n\n// Enums\nexport { ASYNC_PAYMENT_EVENTS } from \"@glomopay/react-native-sdk\";\n\n// Types\nexport type {\n  GlomoCheckoutRef,\n  GlomoCheckoutProps,\n  GlomoCheckoutPayload,\n  CheckoutStatus,\n  GlomoUserJourneyCompletedPayload,\n  UseGlomoCheckoutReturn,  // deprecated\n  SdkError,\n} from \"@glomopay/react-native-sdk\";\n","lang":"ts"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"security","__idx":37},"children":["Security"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The SDK loads checkout pages in an isolated WebView. No PAN, CVV, or sensitive payment data passes through the React Native bridge - all sensitive input is handled within the WebView's sandboxed context."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Device integrity checking is available via optional ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["jail-monkey"]}," integration (see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#device-security-compliance"},"children":["Device Security Compliance"]},")."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["To report a security vulnerability, email security@glomopay.com. Do not open a public GitHub issue for security reports."]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"related","__idx":38},"children":["Related"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/platform/sdk/react-native-sdk/migration"},"children":["Migration Guide (v1 to v4)"]}," - step-by-step upgrade instructions with before/after code"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/platform/sdk/react-native-sdk/changelog"},"children":["Changelog"]}," - all release notes"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/platform/sdk/react-native-sdk/v3"},"children":["React Native SDK v3 (Archived)"]}," - previous version documentation"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/platform/sdk/react-native-sdk/v1"},"children":["React Native SDK v1 (Archived)"]}," - legacy version documentation"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/platform/sdk/flutter-sdk"},"children":["Flutter SDK"]}," - GlomoPay SDK for Flutter apps"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/platform/sdk/unified-sdk"},"children":["Unified SDK (Web)"]}," - GlomoPay SDK for web apps"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/payin/checkout"},"children":["Checkout overview"]}," - server-side checkout integration and signature verification"]}]}]},"headings":[{"value":"GlomoPay React Native SDK v4","id":"glomopay-react-native-sdk-v4","depth":1},{"value":"Prerequisites","id":"prerequisites","depth":2},{"value":"System Requirements","id":"system-requirements","depth":2},{"value":"Installation","id":"installation","depth":2},{"value":"React Native CLI","id":"react-native-cli","depth":3},{"value":"Expo","id":"expo","depth":3},{"value":"Recommended: Device Security Compliance","id":"recommended-device-security-compliance","depth":3},{"value":"Quick Start","id":"quick-start","depth":2},{"value":"Subscriptions Checkout","id":"subscriptions-checkout","depth":2},{"value":"Features","id":"features","depth":2},{"value":"API Reference","id":"api-reference","depth":2},{"value":"GlomoCheckout Component","id":"glomocheckout-component","depth":3},{"value":"Props ( GlomoCheckoutProps )","id":"props--glomocheckoutprops-","depth":4},{"value":"Ref Methods ( GlomoCheckoutRef )","id":"ref-methods--glomocheckoutref-","depth":4},{"value":"CheckoutStatus","id":"checkoutstatus","depth":4},{"value":"Type Definitions","id":"type-definitions","depth":3},{"value":"GlomoCheckoutPayload","id":"glomocheckoutpayload","depth":4},{"value":"ASYNC_PAYMENT_EVENTS","id":"async_payment_events","depth":4},{"value":"GlomoUserJourneyCompletedPayload","id":"glomouserjourneycompletedpayload","depth":4},{"value":"SdkError","id":"sdkerror","depth":4},{"value":"Asynchronous Payment Flows","id":"asynchronous-payment-flows","depth":2},{"value":"Camera Permissions","id":"camera-permissions","depth":2},{"value":"Android","id":"android","depth":3},{"value":"iOS","id":"ios","depth":3},{"value":"Behavior","id":"behavior","depth":3},{"value":"Platform Behavior","id":"platform-behavior","depth":2},{"value":"Device Security Compliance","id":"device-security-compliance","depth":2},{"value":"Mock Mode","id":"mock-mode","depth":2},{"value":"Connection Handling","id":"connection-handling","depth":2},{"value":"Input Validation","id":"input-validation","depth":2},{"value":"useGlomoCheckout Hook (Deprecated)","id":"useglomocheckout-hook-deprecated","depth":2},{"value":"Troubleshooting","id":"troubleshooting","depth":2},{"value":"start() returns false","id":"start-returns-false","depth":3},{"value":"Checkout opens but shows a blank screen","id":"checkout-opens-but-shows-a-blank-screen","depth":3},{"value":"Camera permission denied","id":"camera-permission-denied","depth":3},{"value":"onUserJourneyCompleted not firing","id":"onuserjourneycompleted-not-firing","depth":3},{"value":"Exports","id":"exports","depth":2},{"value":"Security","id":"security","depth":2},{"value":"Related","id":"related","depth":2}],"frontmatter":{"title":"React Native SDK v4","seo":{"title":"GlomoPay React Native SDK v4"}},"lastModified":"2026-09-22T05:15:29.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/platform/sdk/react-native-sdk/v4","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}