#muhammad-adeel_api

1 messages ¡ Page 1 of 1 (latest)

dense hollyBOT
#

👋 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/1299248673376702467

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

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.

cunning dust
#

how can i create payment intent with exclusive stripe processing fee. i need to charge stripe processing fee from customer and want a full breakdown of stripe charge amount. that's need to show to customer.

stone mirage
#

hello! you need to do the calculations yourself as to how much the Stripe fee will be based off the payment method type. There are a lot of variables to take into account e.g. domestic / international cards, different payment methods, and possibly more. See https://stripe.com/pricing.

We typically don't recommend doing this due to how complex it can be, we can't help you with the calculations, and also different countries have different regulations on passing on fees to the customer so you should make sure that's allowed in the country you're processing in.

If you do want to make an attempt to calculate the fee, probably the two-step confirmation page is what you want : https://docs.stripe.com/payments/build-a-two-step-confirmation

Add an optional review page or run validations after a user enters their payment details.

cunning dust
#

is stripe provide seprate api for fee calculation?

stone mirage
#

no, we have no API for fee calculation. The calculation logic needs to be done by you. We're unable to help for that

cunning dust
#

can i get charged fee full breakdwon on confirm payment intent response with API?

stone mirage
cunning dust
#

no he will not provide full guid

stone mirage
#

i'm not sure what you mean? If you have a specific question, you can share it here

cunning dust
#

let me check again. please don't close thread.

stone mirage
#

If you're confirming the PaymentIntent from your server, you can use expand to get the relevant fields back in the response.

Example

$confirm = $stripe->paymentIntents->confirm (
  $paymentIntent->id,
  ["payment_method" => 'pm_card_visa',
    "expand" => [
      "latest_charge.balance_transaction"
    ],
  ],
);

echo $confirm;
cunning dust
#

ok i will try this.

#

but i have feteched an charge detail thats not have stripe charged fee detail.

stone mirage
#

you didn't expand the balance_transaction

#

if you expanded the balance_transaction you should be getting back an object. All you have in your screenshot is an id

cunning dust
#

yes i have checked. thanks

#

but

#

i need this befor confirm payment intent

stone mirage
#

that's not possible, the Balance Transaction object is only available when payment is made. That's why I said you need to perform the calulations by yourself (prior to the payment)

cunning dust
#

$stripe->tax->calculations->create([
'currency' => Setting::CURRENCY,
'line_items' => [
[
'amount' => $serviceFee,
'tax_code' => 'txcd_10103001',
'reference' => 'General migration consultation',
],
],
'customer_details' => [
'address' => [
'line1' => 'Victoria Square, Adelaide SA, Australia',
'city' => 'Adelaide City Council',
'state' => 'South Australia',
'postal_code' => '5000',
'country' => $consumerCountry,
],
'address_source' => 'shipping',
],
'expand' => ['line_items.data.tax_breakdown'],
]);

in code refrence stripe provide GST calculation on the basis of country
have any way stripe return also prcossing fee?

stone mirage
#

again, no, there is no API for returning the Stripe processing fee

cunning dust
#

if i use 'capture_method' => 'manual', then on confirm intent, can i got stripe fee in balance transaction detail?

stone mirage
#

there's no Balance Transaction if the payment hasn't been captured yet, so no

cunning dust
#

Ah, last option i need to be work on it.
is there any way i make own payment card form and then gives form to stripe for accept payment?

stone mirage
#

do you mean you want to collect the raw card details yourself and then pass that to Stripe? Instead of using Stripe Elements (e.g. Payment Element) to collect the payment method details?

cunning dust
#

yes exactly

stone mirage
cunning dust
#

its not proper guid for developer