#shayan-shokat_api

1 messages ¡ Page 1 of 1 (latest)

vestal escarpBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1273915123232276483

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

stiff scroll
#

Hi, let me help you with this.

winter shuttle
#

req_4VUhG2zGVYg4l8

stiff scroll
#

Where did you find a reference to this API method?

winter shuttle
#

Chat GPT and co-polit suggestion, but unable to find it in official documentation or any alternate api in the documentation

#

the use case is that we're taking payments in multiple countries and in are analytics, we need it in one single currency

stiff scroll
#

This is not a valid API method.

winter shuttle
#

can you guide me of any alternate API in stripe to convert currency?

stiff scroll
#

Could you give me an example payment that you need converted?

winter shuttle
#

I've setup a webhook on charge.succeed event to get the charge, it can be subscription creation, renewal or onetime payment, then I need to convert the amount on USD because we already have payment in CAD and AUD which will give inacurate outcome of I just take the amount without currencies

winter shuttle
# stiff scroll You can find the used FX rate on the Balance Transaction object for each Charge.
  id: 'txn_XXX',
  object: 'balance_transaction',
  amount: 24000,
  available_on: 1724198400,
  created: 1723789351,
  currency: 'usd',
  description: 'Subscription creation',
  exchange_rate: null,
  fee: 918,
  fee_details: [
    {
      amount: 918,
      application: null,
      currency: 'usd',
      description: 'Stripe processing fees',
      type: 'stripe_fee'
    }
  ],
  net: 23082,
  reporting_category: 'charge',
  source: 'ch_XXX',
  status: 'pending',
  type: 'charge'
}
#

it's not giving exchange rate against balance transaction, this one in USD, let's say I have to convert it in CAD, how should I proceed?

stiff scroll
winter shuttle
#

no API in stripe for this?

stiff scroll
#

No

winter shuttle
#

got it, thanks @stiff scroll

stiff scroll
#

Happy to help.

vestal escarpBOT