Skip to content

docs: Add comprehensive integration guide to README#27

Draft
Copilot wants to merge 2 commits into
version-0.74from
copilot/create-integration-docs-for-hyperswitch
Draft

docs: Add comprehensive integration guide to README#27
Copilot wants to merge 2 commits into
version-0.74from
copilot/create-integration-docs-for-hyperswitch

Conversation

Copilot AI commented Mar 4, 2026

Copy link
Copy Markdown

The README lacked coverage of server-side setup, full customization options, the PaymentWidget component, and environment requirements — leaving integrators without a complete reference.

Changes

Requirements

  • Runtime requirements table (Node.js ≥18, RN ≥0.71, iOS ≥13, Android API ≥21)
  • Peer dependencies with purpose descriptions (react-native-svg, react-native-inappbrowser-reborn, react-native-webview)
  • Hyperswitch account prerequisites (publishable vs. secret key usage)

Server-side: Creating a Payment Intent

  • API endpoint, headers, and request body reference (sandbox + production URLs)
  • Node.js/Express and Python/Flask server examples
  • Clarifies client_secretclientSecret camelCase transformation

Customizations

  • Full appearance API: theme (Default/Light/Dark/Minimal/FlatMinimal), layout (tabs/accordion/spacedAccordion), light/dark color overrides (all 13 color properties), shapes, primary button, font scaling, Google Pay/Apple Pay button config, locale
  • Complete end-to-end customization example

Present Sheet

  • presentPaymentSheet() usage with full result type reference
  • paymentResult.status values ("succeeded" / "cancelled" / "Failed")

Payment Widget

  • PaymentWidget props reference and onPaymentResult callback fields
  • Contrasts widget (options.clientSecret + callback) vs. sheet (initPaymentSession + promise) patterns
<PaymentWidget
  widgetId="checkout-widget"
  widgetType="PAYMENT_SHEET"
  options={{ clientSecret, appearance: { theme: 'Light' } }}
  onPaymentResult={(result) => {
    if (result.errorMessage) {
      setStatus(`Payment failed: ${result.errorMessage}`);
    } else {
      setStatus(result.status); // "succeeded" | "cancelled" | "Failed"
    }
  }}
  style={{ width: '100%', height: 600 }}
/>

🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

Co-authored-by: manideepk90 <52228935+manideepk90@users.noreply.github.com>
Copilot AI changed the title [WIP] Create integration documentation for react-native-hyperswitch docs: Add comprehensive integration guide to README Mar 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants