A payments microservice to securely and efficiently collect payment from many different customers.
This repository has been archived on 2026-09-29. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
  • Dockerfile 100%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2017-09-17 22:37:49 -06:00
.travis.yml add shells for ci and dockerization 2017-09-17 22:37:49 -06:00
Dockerfile add shells for ci and dockerization 2017-09-17 22:37:49 -06:00
LICENSE Initial commit 2017-09-17 19:41:20 -06:00
README.md add shells for ci and dockerization 2017-09-17 22:37:49 -06:00

PaymentsMicroservice

A payments microservice to securely and efficiently collect payment from many different customers.

Build

[Docker] + [Public CI]

[Instructions for building from source]

Running via Docker

[Docker Pull info]

Running from scratch

General Usage

You'll use Stripe's client libraries to get the stripe ids needed to power creating customers & subscripts & one off charges.

You'll pass those values to your service backend and then the backend will use them to speak to this service to "let go of them".

Your service will need to track all the relevant ids emitted by the payments microservice (customer, charges, subscriptions, and cards) but can query the payments microservice to determine the current state of any of those things. In this way, you can determine if cards are valid, if charges have succeeded, and if subscriptions are hunky doory without having to spend any cycles managing those things.

A customer will likely line up one to one with your service's user construct. A customer has a collection of cards, charges, and subscriptions. It has no concept of an order. (You should go check out the orders microservice which uses this tool to track things at a higher level, order. Orders belong to users, not customers. The relationship between an order and a customer is out of the scope of either service.)

API Functionality

Create a customer

Add a card to a customer

Stripe calls these sources.

Charge a customer

Lookup customers

Lookup cards

Lookup charges

Create a subscription

Delete a subscription

Update a subscription

Lookup subscriptions