Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Stripe fee calculation

Regarding Stripe fee calculation, is there is any way to get the Stripe fee according to the amount provided.

We have to implement this in such away that, we have to pay x amount to one dealer and y amount to another.

1st case:

Let say we have $100 to pay to Stripe.

According to our needs, we want to calculate the Stripe fee first and then add that fee to the $100 amount.

e.g:

Amount to be Paid is $100 + $3 (Stripe fee) = $103 (Total) you need to cut from the customers account.

2nd Case:

We need to pay $95 to the dealer and the $5 left we want to keep in our account (excluding the Stripe fee).

If this is possible, how do we implement this?

like image 997
sher bahadur Avatar asked Apr 28 '16 06:04

sher bahadur


People also ask

How much of a fee does Stripe charge?

Stripe is a pay-as-you-go payment processing platform with flat-rate, transaction-based fees. Overall, you'll pay 2.9% plus 30 cents per transaction to accept card payments online and 2.7% plus 5 cents to accept in-person payments with Stripe.

Is Stripe cheaper than PayPal?

Stripe: Credit Card Processing Comparison. Stripe's fee for swipe and chip transactions starts at 2.9% plus 9 cents per transaction while PayPal's is 2.29% plus 49 cents. The fee for keyed transactions for PayPal is higher, starting at 3.49% plus 9 cents while Stripe's fee does not change.

Does Stripe charge the customer?

Although Stripe will not charge you monthly or annual fees, you still have to pay 2.9% plus 30¢ for every online transaction to accept card payments and 2.7% plus 5¢ for in-person payments.


2 Answers

From the Stripe Charge ID we can get the processing fee taken from the amount

stripe.Charge.retrieve("ch_1DBKfWECTOB5aCAKpzxm5VIW", expand=['balance_transaction'])

    "id": "txn_1DBKfWECTOB5aCAKtwwLMCjd",
    "net": 941,
    "object": "balance_transaction",
    "source": "ch_1DBKfWECTOB5aCAKpzxm5VIW",
    "status": "pending",
    "type": "charge"

"net": 941 is the amount credited to merchant account
like image 113
Akhilraj N S Avatar answered Oct 08 '22 19:10

Akhilraj N S


the easiest way is to add expand for balance transaction

$charge = \Stripe\Charge::create(array(
              "amount" => $totalAmount,
              "currency" => $currency_code,
              "source" => $stripeToken,
              "transfer_group" => $orderId,
              "expand" => array("balance_transaction")
            ));

This will give you what stripe has charged as fee and then you can do remaining calculations

like image 26
Lonare Avatar answered Oct 08 '22 20:10

Lonare