1
votes

I am using Stripe Connect to create charges on behalf of connected accounts. I charge an application fee during this process. When I set the capture flag to true (default behavior), everything works correctly. When I set the capture flag to false, the application fee is no longer returned with a value in the response. My question is, does Stripe Connect allow me to defer capturing the charge (aka Auth and Capture)?

        // Create a token for the existing customer on the connected account
        $token = \Stripe\Token::create(
            array("customer" => $stripe_customer_id, "card" => $stripe_card_id),
            array("stripe_account" => $stripe_account_id) // Stripe ID of the connected account
        );

        // Create the charge
        $charge = \Stripe\Charge::create(
            array(
                "amount" => ($total_amount)*100,
                "currency" => "usd",
                "source" => $token->id,
                "application_fee" => ($app_fee)*100,
                "capture" => false,
                "description" => $product_name." - ".$street_adddress, // Used in the subject line of the receipt email that is sent to the end customer
                "receipt_email" => $receipt_email,
                "statement_descriptor" => $product_name
            ),
            array(
                "stripe_account" => $stripe_account_id
            )
        );
1
What do you mean by the application fee is no longer added. exactly? The application fee value is saved on the auth, it's just not created yet as you haven't captured the charge yet. If you capture it you'll see your application as expected. - koopajah
I mean that I include the application fee in the Charge::create request, but the response I receive from Stripe does not have the application fee set. The application fee is only set in the response when the capture flag is set to false in the request. (I've now edited the question to make that more clear) - Jon
when you capture the charge you can specify the application fee - Matthew Arkin
@MatthewArkin The Stripe Connect documents state that you add specify the application fee upon Charge::create stripe.com/docs/connect/payments-fees#fees-on-charges , not on capture. Do you have a reference for this that I can look at (perhaps I missing something)? - Jon
@MatthewArkin ah... got it - In reading the docs I was confused as they showed the application fee being added on Charge::create, but in the case of Auth and Capture, the application fee is added on capture (as you clearly stated). Thanks! - Jon

1 Answers

0
votes

As @MatthewArkin pointed out, in the case of Auth and Capture the application fee is added upon Capture (not Auth) https://stripe.com/docs/api#capture_charge.

The confusion I had was that I kept seeing the application fee being added when the charge was created https://stripe.com/docs/connect/payments-fees#fees-on-charges.