stripe / openapi

An OpenAPI specification for the Stripe API.
MIT License
394 stars 123 forks source link

Instructions on how to test couple of APIs #47

Closed kamipatel closed 5 years ago

kamipatel commented 5 years ago

Any instructions on how to test let's say charging a credit card? What is the recommended tool? Thanks!

brandur-stripe commented 5 years ago

@kamipatel stripe-mock might be useful depending on what you're trying to do — it'll respond with JSON responses that are roughly the right shape for any API call. That said, make sure to read its list of limitations. It's stateless for example, so it'll only give nominally useful feedback across the entirety of a charge flow (i.e. it'll verify that parameters are right, but not much beyond that).

The highest fidelity option is to use Stripe testmode. You're hitting real API servers as part of this interaction, but they'll be able to give you the highest quality feedback on whether your integration is correct.