PollarPollarDemo

Products

AuthenticationWalletTransactions

Integrations

KYCSoonRampNewSwapNewEarnNew

Wallet Adapters

Stellar Wallets KitPrivyNew

Adapters

Trustless Work

Built with Pollar

LumenWipeNew
OverviewImplementation

Ramp

Buy and sell crypto with local payment methods (SPEI, PIX, PSE, ACH) through anchors like Anclap. Pollar renders the entire quote-and-payment flow inside a modal.

Drop-in button that opens a prebuilt modal — the whole quote → payment → settle flow is rendered for you.

openRampModal() takes no arguments — country, currency and direction are picked inside the modal.

Hook & values used

All of these come from the usePollar() hook — the react layer built on top of getClient().

  • usePollar()hook

    params: No arguments. Call it at the top level of a component — it reads React context, so it must run during render.

    returns: PollarContextValue — the whole SDK surface: reactive state values, modal openers, and getClient() to drop down to core.

  • openRampModal()sync

    params: No arguments — country, currency and direction are picked inside the modal.

    returns: void — opens the prebuilt modal; there is nothing to await.

@pollar/react— hooks & components
import { usePollar } from '@pollar/react';

export function BuyCryptoButton() {
  const { openRampModal, isAuthenticated } = usePollar();

  // openRampModal renders the whole quote-and-payment flow on top
  // of client.getRampsQuote / createOnRamp / pollRampTransaction.
  return (
    <button
      onClick={openRampModal}
      disabled={!isAuthenticated}
    >
      Buy / sell crypto
    </button>
  );
}