Stripe Q67.Can only apply an application_fee when the request is made on behalf of another account (using an OAuth key, the Stripe-Account header, or the destination parameter).

StripeQA

目次一覧

 状態:-  閲覧数:444  投稿日:2019-08-24  更新日:2019-08-25  
Q67 / A / 連絡

Q67 / A / 連絡

 閲覧数:278 投稿日:2019-08-24 更新日:2019-08-26 

Q67


Can only apply an application_fee when the request is made on behalf of another account (using an OAuth key, the Stripe-Account header, or the destination parameter).
2019/8/24
下記エラーが出ます。原因は何でしょうか?
Can only apply an application_fee when the request is made on behalf of another account (using an OAuth key, the Stripe-Account header, or the destination parameter).

※やりたいことは、Connect StandardアカウントのDirect Chargeです

コード
<?php
\Stripe\Stripe::setApiKey("sk_test_xxxx"); //親 テスト シークレット

$checkoutSession = \Stripe\Checkout\Session::create([
 'payment_method_types' => ['card'],
 'line_items' => [[
   'name' => "Checkout Session Direct Charges デモ3",
   'amount' => 200,
   'currency' => 'jpy',
   'quantity' => 10,
 ]],
 'payment_intent_data' => [
   'application_fee_amount' => 200,
   'metadata' =>  ['fw_login_flag' => 'true','fw_entry_id' => 846,],
 ],
 'success_url' => 'https://xxxx/thanks.php?session_id={CHECKOUT_SESSION_ID}',
 'cancel_url' => 'https://xxxx/cancel.php',
 'client_reference_id' => '725',
], [
 'stripe_account' => 'acct_1F0zwJLlsmkNgPt8', //子
]);
?>

<button id="checkout-button" role="link">Pay</button>
<div id="error-message"></div>

<script src="https://js.stripe.com/v3"></script>
<script>
const stripe = Stripe('pk_test_xxxx', { //親テスト公開キー
 stripeAccount: 'acct_xxxx', //子
});
const checkoutButton = document.getElementById('checkout-button');
checkoutButton.addEventListener('click', function () {
 stripe.redirectToCheckout({
   sessionId: '<?php echo $checkoutSession->id; ?>'
 })
 .then(function (result) {
   if (result.error) {
     var displayError = document.getElementById('error-message');
     displayError.textContent = result.error.message;
   }
 });
});
</script>


A


ご教示いただいたエラーに関して、詳しく調査させていただきたく存じます。
つきましては、お手数をおかけし恐縮ですが、該当のエラーが発生したリクエストIDをご教示いただけますでしょうか。

念のためのご案内とはなりますが、Connectを利用した際の Checkout session の作成に関しては、下記に記載がございます:https://stripe.com/docs/payments/payment-intents/use-cases#connected-accounts

連絡


表記の件ですが、自己解決しました。
原因は、(親子アカウントの)ApiKey記載を間違えていました。



Stripe Q66.Webhookエンドポイントが、"connect"内容も含むかどうかを確認するためにはどうすれば良いですか?

Stripe Q68.WebhookはPUT送信しているのですか?

コメント投稿(ログインが必要)



類似度ページランキング
順位 ページタイトル抜粋
1 Stripe Q67.Can only apply an application_fee when the request is made on behalf of another account (using an OAuth key, the Stripe-Account header, or the destination parameter). 20
2 Stripe Q9。Checkout beta version で、webhookを受け取ると、client_reference_idがNULL 18
3 Stripe Q73.CheckoutのSessionオブジェクトをcreateする際、'payment_intent_data'内の'metadata'として渡したデータを、webhookで受け取る件について 18
4 Q63.No signatures found matching the expected signature for payload について 18
5 Stripe Q39。I want to check the processing for the 'success_url' parameter of the 'Checkout \ Session :: create () method' in the Git-Hub code 18
6 Stripe Q30。Checkout (new) の「Checkout Server Quickstart」の「Step 2: Add Checkout to your website」について 17
7 Stripe Q72.Unexpected error communicating with Stripe. If this problem persists, let us know at support@stripe.com. (Network error [errno 77]: ) 17
8 Stripe Q25。Why is it an error to use “token_xxxx” not associated with a Customer object for payment? 17
9 Stripe Q60. Checkout\SessionオブジェクトとPaymentIntentオブジェクトの関係性は1対1ですか? 17
10 Stripe Payments > COLLECTING PAYMENT DETAILS > Checkout 17
11 Stripe Q48。「Checkout\Session - server」「Charge」「PaymentIntent」の使い分け方 17
12 Stripe Q24。After attaching the source to the customer object, how do I check from the customer object? 17
13 Stripe Q62.Webhook::constructEventで、SignatureVerificationエラーになるのですが… 17
14 Stripe Q70.「checkout.session.completed イベント」と「charge.succeeded イベント」と「application_fee.created イベント」の違いについて 17
15 Stripe Q55.Checkout\Session::createする際の、'client_reference_id'パラメータと'payment_intent_data.metadata'パラメータの違いについて 17
16 Stripe Q8。Stripe Checkout public beta version について 17
17 Stripe Q20。「webhook」と「synchronous」と「Checkout beta version」について 17
18 Stripe Q26。If you only accept credit card payments, are there any functions that can not be done with src_xxxx but only with tok_xxxx? 17
19 Stripe Payments > COLLECTING PAYMENT DETAILS / 支払い詳細の収集 > Checkout Reference 17
20 Stripe Q57.Pass two user-defined key-value pairs as parameters when creating Session object. I want to receive it in checkout.session.completed event 17
2024/3/19 14:55 更新
週間人気ページランキング / 3-12 → 3-18
順位 ページタイトル抜粋 アクセス数
1 YouTube | 動画サービス(課金販売できるプラットフォーム) 6
2 サブスクリプション | 課金 4
3 支払い 2
3 Stripe Q74.「お客様のビジネスの詳細」とは何ですか? | Stripe 2
3 Twitch | ゲーム実況配信サービス(課金販売できるプラットフォーム) 2
3 EPUB | ファイルフォーマット(電子書籍) 2
3 SHOWROOM | ライブ配信サービス(課金販売できるプラットフォーム) 2
3 Stripe Q13。決済成功時に、「請求に紐づけられたメールアドレス」に対して、メール送信したいのですが、 | QA(Stripe) 2
4 Stripe Q35。「Payment Intents API」で、3Dセキュアなどの認証手順を(顧客が)使用しないことは出来ますか? | QA(Stripe) 1
4 Stripe Q15。PaymentIntent でエラー。カード番号に不備があります。 | QA(Stripe) 1
4 トークンとは? / トークン決済 / トークン決済を導入するメリット 1
4 EMVCo | クレジットカード仕様(仕様) 1
4 Coiney | 「支払」機能を有する決済系サービス(決済サービス) 1
4 プリペイドカードとは?/ 現金として出金できるの?/ プリペイドカードの具体例 1
4 Stripe Q46。Direct Charges で手数料聴取する場合、'payment_intent_data'の「有り」「無し」の違いは? | QA(Stripe) 1
4 普通送金とは? / 処理の流れ 1
4 トークナイゼーション / トークナイゼーションとは? / トークン化されたデータ 1
4 「払い戻し」と「チャージバック」の違い | 違い 1
4 質問履歴16 / 質問履歴16-2 1
4 クレジットカード決済 | 課金 1
2024/3/19 1:01 更新