#william-issuing-transaction-refund

1 messages · Page 1 of 1 (latest)

clever kindleBOT
#

Hello! We'll be with you shortly. Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

static copper
#

@sterile sorrel let's chat here!

sterile sorrel
#
Stripe::Issuing::Transaction::TestHelpers.refund(
  'ipi_1OPAspQs45zu1z8TKRSeEI9p',
  { refund_amount: 1000 },
  { stripe_account: 'acct_1OKQGbQs45zu1z8T' }
)
static copper
#

What error do you get?

sterile sorrel
#

That Issuing transaction id is on that account, so I don't know why it's erroring out.

#
Stripe::APIError: An unknown error occurred
from /Users/.../.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/stripe-10.3.0/lib/stripe/stripe_client.rb:715:in `handle_error_response'
static copper
#

Taking a look at the error on my end

sterile sorrel
static copper
#

If you omit refund_amount when creating the refund, do you receive the same error?

clever kindleBOT
#

william-issuing-transaction-refund

sterile sorrel
#

If I do that, then I get this error:

WARNING: 'stripe_account' should be in opts instead of params.
Stripe::InvalidRequestError: Received unknown parameter: stripe_account
static copper
#

Ah, i think that's because you need to keep an empty opts

#

So your code would look something like this:
Stripe::Issuing::Transaction::TestHelpers.refund( 'ipi_1OPAspQs45zu1z8TKRSeEI9p', { }, { stripe_account: 'acct_1OKQGbQs45zu1z8T' } )

sterile sorrel
#

If I try what you have above I'm back to:

Stripe::APIError: An unknown error occurred
static copper
#

Gotcha

#

Still looking, give me a few minutes

static copper
#

Okay, so I see the transaction was created due to a test-mode force capture (vs. approving an authorization, which would create a transaction automatically)