PayRail SDK

Install

Accept Pi in any Pi app. Sign-in, payment approval, blockchain completion and a signed receipt in one call.

npm i payrail

import { PayRail } from 'payrail';

const payrail = new PayRail({ sandbox: true });

await payrail.signIn();
const { order, txid, receipt } = await payrail.pay({
  amount: 0.1,
  memo: 'PayRail demo',
});

Try it live

This button runs the code above through the payrail package.

Pi
  1. ○ creating
  2. ○ approving
  3. ○ approved
  4. ○ completing
  5. ○ completed