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. Often our product descriptions can fall short and we need the help of marketing personnel to write it.

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 which offers pay as you go plan. Open Payment Host comes with Google AI's PaLM API powered editor which helps us write amazing product descriptions.

Features

Configurable Home

Home page of Open Payment Host

WYSIWYG editor with product descriptions powered by Google PaLM AI

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

Beautiful posts for your content

Open Payment Host post

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

Note: Judges can test creation of posts using PaLM API on the demo website using the login credentials provided in the private test notes. The testing notes below are for general public to use the read-only aspects of the application.

  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 'Miitnts and Sparky' delivers a comics file after successful payment, Other three 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.

How I built it

Open Payment Host is a minimalist, yet performant and secure 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

AI autocomplete for product description was implemented using Google AI's PaLM API

PaLM API - 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.

Lack of Go SDK for PaLM API was a challenge, I overcame it by using their REST API.

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 PaLM AI API for sentence autocomplete.

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. Google AI logo is a copyright of Alphabet, Inc.

Built With

Share this project:

Updates