Inspiration

As an indie we need payment hosts to host our content and process the sales for our books, games, art, newsletters etc. But their commissions can take out a huge chunk out of our income.

What it does

Open Payment Host addresses this problem by providing an easily deployable payment host which we can integrate with a leading payment processor like Square.

Features

Beautiful posts for your content

Open Payment Host post

WYSIWYG post editor

WYSIWYG post editor of Open Payment Host

Multi-country pricing powered by Square's payments and subscriptions API

Muti-country pricing of Open Payment Host

Configurable Home

Home page of Open Payment Host

No login required, Better conversions

Billing details of Open Payment Host

No credit card data is stored locally, Thanks to Square's web sdk

Credit card entry of Open Payment Host

Compliant with 3D-Secure

3D-Secure of Open Payment Host

S3 support for automatic authenticated file delivery after successful payment

S3 file delivery of Open Payment Host

Automatic subscriber count update using Square's Webhook

Subscriber count of Open Payment Host

Testing

  1. Visit https://demo.openpaymenthost.com.
  2. Click on any post and use the buy button to make the test payment.
  3. Fill in dummy billing details.
  4. Test the payment using the test credit cards from https://developer.squareup.com/docs/web-payments/sca.
  5. Test the 3D-Secure/SCA using the test credit cards which requires verification.
  6. Post titled 'How to be a successful indie' delivers a dummy file after successful payment, Other two posts acknowledges successful payment.
  7. To test creation of posts(check note below), deploy the docker image of Open Payment Host as detailed in https://github.com/abishekmuthian/open-payment-host.

Note: Judges can test creation of posts on the demo website using the login credentials provided in the private test notes.

How I built it

Open Payment Host is a minimalist, yet performant Go web application. I designed it from the ground up to be an isolated containerized application.

Payment processor for Open Payment Host was implemented using Square's payments API, subscriptions API, Web SDK and Webhook.

Square - Open Payment Host integration architecture

Open Payment Host is dockerized and can be easily self-hosted using helper scripts for development and production environment.

The design choices include but not limited to using Sqlite3 for database, Instead of an external database server. Using Go templates with Tailwind CSS for UI instead of JavaScript front-end frameworks.

Challenges I ran into

Ensuring secure handling of customer's credit card and ensuring compliance was a challenge, I addressed it by using Square's Web SDK.

Accomplishments that I'm proud of

I was able to build a secure, production ready payments host within the stipulated period of the hackathon.

What I learned

Integrating payment processor in a payment host using Square's Payments API, Subscriptions API, Web SDK and Webhook. Integrating S3 API for secure file delivery.

What's next for Open Payment Host

Getting it to those who need it and adding more features through their feedback.

Disclaimer

Square logo is a copyright of Block, Inc.

Built With

Share this project:

Updates

Submission history