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
)
);
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 thecapture
flag is set tofalse
in the request. (I've now edited the question to make that more clear) - Jon