Safle
  • SafleID
    • About SafleID
      • Core Technical Components (1/3)
      • Core Technical Concepts (2/3)
      • Core Technical Concepts (3/3)
    • What SafleID does?
    • For Chains
      • Technical Breakdown (1/2)
      • Technical Breakdown (2/2)
    • For dApps
    • For Wallet Providers (Exchanges and independent wallets)
      • Why Integrate SafleID (1/2)
      • Why Integrate SafleID (2/2)
    • SafleID's Technology
      • Data Flow and Interactions
      • Resolving Functionalities (RegistrarMain Contract)
      • Auction Functionalities (Auction Contract)
    • Conclusion
    • Terminology
    • Technical Documentation
  • Safle Wallet
    • Onboarding
    • Buy Crypto with Fiat enabled via Transak
    • Safle Swaps
    • Transaction processing on multiple Chains
    • Annexure: Encryption Sequence
  • Safle Vault
    • Features
    • Blockchains Supported
    • Installation & Initialisation
    • Encryption/Decryption Module
    • Controllers
Powered by GitBook
On this page
  1. Safle Wallet

Buy Crypto with Fiat enabled via Transak

PreviousOnboardingNextSafle Swaps

Last updated 10 months ago

Safle users can buy crypto using fiat with over 70+ fiat currencies supported inside the safle app. This eliminates the need to buy crypto from an exchange and transfer to a wallet.

Safle leverages widget offering to enable seamless on-ramp inside the application.

Sample usage

import {
  TransakWebView, Environments, Events, TransakConfig, EventTypes, Order,
} from '@transak/react-native-sdk';

function TransakWebViewIntegration() {
  const transakConfig: TransakConfig = {
    apiKey: '<your-api-key>', // Required
    environment: Environments.STAGING/Environments.PRODUCTION, // Required
    partnerOrderId: '<unique-order-id-generated-by-your-system>', // Required to receive order events
    // .....
    // For the full list of query params refer Props section below
  };
  const onTransakEventHandler = (event: EventTypes, data: Order) => {
    switch(event) {
      case Events.ORDER_CREATED:
        console.log(event, data);
        break;

      case Events.ORDER_PROCESSING:
        console.log(event, data);
        break;

      case Events.ORDER_COMPLETED:
        console.log(event, data);
        break;

      default:
        console.log(event, data);
    }
  };

  return (
    <TransakWebView
      transakConfig={transakConfig}
      onTransakEvent={onTransakEventHandler}
      // .....
      // For the full list of react-native-webview props refer Props section below
    />
  );
}
Transak’s