A sample Express.js app demonstrating various Poynt APIs.
Note: Sellbot is preserved here as a reference for legacy Poynt Collect users. New integrations should use Unified Checkout.
The app exposes two flows:
Roundtrip flow that sends a customer/merchant from a partner cloud app into the Poynt processing signup, then receives them back with full access to merchant info and application status via API.
lib/poynt.js wrapper around the Poynt Node SDK
routes/link.js serves /link and /link/callback
views/link/index.pug kicks off the Poynt processing signup flow
views/link/callback.pug handles the post-signup redirect
Embeds a Poynt-hosted credit card form so a partner can tokenize cards and process payments on behalf of a merchant without taking on PCI scope.
public/wallet.js client-side Apple Pay / Google Pay wallet button
public/css/collect.css Collect form styles
routes/collect.js serves /collect and POST /collect/{tokenize,charge}
views/collect/v2.pug Collect form host page
Prerequisites:
- A reseller organization on Poynt OTE and a cloud app registered against it.
- The keypair PEM file for that cloud app, saved as
keypair.pemin the repo root. - Update
lib/configs.jsonwith yourapplicationIdandcollectBusinessId. Update the sameapplicationIdandbusinessIdinpublic/wallet.jsif you want the wallet button to render.
Then:
nvm use # uses the version pinned in .nvmrc
npm install
node index.js # listens on http://localhost:1347MIT - see LICENSE.