Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Add Charges API #1

Closed
abh opened this Issue · 8 comments

2 participants

@abh

No description provided.

@mrcwinn

Any ETA on Charges API or looking for help?

@abh
abh commented

Hi –

Patches welcome! (In particular if they include tests and documentation update)

I haven't looked for a few days, but from my notes I think the API should be something like

  • stripe.charges
  • .create( { data, .. } ) - create a charge
  • .retrieve( charge_id ) - retrieve a charge
  • .refund(charge_id, amount) - refund a charge
  • .list(count, offset, customer) - list charges; not sure about the list of parameters; maybe this should take an object with { count: 123, offset: 10, customer: customer_id } instead. If so then customers.list should be changed, too.

One of the things that made me pause implementing this was that I wasn't sure what the best way to return the error code / error description is when there are errors. An object instead of a string? If so then the other error handling should do that, too.

@mrcwinn

Sounds great! Just committed changes to support Charge API.

@mrcwinn

Fixed a couple little quirks. Was using a GET where it should be POST.

@abh
abh commented

Can you add some tests and then make a pull request?

@mrcwinn
@abh abh closed this issue from a commit
Chris Add Charges API and tests
Closes #1
ab8f27f
@abh abh closed this in ab8f27f
@abh
abh commented

Hi Chris,

I changed the spaces to tabs and then squash merged it in so the history is clean. I "faked" the commit coming from you so you get credit in the history. :-)

@mrcwinn
@padolsey padolsey referenced this issue from a commit
@padolsey padolsey rm redundant Cards resource (cards can be interacted with via returne…
…d Customer data obj or via stripe.customers.{...}Card). See #1.
5b14939
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.