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
- ○ creating
- ○ approving
- ○ approved
- ○ completing
- ○ completed