A go service for handling Expresso billing
$ docker run jonnykry/coinage:latest
$ go get github.com/jonnykry/coinage
$ cd $GOPATH/src/github.com/jonnykry/coinage
$ make deps
$ make run
Example:
Request:
POST localhost:8081/api/customer
{
"userId": "<uuid>",
"token": "<stripe_token>"
}
Response:
{
"data": {
"id": <uuid>,
"userId": <uuid>,
"customerId": <stripe_customer_id>,
"subscriptions": {},
"sources": {},
"meta": {}
}
}
Example:
Request:
GET localhost:8081/api/customer?offset=0&limit=20
Response:
{
"data": [
{
"id": <uuid>,
"userId": <uuid>,
"customerId": <stripe_customer_id>,
"subscriptions": {},
"sources": {},
"meta": {}
}, ...
]
}
Example:
Request:
GET localhost:8081/api/customer/1
Response:
{
"data": {
"id": <uuid>,
"userId": "1",
"customerId": <stripe_customer_id>,
"subscriptions": {},
"sources": {},
"meta": {}
}
}
Example:
Request:
DELETE localhost:8081/api/customer/1
Response:
{
"data": true
}
Example:
Request:
POST localhost:8081/api/customer/1/source
{
"token": "<stripe_token>"
}
Response:
{
"data": {
"id": <uuid>,
"userId": <uuid>,
"customerId": <stripe_customer_id>,
"subscriptions": {},
"sources": {},
"meta": {}
}
}
NOT IMPLEMENTED
Example:
Request:
POST localhost:8081/api/customer/1/subscription
NOT IMPLEMENTED
Example:
Request:
POST localhost:8081/api/customer/1/subscription/2