stripe/stripe-go — reverse-engineered prompt

Reverse engineered prompt

GitHub

Build me a Go client library for Stripe that feels like the official one. I want developers to be able to add it to a Go module, create a client with their Stripe secret key, and then work with common Stripe things like customers, charges, payment intents, invoices, subscriptions, refunds, products, prices, events, and connected accounts.

Make the library pleasant to use, with typed request params and response objects, simple create, retrieve, update, delete, and list methods, context support, and easy pagination. Include examples for creating a customer, listing payment intents, reading events, using Connect with a connected account, and validating webhooks.

Please include safe defaults like automatic retries for temporary network failures, idempotency where appropriate, clear errors, and a way to inspect the last Stripe response and request ID. Set it up as a normal Go 1.22 plus module with tests and a README that shows the main usage patterns. Look up current Stripe docs online if you need to.

Want more depth? Deep Reverse