A Micro Service for Stripe Payments in Go
go buildexport STRIPE_KEY="your stripe key"
export STRIPE_SUCCESS_URL="https://example/success"
export STRIPE_CANCEL_URL="https://example/cancel"
go run github.com/roundpartner/stripe-serviceTo take a single payment the charge end point provides this
curl -X POST\
-d "{\"token\": \"tok_gb\", \"amount\": 1000, \"desc\": \"example\"}" \
http://0.0.0.0:57493/chargecurl -X GET \
-d "{\"limit\":\"10\"}" \
http://0.0.0.0:57493/customerThe customer id will return the customer details
curl http://0.0.0.0:57493/customer/cus_BUoP6KtXPL3ajUcurl -X POST \
-d "{\"token\": \"tok_gb\", \"account\": \"1\", \"email\": \"example@mailinator.com\", \"desc\": \"Added by go test\"}" \
http://0.0.0.0:57493/customercurl -X PUT \
-d "{\"token\": \"tok_mastercard_debit\"}" \
http://0.0.0.0:57493/customer/cus_BUoP6KtXPL3ajU/cardcurl http://0.0.0.0:57493/reloadcurl -X PUT http://0.0.0.0:57493/customer/cus_DOQj7OGOt6mX1n/coupon/freeGet customer subscriptions
curl http://0.0.0.0:57493/customer/cus_DOQj7OGOt6mX1n/subscriptioncurl -X POST http://0.0.0.0:57493/customer/cus_BUoP6KtXPL3ajU/session/plan_FPSDCc5aQKEEP3