edo1z blog

プログラミングなどに関するブログです

Stripe - on_behalf_ofを使えと言われても使ってはいけなかったのでメモ

こういうエラーが出た。昔も出たのだが対処方法を完全に忘れており、下記にあるとおり、on_behalf_ofをつけたらエラーが消えたのだが、今度は本番で利用するStripeでエラーがでるようになった。

Error: Cannot create a destination charge for connected accounts in JP because funds would be settled on the platform and the connected account is outside the platform's region. You may use the on_behalf_of parameter to have the charge settle in the connected account's country. For more information on on_behalf_of, see https://stripe.com/docs/connect/charges-transfers#on-behalf-of. If using capabilities (e.g. card_payments, transfers), note that they affect settlement as well. For more information on capabilities, see https://stripe.com/docs/connect/account-capabilities. If you still need assistance, please contact us via https://support.stripe.com/contact.

原因は、わいの新しく作ったアカウントがデフォルトだとアメリカ合衆国になっていたので、JPYの決済なんぞ出来ないという指摘であった。つまり、ダッシュボードでわいのアカウントの国を日本にしたらJPYが使えるので上記のエラーが消えた。