Skip to main content
Back to plugins
@capgo/capacitor-pay
Tutorial
by github.com/Cap-go

Pay

Accept payments with Apple Pay and Google Pay for seamless checkout experience

Guide

Tutorial on Pay

Using @capgo/capacitor-pay

Capacitor plugin to trigger native payment for iOS(Apple pay) and Android(Google Pay).

Install

bun add @capgo/capacitor-pay
bunx cap sync

What This Plugin Exposes

  • isPayAvailable - Checks whether native pay is available on the current platform. On iOS this evaluates Apple Pay, on Android it evaluates Google Pay.
  • requestPayment - Presents the native pay sheet for the current platform. Provide the Apple Pay configuration on iOS and the Google Pay configuration on Android.

Example Usage

isPayAvailable

Checks whether native pay is available on the current platform. On iOS this evaluates Apple Pay, on Android it evaluates Google Pay.

import { Pay } from '@capgo/capacitor-pay';

await Pay.isPayAvailable();

requestPayment

Presents the native pay sheet for the current platform. Provide the Apple Pay configuration on iOS and the Google Pay configuration on Android.

import { Pay } from '@capgo/capacitor-pay';

await Pay.requestPayment({} as PayPaymentOptions);

Full Reference