Stripe Connect - 可以进行身份验证和捕获吗?
Stripe Connect - Auth and Capture Possible?
我正在使用 Stripe Connect 代表关联账户创建费用。我在此过程中收取申请费。当我将 capture
标志设置为 true
(默认行为)时,一切正常。当我将 capture
标志设置为 false
时,申请费不再在响应中返回值。我的问题是,Stripe Connect 是否允许我延迟捕获费用(又名 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
)
);
正如@MatthewArkin 指出的那样,在 Auth 和 Capture 的情况下,申请费是在 Capture 时添加的(不是 Auth)https://stripe.com/docs/api#capture_charge。
我感到困惑的是,我一直看到在创建收费时添加了申请费 https://stripe.com/docs/connect/payments-fees#fees-on-charges。
我正在使用 Stripe Connect 代表关联账户创建费用。我在此过程中收取申请费。当我将 capture
标志设置为 true
(默认行为)时,一切正常。当我将 capture
标志设置为 false
时,申请费不再在响应中返回值。我的问题是,Stripe Connect 是否允许我延迟捕获费用(又名 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
)
);
正如@MatthewArkin 指出的那样,在 Auth 和 Capture 的情况下,申请费是在 Capture 时添加的(不是 Auth)https://stripe.com/docs/api#capture_charge。
我感到困惑的是,我一直看到在创建收费时添加了申请费 https://stripe.com/docs/connect/payments-fees#fees-on-charges。