payment-service-sdk
SDK for integrating UrbanPiper payment service into your application
Get Started
- Run
npm install
in your terminal - Then run
npm run build
Usage
- First initialize the SDK
import PgService from '@urbanpiper-engineering/payment-service-sdk';
PgService.init(params: PgService);
- Get the list of gateways associated for your account
const resp = await PgService.gateways();
- Initiate the payment with your gateway of choice e.g. Razorpay
import PgService, { RazorpayService } from '@urbanpiper-engineering/payment-service-sdk';
const resp = await PgService.initiatePayment();
const resp = await RazorpayService.openPG();
- Capture the payment
const resp = await RazorpayService.capturePayment();