Paygate is a developer controlled payment gateway, it's geared towards helping developers easily collect payments from clients. Paygate is inspired by, but strives to offer more than a simple sum payment system. PayGate handles sum payments and recurring payments, the latter being a feature usually reserved for the premium solutions that cost an awful lot for what they do.


Route Based payment

Paygate handles payments differently, it places no emphasis on enforcing a sign-up process or converting users. It simply uses the current route such as /instant/300, or /monthly/10 to take the payment - meaning the developer can easily issue a charge, and the client can easily pay it.


Paygate is very easily configured, it is built with Docker and all configuration is handled by a single .env file in the project root folder. The options available are:

# 3 letter ISO currency code (GBP, USD, etc.).

# The name of the entity being paid.

# The label that will be used for the entity.

# The name of the image file used for Stripe Checkout, located in /view/src/images/

# The service being paid for.
SERVICE=Web Development

On top of this, the view is completely separate from the API. Meaning that if you want to delve into the styling or layout you are more than easily able to without risking breaking anything. The view layer is powered by React, with all methods being external allowing for complete customization without fuss if required.

Secure and Easy

As a front-end developer, I feel more in my element when I'm working in that area. For that reason, deploying PayGate is extremely easy - in fact the minimum amount of effort required is 4 commands, this will bring you from nothing to a fully SSL encrypted payment gateway.

What I Learned

Paygate makes use of the latest ES6 standard in Javascript, for the client-side this is transpiled using Webpack and Babel. This was also a first venture into using React for a project, and I was pleasantly surprised by how much sense composition makes when it comes to reasoning with your application. A flux implementation was foregone in this situation because it seemed to be overkill for an application with very little state management.


Koa.js is used to power the server, Koa made it a pleasure to work with generator functions to write asynchronous code. This meant managing promises and callbacks wasn't a problem, using a yield to wait on the response was all that was required, for example async calls to the Stripe api were simplified to:

const stripeChargeDetails = yield Stripe.charge.create({...});