🚀Quick Start
Start taking payments with our quick start API guide.
Get your API keys
Your API requests are authenticated using API keys. Any request that doesn't include an API key will return an error.
You can get your API key in your Dashboard at any time, here:
Install the library
The best way to interact with our API is to use one of our official libraries:
Good to know: You can also use our APIs in any server-side language. Just see our API Reference.
Create a Payment
Creating a payment requires a simple request, containing just API keys as authorisation and the payment parameters.
Create a new payment
POST
https://api.piecard.app/payment
Request Body
Test Mode: You can set sandbox mode to true to easily test you integration. Please see here for test mode usage.
Usage with NPM Package
From the POST /payment endpoint, you will receive a payment ID.
To initiate the payment, you must redirect the user to 'https://piecard.app/pay/YOUR_PAYMENT_ID'
Get a payment
Get a payment
GET
https://api.piecard.app/payment/:paymentId
Path Parameters
Usage with NPM Package
Webhooks
To be able to deliver your product safely, you must listen for a Payment Complete webhook from our servers.
To begin receive webhooks, you must first enter a valid URL to your server in the Pi eCard Gateway Dashboard.
When a payment is completed, our servers with sent an HTTP request to this specified URL, which will consist of the payment data and status, encoded with your secret key.
Usage with NPM Package
If success is true, then the payment was fulfilled and you should deliver the product. If the success is false, do not deliver the product.
Working example with Express.js
Last updated