{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-platform/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"Glomo React Native SDK v6","siteUrl":"https://docs.glomo.one","llmstxt":{"title":"Glomo 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 has one section per integration\n  (what you're building), each with the API calls in order and the guide that builds it, plus\n  how to get 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: 81 paths, 106 operations, 88 schemas - the same\n  endpoints the API reference pages render. Fetch that instead of\n  reading the 129 pages under /api-reference/.\n- Every page below, in full, is one document at /llms-full.txt. Fetch that\n  instead of the pages one by one. It leaves out the API reference;\n  /openapi.yaml is that.\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, the MCP server for AI\n  agents, and the client SDKs.\n"},"sections":[{"title":"Get started","description":"The front door. The ordered API calls for each integration and the guide 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. Includes the flow that sends a payout over the API.","includeFiles":["**/payout/**"]},{"title":"Payment accounts","description":"Holding money for your own customers in Glomo payment accounts that you own: opening an account with the customer, adding funds with a card, balances and the statement, beneficiaries, payout quotes and payouts. Includes the flow that runs an account end to end.","includeFiles":["**/payment-accounts/**"]},{"title":"Multi-currency accounts","description":"Holding money: balances, balance conversion, adding balance, and withdrawing balance.","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":"Nivo (Capital markets)","description":"Nivo, Glomo's capital markets suite (Nivo for AMCs, Nivo for Distributors, and overseas investing for brokers and wealth platforms). Mutual fund investments run as payment sessions: the fund, distributor, scheme, plan, ARN and folio roles; the distributor's relationship with a fund and what it fixes; and the flow that opens a session as a distributor.","includeFiles":["**/capital-markets/**"]},{"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 and customizing the fields and column order of a report. Dashboard only - there is no reports API.","includeFiles":["**/reports/**"],"excludeFiles":["**/payin/**"]},{"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":"Settlement holidays","description":"The settlement holiday calendar for 2026 - the Indian and US bank and FX holidays on which payin, payout and settlement to the merchant's bank account may be delayed.","includeFiles":["**/settlement-holidays/**"]},{"title":"API reference","description":"Endpoint reference generated from the Glomo 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, connecting an AI agent to the Glomo MCP server, 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":"glomo-react-native-sdk-v6","__idx":0},"children":["Glomo React Native SDK v6"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Official React Native SDK for integrating Glomo payment checkout flows into your mobile applications."]},{"$$mdtype":"Tag","name":"blockquote","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Current version: ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["v6.0.0"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Upgrading from v5? Read the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/platform/sdk/react-native-sdk/migration#v52-to-v60"},"children":["Migration Guide"]}," first."]}," One behaviour changes and one exported type widens: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onPaymentSuccess"]}," now fires only for a success your backend can verify, and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["\"paymentVerification\""]}," joins the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SdkError[\"field\"]"]}," union. Only integrations that take bank-transfer payment links through the SDK see the behaviour change - see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#unverifiable-payment-successes"},"children":["Unverifiable payment successes"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["v6.0.0 also adds two optional props, ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#checkout-progress-events"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onCheckoutStageChanged"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onCheckoutClosed"]}]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Upgrading from v4? Read the whole ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/platform/sdk/react-native-sdk/migration"},"children":["Migration Guide"]},"."]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["jail-monkey"]}," is a required peer dependency as of v5 and the device compliance gate fails closed, so an upgrade that skips it takes live checkouts off the air. Mock and test keys are never blocked, so a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["test_"]}," key QA pass will not catch it."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["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 Glomo dashboard"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["An order ID created via the Glomo 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"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["^2.6.0"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["react-native-blob-util (optional)"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["^0.25.0"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["@react-native-documents/picker (optional)"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[">= 10.1.3"]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["jail-monkey"]}," was optional in v4 and is required in v5. The two optional packages enable ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#document-downloads"},"children":["document downloads"]},"; leaving them out is supported."]},{"$$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 jail-monkey@^2.6.0\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 jail-monkey@^2.6.0\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"required-device-security-compliance","__idx":6},"children":["Required: Device Security Compliance"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["jail-monkey"]}," is a ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["required"]}," peer dependency as of v5."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Without it, live checkouts are blocked."]}," The SDK cannot tell a clean device from a compromised one, and on a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["live_"]}," key it refuses to start rather than assume the device is safe: ",{"$$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":"p","attributes":{},"children":["Installing is not enough - ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["jail-monkey"]}," ships native code, so the app must be rebuilt. An installed but unlinked module is treated exactly as if the package were absent."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Test and mock keys are never blocked, so QA on a rooted handset or an emulator still works."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Pin the 2.x line."]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["jail-monkey@latest"]}," is 3.0.0, and on an app that has not enabled the New Architecture its native module does not compile at all: it passes a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ReactApplicationContext"]}," to a no-argument constructor and reads an undeclared ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["rootedCheck"]},", so the build stops at ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":[":jail-monkey:compileReleaseJavaWithJavac"]}," before any Glomo code is reached. No 3.x patch exists. The SDK's peer range has always been ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["^2.6.0"]}," and has not changed; what changed in v5.1.0 is that the install commands above pin it rather than resolving ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["latest"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"required-on-android-uimode-in-androidconfigchanges","__idx":7},"children":["Required on Android: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["uiMode"]}," in ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["android:configChanges"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Declare ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["uiMode"]}," on the activity that hosts the checkout, in ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["android/app/src/main/AndroidManifest.xml"]},", alongside the values you should already be declaring:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"xml","header":{"controls":{"copy":{}}},"source":"<activity\n    android:name=\".MainActivity\"\n    android:configChanges=\"uiMode|keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize|fontScale|locale|layoutDirection|density\"\n    ... />\n","lang":"xml"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["An OS theme change is an Android configuration change. Without ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["uiMode"]}," declared, Android destroys and recreates your activity when the user switches between light and dark - which destroys the checkout along with it. ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["A user toggling dark mode mid-payment loses that payment."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This is yours to configure and the SDK cannot do it for you: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["@glomopay/react-native-sdk"]}," ships no native Android code, so it cannot read or amend your activity's configuration, and it cannot detect that the declaration is missing in order to warn you. It applies whether or not you use ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["appColorScheme"]},", and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["react-native-webview"]}," documents the same hazard for its own props."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This is not new in v5.1.0, but it matters more now that users have a reason to toggle mid-payment."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"optional-document-downloads","__idx":8},"children":["Optional: Document Downloads"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Some checkout flows offer a document - an agreement PDF, for example - for the customer to save. A web page cannot write a file to the device from inside a WebView, so the SDK does it, but only if both of these are installed:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"npm install react-native-blob-util @react-native-documents/picker\ncd ios && pod install\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Leaving them out is a supported choice: the SDK does not advertise the capability, the checkout page keeps its own download behaviour, and nothing breaks."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Five things worth knowing before you install them:"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Installing is not enabling."]}," Both ship native code, so the app must be rebuilt. Until then the SDK treats them exactly as if they were absent."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Reset the Metro cache"]}," after installing (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["npx react-native start --reset-cache"]},"). A stale bundle resolves the old module graph and the capability stays off."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Expo needs a development build."]}," Neither package works in Expo Go. ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["react-native-blob-util"]}," ships a config plugin; ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["@react-native-documents/picker"]}," does not, so add it to your config plugins list yourself if your setup needs one."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["@react-native-documents/picker"]}," 11 and above requires React Native >= 0.79."]}," On older React Native, pin ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["10.1.x"]}," - the API this SDK uses is identical."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Degradation is silent by design"]},", which is why it is noisy in development: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["start()"]}," logs an ungated warning naming the missing package, and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onSdkError"]}," fires once per mount with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["field: \"file.save\""]},". See ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#document-downloads"},"children":["Document Downloads"]}," for what that means for your error handler."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"quick-start","__idx":9},"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 GlomoTerminationPayload,\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          // As of v6 a success always carries both; the type still marks them optional\n          // because a failure payload may not.\n          if (payload.paymentId && payload.signature) {\n            confirmOnOurBackend(payload.paymentId, payload.signature);\n          }\n        }}\n        onPaymentFailure={(payload: GlomoCheckoutPayload) => {\n          console.log(\"Payment failed:\", payload.orderId);\n        }}\n        onPaymentTerminate={(payload: GlomoTerminationPayload) => {\n          console.log(\"Checkout ended without a payment outcome:\", payload.source);\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.orderId);\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        onUserRefusedDevicePermissions={() => {\n          console.log(\"User refused a device permission the bank's page asked for\");\n        }}\n        onSdkError={(errors: SdkError[]) => {\n          // field: \"file.save\" is not a misconfiguration - see Document Downloads\n          const blocking = errors.filter((e) => e.field !== \"file.save\");\n          blocking.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":10},"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.orderId);\n  }}\n  onPaymentFailure={(payload) => {\n    console.log(\"Subscription payment failed:\", payload.orderId);\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":11},"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":["Device permissions"]}," - built-in camera handling for bank authentication, on every checkout flow. ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Now also on LRS"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Document downloads"]}," - saves a document the page offers to the customer's device, on every checkout flow, behind two optional peer dependencies. ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["New in v5"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Dark mode"]}," - ask the checkout page for a light or dark scheme, or let it follow your app's own appearance. ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["New in v5.1.0"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Origin policy"]}," - payment results and document saves are accepted only from Glomo checkout pages, never from a bank or 3-D Secure page. ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["New in v5.2.0"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Verified successes only"]}," - ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onPaymentSuccess"]}," fires only for a payment carrying a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["paymentId"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["signature"]}," your backend can verify. ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["New in v6.0.0"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Checkout progress events"]}," - where the customer reached in an LRS checkout, and why it closed. ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["New in v6.0.0"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Device security"]}," - required ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["jail-monkey"]}," integration for rooted/jailbroken device detection, failing closed on live keys"]},{"$$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":12},"children":["API Reference"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"glomocheckout-component","__idx":13},"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":14},"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 Glomo 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 Glomo 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 a payment succeeds ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["and"]}," carries a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["paymentId"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["signature"]},". A success without them no longer reaches this prop - see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#unverifiable-payment-successes"},"children":["Unverifiable payment successes"]},". ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Changed in v6.0.0"]}]}]},{"$$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":["(payload: GlomoTerminationPayload) => void"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Called when the checkout ends without a payment outcome. ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["payload.source"]}," names how. An existing ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["() => void"]}," handler stays assignable. ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Changed in v5"]}]}]},{"$$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, device compliance failures, and a missing download capability. Filter on ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["field"]},", not ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["type"]}," - see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#document-downloads"},"children":["Document Downloads"]}]}]},{"$$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) - not a confirmed payment. Check ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["payload.journeyType"]}," to determine the flow. Accepted on ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GlomoCheckout"]}," but silently ignored on LRS orders, which never produce an asynchronous journey."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onUserRefusedDevicePermissions"]}]},{"$$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 the user denies a device permission the bank's page asked for - camera today. Android only; see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#device-permissions"},"children":["Device Permissions"]},". ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Renamed in v5"]}," from ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onUserRefusedCameraPermissions"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["appColorScheme"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GlomoColorScheme"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The colour scheme to request from the checkout page: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["\"auto\""]}," (default), ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["\"light\""]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["\"dark\""]},". A request, not an instruction - see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#dark-mode"},"children":["Dark mode"]},". ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["New in v5.1.0"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onCheckoutStageChanged"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["(event: GlomoCheckoutStageChangedEvent) => void"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Called when the customer reaches a new checkout stage, or a new step within one. LRS only - see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#checkout-progress-events"},"children":["Checkout progress events"]},". ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["New in v6.0.0"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onCheckoutClosed"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["(event: GlomoCheckoutClosedEvent) => void"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Called at most once when the checkout closes, with the last stage it reached and why - see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#checkout-progress-events"},"children":["Checkout progress events"]},". ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["New in v6.0.0"]}]}]}]}]}]},{"$$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":15},"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":16},"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":17},"children":["Type Definitions"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"glomocheckoutpayload","__idx":18},"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":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["paymentId"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["signature"]}," are optional on the type, because a failure payload can still arrive without them. As of v6.0.0 a payload passed to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onPaymentSuccess"]}," always carries both - see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#unverifiable-payment-successes"},"children":["Unverifiable payment successes"]}," - so the narrowing a success handler needs is a formality rather than a real branch. A payload passed to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onPaymentFailure"]}," is unchanged and may have neither."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"async_payment_events","__idx":19},"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":20},"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; // Always undefined: the checkout page does not send it\n}\n","lang":"ts"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"termination_sources","__idx":21},"children":["TERMINATION_SOURCES"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["New in v5."]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"ts","header":{"controls":{"copy":{}}},"source":"enum TERMINATION_SOURCES {\n  CHECKOUT_CLOSED = \"checkout_closed\",        // the page's own close control\n  DEVICE_BACK_BUTTON = \"device_back_button\",  // Android hardware back or back gesture\n  MODAL_DISMISS = \"modal_dismiss\",            // iOS swipe-down on the modal\n}\n","lang":"ts"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The back chevron over a bank flow is deliberately ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["not"]}," in this list. It returns the user to the checkout with the session intact and the ability to pay, so reporting it as a termination would be false - and for a merchant who cancels the order on terminate, it would cancel live orders every time a customer backed out of one bank to try another."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"glomoterminationpayload","__idx":22},"children":["GlomoTerminationPayload"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["New in v5."]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"ts","header":{"controls":{"copy":{}}},"source":"interface GlomoTerminationPayload {\n  source: TERMINATION_SOURCES;\n}\n","lang":"ts"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["An object rather than a bare enum, so a later field can be added without changing the signature or redefining what an existing value means."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"glomocolorscheme","__idx":23},"children":["GlomoColorScheme"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["New in v5.1.0."]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"ts","header":{"controls":{"copy":{}}},"source":"type GlomoColorScheme = \"auto\" | \"light\" | \"dark\";\n","lang":"ts"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["See ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#dark-mode"},"children":["Dark mode"]}," for what ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["\"auto\""]}," resolves to on React Native, which is not what it resolves to on the other Glomo SDKs."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"sdkerror","__idx":24},"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?:\n    | \"publicKey\"\n    | \"orderId\"\n    | \"subscriptionId\"\n    | \"baseCheckoutUrl\"\n    | \"generatedCheckoutUrl\"\n    | \"file.save\"\n    | \"paymentVerification\";\n}\n","lang":"ts"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["field: \"file.save\""]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["field: \"paymentVerification\""]}," are the two values that do not mean the integration is misconfigured. See ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#document-downloads"},"children":["Document Downloads"]}," and ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#unverifiable-payment-successes"},"children":["Unverifiable payment successes"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["\"paymentVerification\""]}," is ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["new in v6.0.0"]}," and widens the exported ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SdkError[\"field\"]"]}," union. Nothing changes at runtime for the values that were already there, but an exhaustive ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["switch"]}," over ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["field"]}," with a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["never"]}," check stops compiling until it handles the new case. Match on ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["field"]},", not on the message text, to tell a dropped unverifiable success apart from a configuration fault such as a bad public key."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"unverifiable-payment-successes","__idx":25},"children":["Unverifiable payment successes"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Changed in v6.0.0."]}," A ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["payment.success"]}," without a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["paymentId"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["signature"]}," is no longer passed to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onPaymentSuccess"]},". There is nothing in it for your backend to verify, so the SDK does not report it as a success. This matches the Android and iOS SDKs."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Who is affected:"]}," integrations that take bank-transfer payment links through the SDK. That is the one case where the checkout sent such a success - a bank-transfer payment link reported paid while checkout was still open. No other payment flow is affected, and failure callbacks are unchanged."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["What happens instead:"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onSdkError"]}," fires with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["type: \"validation_error\""]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["field: \"paymentVerification\""]},". Match on the field, not on the message text."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The checkout stays open on its own success screen."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["When the customer closes it, ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onPaymentTerminate"]}," fires with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["source: \"checkout_closed\""]}," - ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["even though the order may be paid"]},"."]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"tsx","header":{"controls":{"copy":{}}},"source":"onSdkError={(errors) => {\n  for (const error of errors) {\n    if (error.field === \"paymentVerification\") {\n      // The order may be paid. Ask your backend, do not offer a retry.\n      void refreshOrderStatusFromBackend(orderId);\n      continue;\n    }\n    reportConfigurationProblem(error);\n  }\n}}\n","lang":"tsx"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Confirm the order's status from your backend or webhooks, not from the SDK callback. Do not treat that ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onPaymentTerminate"]}," as an abandoned payment, and do not offer a retry, until you have checked the order status."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["There is no switch to keep the old behaviour: reporting an unverifiable success is the bug this release fixes. To roll back, pin v5.2.0."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"checkout-progress-events","__idx":26},"children":["Checkout progress events"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["New in v6.0.0."]}," Two optional props on ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GlomoCheckout"]}," report how far a customer got through an LRS checkout and why the checkout closed. They are the React Native equivalent of the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["checkout.stage_changed"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["checkout.closed"]}," events on the web - see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/platform/sdk/checkout-events"},"children":["Checkout events"]}," for the contract they relay: every stage, step, close reason and field, and what each one means."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["They are ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["enabled per merchant and off by default"]},". Until they are switched on for your business, the checkout behaves exactly as it does today and neither prop fires. Talk to your Glomo contact to turn them on; the same switch adds ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["progress"]}," to the payment webhook, so you do not need to ask twice."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Both are optional, so existing integrations need no change."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"tsx","header":{"controls":{"copy":{}}},"source":"<GlomoCheckout\n  ref={checkoutRef}\n  // ... the required props\n  onCheckoutStageChanged={(event) => {\n    analytics.track(\"checkout_stage\", {\n      orderId: event.resource.id,\n      journeyId: event.journeyId,\n      stage: event.stage,\n      step: event.step,\n      provider: event.provider,\n    });\n  }}\n  onCheckoutClosed={(event) => {\n    if (event.reason === \"completed\") return;\n    analytics.track(\"checkout_abandoned\", {\n      lastStage: event.lastStage,\n      reason: event.reason,\n    });\n  }}\n/>\n","lang":"tsx"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"glomocheckoutstagechangedevent","__idx":27},"children":["GlomoCheckoutStageChangedEvent"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Fires each time the customer reaches a new stage, or a new step within one. Stages arrive in order and each stage and step pair fires at most once per checkout, so appending them builds a drop-off funnel without deduplication."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"ts","header":{"controls":{"copy":{}}},"source":"interface GlomoCheckoutStageChangedEvent {\n  v: number;\n  resource: GlomoCheckoutResource;\n  journeyId: string;\n  at: string;\n  flow: GlomoCheckoutFlow;\n  method?: GlomoCheckoutMethod;\n  paymentId?: string;\n  stage: GlomoCheckoutStage;\n  step?: GlomoCheckoutStep;\n  provider?: GlomoCheckoutProvider;\n  journeyType?: GlomoCheckoutJourneyType;\n  errorCode?: string;\n  segment?: GlomoCheckoutSegment;\n}\n","lang":"ts"},"children":[]},{"$$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":"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":["v"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Payload version. ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["1"]}," today - see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/platform/sdk/checkout-events#versioning-and-compatibility"},"children":["Versioning"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["resource"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["What the checkout was opened for. ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["type"]}," is ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["\"order\""]}," on LRS, ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["id"]}," is the order ID"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["journeyId"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Identifies one checkout open. Every event from the same open carries the same value"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["at"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["ISO 8601 UTC timestamp from the customer's device clock"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["flow"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["What the checkout is for. ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["\"payment\""]}," today"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["method"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The payment method. Known: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["\"lrs\""]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["paymentId"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The payment attempt. Present from the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["attempt_created"]}," stage onward"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["stage"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The stage reached - see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/platform/sdk/checkout-events#payment-stages"},"children":["Payment stages"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["step"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The screen within the stage - see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/platform/sdk/checkout-events#steps"},"children":["Steps"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["provider"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The bank the customer chose. Present from ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["method_selected"]}," onward"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["journeyType"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["\"redirect\""]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["\"native\""]},". Present from ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["method_selected"]}," onward"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["errorCode"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Only on ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["stage: \"failed\""]},", and not always present there"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["segment"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Reserved. Not sent today"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"glomocheckoutclosedevent","__idx":28},"children":["GlomoCheckoutClosedEvent"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Delivered at most once per checkout. No progress events follow it - no stage changes, and no second close."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"ts","header":{"controls":{"copy":{}}},"source":"interface GlomoCheckoutClosedEvent {\n  v: number;\n  resource: GlomoCheckoutResource;\n  journeyId: string;\n  at: string;\n  flow: GlomoCheckoutFlow;\n  method?: GlomoCheckoutMethod;\n  paymentId?: string;\n  lastStage?: GlomoCheckoutStage;\n  lastStep?: GlomoCheckoutStep;\n  reason: GlomoCheckoutCloseReason;\n}\n","lang":"ts"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["lastStage"]}," is the last stage the page reported, and is absent when the checkout closed before any stage arrived. ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["reason"]}," is one of ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["\"user_dismissed\""]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["\"user_cancelled\""]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["\"completed\""]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["\"error\""]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["\"confirmation_timeout\""]}," - see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/platform/sdk/checkout-events#close-reasons"},"children":["Close reasons"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"open-string-types","__idx":29},"children":["Open string types"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GlomoCheckoutStage"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GlomoCheckoutStep"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GlomoCheckoutMethod"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GlomoCheckoutProvider"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GlomoCheckoutCloseReason"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GlomoCheckoutJourneyType"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GlomoCheckoutResourceType"]}," are ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["open string unions"]},": they list the values known today while still accepting any other ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["string"]},". New values can appear within ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["v: 1"]},", and the SDK forwards them rather than filtering them out."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["That means a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["switch"]}," over one of them gets no exhaustiveness check and always needs a default branch. The known values are also exported as runtime arrays, for validating or labelling a value you received:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"ts","header":{"controls":{"copy":{}}},"source":"import {\n  CHECKOUT_EVENT_CONTRACT_VERSION,\n  PAYMENT_STAGES,\n  KYC_STAGES,\n  CHECKOUT_CLOSE_REASONS,\n  CHECKOUT_JOURNEY_TYPES,\n  CHECKOUT_RESOURCE_TYPES,\n  KNOWN_PAYMENT_STEPS_BY_STAGE,\n  KNOWN_CHECKOUT_METHODS,\n  KNOWN_LRS_PROVIDERS,\n} from \"@glomopay/react-native-sdk\";\n","lang":"ts"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["KYC_STAGES"]}," is reserved - ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["flow: \"kyc\""]}," is defined in the contract but not sent today."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"which-closes-the-sdk-reports-itself","__idx":30},"children":["Which closes the SDK reports itself"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Several ways out of a checkout never reach the page, so the SDK writes the close event for them: a native dismissal (Android back, iOS swipe-down), a connection error, a refused camera permission, and the payment outcome itself. The reason it writes is ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["completed"]}," after a successful payment, ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["error"]}," after a failed one or a connection error, and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["user_dismissed"]}," otherwise."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["A close is ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["not guaranteed"]},": a checkout closed before any stage arrived, or unmounted mid-flow, reports none."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["On a declined payment, ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["lastStage"]}," is the stage before ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["failed"]},", because the page reports the failure ahead of that stage and the checkout closes on the failure."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"what-it-is-not","__idx":31},"children":["What it is not"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onCheckoutClosed"]}," is not a payment outcome. After a dismissal the payment can still complete on the server, so read the result from the payment status API or your webhook, never from ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["reason"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["It does not replace ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onPaymentTerminate"]},", which is unchanged. On the close path ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onPaymentTerminate"]}," comes first where it fires at all - it does not on a payment outcome, a connection error or a refused permission - but it is not confined to that path: a late ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onPaymentTerminate"]}," can still land in the window while the checkout is closing."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"only-v1-payloads","__idx":32},"children":["Only v1 payloads"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The SDK delivers ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["v: 1"]}," payloads only. An empty or differently versioned payload reports nothing, which is also what you see while the events are switched off for your account."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"asynchronous-payment-flows","__idx":33},"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\n       * Note: fields may be absent if the checkout page omits them.\n       */\n      console.log(\"Transfer submitted for order:\", payload.orderId);\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":"document-downloads","__idx":34},"children":["Document Downloads"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["New in v5."]}," Available on every checkout flow."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Some checkout flows offer a document for the customer to save. A page cannot write a file to the device from inside a WebView, so the SDK does it - when the two optional peer dependencies in ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#optional-document-downloads"},"children":["Optional: Document Downloads"]}," are installed and the app has been rebuilt."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The capability is advertised to the checkout page only when both packages load successfully. When it is not advertised, the page keeps its own download behaviour and nothing breaks."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"what-this-changes-about-onsdkerror","__idx":35},"children":["What this changes about ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onSdkError"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Check this if your ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onSdkError"]}," handler aborts the checkout or shows a blocking error."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["In v4, ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onSdkError"]}," only ever meant the integration was misconfigured - a malformed ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["publicKey"]},", a missing ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["orderId"]}," - so treating any error on that callback as fatal was a reasonable reading. In v5 it also fires once per mount, with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["type: \"validation_error\""]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["field: \"file.save\""]},", when the two document-download packages are not installed. Nothing is wrong in that case: the checkout works and the page keeps its own download path."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Filter on ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["field"]}," rather than on ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["type"]},":"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"tsx","header":{"controls":{"copy":{}}},"source":"onSdkError={(errors) => {\n  const blocking = errors.filter((e) => e.field !== \"file.save\");\n  if (blocking.length > 0) {\n    // your existing handling\n  }\n}}\n","lang":"tsx"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The report is deliberately not tied to whether a page actually requests a download: whether this build can write a file to the device is a property of the build, so you learn it once at integration rather than the first time a customer taps download in production."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["A save that fails also reports through ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onSdkError"]}," with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["field: \"file.save\""]},", and never affects the payment session."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"device-permissions","__idx":36},"children":["Device Permissions"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Some bank pages require camera access for authentication. The SDK handles permission prompts automatically on every checkout flow, but you must declare the permissions in your native project config."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["File upload permissions are requested by ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["react-native-webview"]}," itself and never reach the SDK, so they do not surface through ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onUserRefusedDevicePermissions"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"android","__idx":37},"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":38},"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":39},"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":["onUserRefusedDevicePermissions"]}," 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 and never reports it back, so ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onUserRefusedDevicePermissions"]}," does not fire on iOS."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["LRS checkouts had no permission handling on either platform before v5, so a bank page requesting camera access got no prompt on Android and no grant on iOS. LRS now behaves identically to the standard checkout, and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onUserRefusedDevicePermissions"]}," is forwarded to it."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"platform-behavior","__idx":40},"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"]}," with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["source: \"modal_dismiss\""]},"."]},{"$$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"]}," with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["source: \"device_back_button\""]},"."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"dark-mode","__idx":41},"children":["Dark mode"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["New in v5.1.0."]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["appColorScheme"]}," tells the Glomo checkout page which scheme to present:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"tsx","header":{"controls":{"copy":{}}},"source":"<GlomoCheckout\n  ref={checkoutRef}\n  publicKey={publicKey}\n  orderId={orderId}\n  appColorScheme=\"auto\" // \"auto\" | \"light\" | \"dark\"\n  // ...\n/>\n","lang":"tsx"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["It requests a scheme, it does not force one."]}," The page decides, against your merchant dashboard settings. Setting ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["\"dark\""]}," does not guarantee a dark checkout, and dark mode is enabled per account - until it is enabled for yours, checkout stays light whatever you pass. See ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/platform/sdk/dark-mode"},"children":["Dark mode across the SDKs"]}," for what that gating means."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["What ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["\"auto\""]}," resolves to here."]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Appearance.getColorScheme()"]},", which is your ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["app's effective appearance"]}," - not the device setting underneath it. If your app calls ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Appearance.setColorScheme()"]},", that value is what the SDK sees, because React Native overwrites the device value in place and exposes nothing that reports what it overwrote."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["That is why this is spelled ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["auto"]}," rather than ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["system"]},", and why it resolves differently here than on the native iOS and Android SDKs, where the device value ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["is"]}," reachable. Only ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["\"light\""]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["\"dark\""]}," mean the same thing on every Glomo SDK - see the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/platform/sdk/dark-mode#what-the-automatic-value-resolves-to"},"children":["cross-SDK table"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If your app has its own theme toggle that does not go through ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Appearance"]},", drive the prop yourself:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"tsx","header":{"controls":{"copy":{}}},"source":"appColorScheme={myAppIsDark ? \"dark\" : \"light\"}\n","lang":"tsx"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["When ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["\"auto\""]}," is read."]}," At ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["start()"]},", not when the component renders - a screen that mounts the checkout early and calls ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["start()"]}," on a button press picks up whatever the appearance is at the press. After that the page is kept in step by injection, including across its own reloads."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Changing it mid-checkout is supported."]}," Pass a new value and the SDK hands it to the live page without reloading, so a payment in flight survives the change. ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Do not remount the checkout to change the scheme"]}," - that reloads the WebView and loses the payment."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["On Android, this needs ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#required-on-android-uimode-in-androidconfigchanges"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["uiMode"]}," in ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["android:configChanges"]}]},"."]}," Without it, an OS theme toggle destroys the checkout regardless of this prop."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Android WebView algorithmic darkening is explicitly off as of v5.1.0 on every WebView the SDK renders, including bank and 3DS pages. Previously the platform could invert a page that handles its own colours. Nothing to configure."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"origin-policy","__idx":42},"children":["Origin Policy"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["New in v5.2.0."]}," The SDK now decides for itself which pages belong to Glomo, and refuses the privileged bridge messages from everything else. There is nothing to integrate - no prop, no configuration and no new dependency - and the callbacks your app receives from a normal payment are unchanged."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"payment-results-and-document-saves-are-accepted-only-from-glomo-checkout-pages","__idx":43},"children":["Payment results and document saves are accepted only from Glomo checkout pages"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The redirect overlay loads the bank and 3-D Secure pages at the top level, and the SDK's injected bridge is reachable from whatever document is on screen. A ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["payment.success"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["payment.failure"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["file.save"]}," posted from one of those pages is now dropped."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Bank-driven navigation is untouched. A bank page closing the overlay after a 3-D Secure challenge works exactly as before - ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["window.open"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["window.close"]}," and the page's own navigation arrive from bank origins by design, and gating them would strand the user on a finished bank page."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"the-overlay-no-longer-reports-payment-results-at-all","__idx":44},"children":["The overlay no longer reports payment results at all"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Every outcome now comes from the main checkout page, which polls for it. Previously a result posted inside the bank overlay could complete a checkout."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["If your app relied on a result posted by the bank page, it now comes from the checkout page's poll instead - slightly later, with the same payload."]}," The SDK still takes the overlay down as part of handling the result, so the user sees the same thing. Nothing changes in what your callbacks receive."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"what-a-refused-message-does","__idx":45},"children":["What a refused message does"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Nothing reaches your app. A refused message is dropped and recorded in the SDK's own diagnostics; no callback fires for it, and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onSdkError"]}," is deliberately not used - raising an error from an untrusted page would hand a bank page a way to end a checkout it can no longer speak for."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"which-origins-are-trusted","__idx":46},"children":["Which origins are trusted"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["https"]}," on ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["glomopay.com"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["glomo.one"]},", including subdomains, on the default port. A suffix rule rather than a fixed host list, so a shipped SDK keeps working if a checkout host moves or redirects between the two."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The checkout hosts the SDK itself navigates to, from its own resolved configuration. That is what covers the LRS education carousel, staging and local integrations, with no extra setup."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The injected ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["message"]}," relays also forward only same-document messages, so a third-party frame embedded in a Glomo page cannot have a payment event relayed on its behalf."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Nothing about signature verification changes. Confirm every payment on your server as before - the origin check narrows what can reach your callbacks, it does not replace verification."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"device-security-compliance","__idx":47},"children":["Device Security Compliance"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The SDK uses ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["jail-monkey"]}," to detect rooted (Android) or jailbroken (iOS) devices. As of v5 it is a required peer dependency and the gate ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["fails closed"]},": a device the SDK cannot verify is refused on a live key rather than assumed clean."]},{"$$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":"Device"},"children":["Device"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"test_ / mock_ key"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["test_"]}," / ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["mock_"]}," key"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"live_ key"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["live_"]}," key"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Clean"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["allowed"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["allowed"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Emulator / simulator"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["allowed"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["allowed"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Rooted / jailbroken"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["allowed"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["blocked"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Unverifiable (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["jail-monkey"]}," missing)"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["allowed"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["blocked"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["When blocked, ",{"$$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\""]},". The message distinguishes a compromised device from an unverifiable one."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Emulators are allowed on live keys, deliberately."]}," Android emulators ship AOSP test-keys and debuggable system properties, which trip two of the checks behind ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["isJailBroken()"]}," - so the aggregate verdict reports every stock emulator as rooted. The SDK computes its own verdict from ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["jail-monkey"]},"'s per-check breakdown and ignores those two, because merchants integration-test with live keys on emulators and an emulator is not the threat this gate exists for. Every strong root indicator (su binaries, Magisk, root-manager apps, remounted system paths) is still enforced."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The cost is custom-ROM detection on physical devices, the weakest signal in the set. On iOS, and on any build that exposes no breakdown, the SDK falls back to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["isJailBroken()"]}," unchanged."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"mock-mode","__idx":48},"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":"p","attributes":{},"children":["In v4 a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["mock_"]}," key passed validation and then ran against live. If you have been using a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["mock_"]}," key and compensating for it, stop - v5 runs it in mock mode."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"connection-handling","__idx":49},"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":50},"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":51},"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":52},"children":["Troubleshooting"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"start-returns-false","__idx":53},"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 or jailbroken, on a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["live_"]}," key"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Device security could not be verified on a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["live_"]}," key, because ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["jail-monkey"]}," is missing or its native module is not linked. Install it and rebuild the app; the console warning names this case."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"checkout-opens-but-shows-a-blank-screen","__idx":54},"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":"document-downloads-do-nothing","__idx":55},"children":["Document downloads do nothing"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The capability is only advertised when both ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["react-native-blob-util"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["@react-native-documents/picker"]}," load successfully, and the checkout page falls back to its own behaviour when it is absent. Check, in order:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Both packages installed, and the app rebuilt afterwards - installing alone is not enough"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Metro cache reset (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["npx react-native start --reset-cache"]},")"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Not running in Expo Go, which cannot load either package"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["On React Native < 0.79, ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["@react-native-documents/picker"]}," pinned to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["10.1.x"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["start()"]}," logs an ungated warning naming the package it could not load, and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onSdkError"]}," fires once per mount with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["field: \"file.save\""]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"camera-permission-denied","__idx":56},"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":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onUserRefusedDevicePermissions"]}," fires when the user denies camera permission to your app, on Android only"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"a-payment-result-arrives-later-than-it-used-to","__idx":57},"children":["A payment result arrives later than it used to"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Expected on v5.2.0. The bank redirect overlay no longer reports outcomes; the main checkout page polls for them, so the callback fires when that poll resolves rather than the moment a bank page posts a result. The payload is the same, and the SDK still closes the overlay when it handles the result. See ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#origin-policy"},"children":["Origin Policy"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"onpaymentsuccess-stopped-firing-for-a-bank-transfer-payment-link","__idx":58},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onPaymentSuccess"]}," stopped firing for a bank-transfer payment link"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Expected on v6.0.0. That success carried no ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["paymentId"]}," and no ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["signature"]},", so the SDK reports ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onSdkError"]}," with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["field: \"paymentVerification\""]}," instead and leaves the checkout open. Read the order status from your backend. See ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#unverifiable-payment-successes"},"children":["Unverifiable payment successes"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"an-exhaustive-switch-over-sdkerrorfield-stopped-compiling","__idx":59},"children":["An exhaustive ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["switch"]}," over ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SdkError[\"field\"]"]}," stopped compiling"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Expected on v6.0.0. ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["\"paymentVerification\""]}," is a new member of the union; add a case for it. See ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#sdkerror"},"children":["SdkError"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"oncheckoutstagechanged-and-oncheckoutclosed-never-fire","__idx":60},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onCheckoutStageChanged"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onCheckoutClosed"]}," never fire"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Checkout progress events are enabled per merchant and off by default, and they are LRS-only. Talk to your Glomo contact to turn them on. See ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#checkout-progress-events"},"children":["Checkout progress events"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"onuserjourneycompleted-not-firing","__idx":61},"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). It never fires on an LRS order."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"exports","__idx":62},"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, TERMINATION_SOURCES } from \"@glomopay/react-native-sdk\";\n\n// Checkout progress events - known values (new in v6.0.0)\nexport {\n  CHECKOUT_EVENT_CONTRACT_VERSION,\n  PAYMENT_STAGES,\n  KYC_STAGES,\n  CHECKOUT_CLOSE_REASONS,\n  CHECKOUT_JOURNEY_TYPES,\n  CHECKOUT_RESOURCE_TYPES,\n  KNOWN_PAYMENT_STEPS_BY_STAGE,\n  KNOWN_CHECKOUT_METHODS,\n  KNOWN_LRS_PROVIDERS,\n} from \"@glomopay/react-native-sdk\";\n\n// Types\nexport type {\n  GlomoCheckoutRef,\n  GlomoCheckoutProps,\n  GlomoCheckoutPayload,\n  CheckoutStatus,\n  GlomoUserJourneyCompletedPayload,\n  GlomoTerminationPayload,\n  GlomoColorScheme,\n  UseGlomoCheckoutReturn, // deprecated\n  SdkError,\n} from \"@glomopay/react-native-sdk\";\n\n// Checkout progress event types (new in v6.0.0)\nexport type {\n  GlomoCheckoutStageChangedEvent,\n  GlomoCheckoutClosedEvent,\n  GlomoCheckoutFlow,\n  GlomoCheckoutStage,\n  GlomoCheckoutStep,\n  GlomoCheckoutMethod,\n  GlomoCheckoutProvider,\n  GlomoCheckoutCloseReason,\n  GlomoCheckoutJourneyType,\n  GlomoCheckoutResource,\n  GlomoCheckoutResourceType,\n  GlomoCheckoutSegment,\n} from \"@glomopay/react-native-sdk\";\n","lang":"ts"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"security","__idx":63},"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 required via ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["jail-monkey"]}," (see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#device-security-compliance"},"children":["Device Security Compliance"]},")."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["As of v5.2.0, payment results and document saves are accepted only from Glomo checkout pages - a bank or 3-D Secure page in the redirect overlay can no longer report one. See ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#origin-policy"},"children":["Origin Policy"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["As of v6.0.0, a payment success that carries no ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["paymentId"]}," and no ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["signature"]}," is not reported as a success at all, because there is nothing in it for your backend to verify. See ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#unverifiable-payment-successes"},"children":["Unverifiable payment successes"]},"."]},{"$$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":64},"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 v6)"]}," - 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/checkout-events"},"children":["Checkout events"]}," - the stage, step and close-reason contract the progress props relay"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/platform/sdk/dark-mode"},"children":["Dark mode across the SDKs"]}," - what the automatic value resolves to on each Glomo SDK, and the per-account gating"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/platform/sdk/react-native-sdk/v5"},"children":["React Native SDK v5 (Archived)"]}," - previous version documentation"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/platform/sdk/react-native-sdk/v4"},"children":["React Native SDK v4 (Archived)"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/platform/sdk/react-native-sdk/v3"},"children":["React Native SDK v3 (Archived)"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/platform/sdk/react-native-sdk/v1"},"children":["React Native SDK v1 (Archived)"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/platform/sdk/flutter-sdk"},"children":["Flutter SDK"]}," - Glomo SDK for Flutter apps"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/platform/sdk/unified-sdk"},"children":["Unified SDK (Web)"]}," - Glomo 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":"Glomo React Native SDK v6","id":"glomo-react-native-sdk-v6","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":"Required: Device Security Compliance","id":"required-device-security-compliance","depth":3},{"value":"Required on Android: uiMode in android:configChanges","id":"required-on-android-uimode-in-androidconfigchanges","depth":3},{"value":"Optional: Document Downloads","id":"optional-document-downloads","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":"TERMINATION_SOURCES","id":"termination_sources","depth":4},{"value":"GlomoTerminationPayload","id":"glomoterminationpayload","depth":4},{"value":"GlomoColorScheme","id":"glomocolorscheme","depth":4},{"value":"SdkError","id":"sdkerror","depth":4},{"value":"Unverifiable payment successes","id":"unverifiable-payment-successes","depth":2},{"value":"Checkout progress events","id":"checkout-progress-events","depth":2},{"value":"GlomoCheckoutStageChangedEvent","id":"glomocheckoutstagechangedevent","depth":3},{"value":"GlomoCheckoutClosedEvent","id":"glomocheckoutclosedevent","depth":3},{"value":"Open string types","id":"open-string-types","depth":3},{"value":"Which closes the SDK reports itself","id":"which-closes-the-sdk-reports-itself","depth":3},{"value":"What it is not","id":"what-it-is-not","depth":3},{"value":"Only v1 payloads","id":"only-v1-payloads","depth":3},{"value":"Asynchronous Payment Flows","id":"asynchronous-payment-flows","depth":2},{"value":"Document Downloads","id":"document-downloads","depth":2},{"value":"What this changes about onSdkError","id":"what-this-changes-about-onsdkerror","depth":3},{"value":"Device Permissions","id":"device-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":"Dark mode","id":"dark-mode","depth":2},{"value":"Origin Policy","id":"origin-policy","depth":2},{"value":"Payment results and document saves are accepted only from Glomo checkout pages","id":"payment-results-and-document-saves-are-accepted-only-from-glomo-checkout-pages","depth":3},{"value":"The overlay no longer reports payment results at all","id":"the-overlay-no-longer-reports-payment-results-at-all","depth":3},{"value":"What a refused message does","id":"what-a-refused-message-does","depth":3},{"value":"Which origins are trusted","id":"which-origins-are-trusted","depth":3},{"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":"Document downloads do nothing","id":"document-downloads-do-nothing","depth":3},{"value":"Camera permission denied","id":"camera-permission-denied","depth":3},{"value":"A payment result arrives later than it used to","id":"a-payment-result-arrives-later-than-it-used-to","depth":3},{"value":"onPaymentSuccess stopped firing for a bank-transfer payment link","id":"onpaymentsuccess-stopped-firing-for-a-bank-transfer-payment-link","depth":3},{"value":"An exhaustive switch over SdkError[\"field\"] stopped compiling","id":"an-exhaustive-switch-over-sdkerrorfield-stopped-compiling","depth":3},{"value":"onCheckoutStageChanged and onCheckoutClosed never fire","id":"oncheckoutstagechanged-and-oncheckoutclosed-never-fire","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 v6","seo":{"title":"Glomo React Native SDK v6"}},"lastModified":"2026-11-27T11:25:07.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/platform/sdk/react-native-sdk/v6","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}