Payment Methods API

「決済」及び「開発」関連用語集

カテゴリー: documentation  閲覧数:292 配信日:2019-04-25 09:09


docs


Payments > PREPARING FOR SCA > Payment Intents > Usage > Payment Methods API
Payment Methods Overview
Payment Methods API

API


PaymentMethods

Payment Methods API  への移行


新しいPayment Methods API
・既存の「Tokens」および「Sources API」に代わる新しい「Payment Methods API」が 、システムによる支払い情報の収集および保存のための推奨方法になった
・これは「Payment Intents API」と連携して、幅広い支払い方法の支払いを作成する

「Payment Methods API」と「Sources API」の主な違い
・Sourceがstatusプロパティを通じてトランザクションの状態を記述することだ。つまり、各Sourceオブジェクトは、支払いに使用する前にchargeable状態に移行する必要がある
・対照的に、PaymentMethodsはステートレスで、特定の支払いの取引状態を表すためにPaymentIntentオブジェクトに依存している

Stripeは最終的にすべての支払い方法を「Payment Methods API」でサポートする予定だ
・それまでの間、Sources APIは、特定の支払い方法が「Payment Methods API」でまだサポートされていない場合に適している
FLOWS PAYMENT METHODS WITH PAYMENT INTENTS API TOKENS OR SOURCES WITH CHARGES API
Cards サポート トークンでサポート
ソースにはお勧めできない
・他は省略
Stripe: 決済手段ガイド

ソースとカードとの互換性


以前にカードまたは情報源を使用してStripeで顧客カードの詳細を収集したことがある場合は
・支払い情報を移行せずに直ちにPayment Methods APIを使用し始めることができる
!この互換性はカードとカードソースにのみ適用され、一般に既存のすべてのソースタイプには適用されない
!他のタイプのソースと統合している場合は、すぐにそれらのソースでPayment Intents APIを使用できる

顧客に保存されているすべてのカードとすべてのカードソースは
・PaymentMethodオブジェクトを受け入れるすべてのAPIで使用できる
・例えば、PaymentIntentを作成するときに、保存したカードをPaymentMethodとして使用できる
// Set your secret key: remember to change this to your live secret key in production
// See your keys here: https://dashboard.stripe.com/account/apikeys
\Stripe\Stripe::setApiKey("sk_test_xxxx");

StripePaymentIntent::create([
 "payment_method_types" => ["card"],
 "amount" => 1099,
 "currency" => "jpy",
 "customer" => "cus_EuDxccEWADyPip",
 "payment_method" => "card_1ESZCTJiXAQvfxv33qy49u11",
]);

・オブジェクトをPaymentIntentに添付するときは、カードまたはカードソースが保存されている顧客を忘れずに指定してくれ

保存されたすべてのカードとカードソースは、PaymentMethod APIを介して取得することも出来る
・従来のcardオブジェクト
{
 "id": "card_1EBXBSDuWL9wT9brGOaALeD2",
 "object": "card",
 "address_city": "San Francisco",
 "address_country": "US",
 "address_line1": "1234 Fake Street",
 "address_line1_check": null,
 "address_line2": null,
 "address_state": null,
 "address_zip": null,
 "address_zip_check": null,
 "brand": "Visa",
 "country": "US",
 "customer": "#{customer_id}",
 "cvc_check": null,
 "dynamic_last4": null,
 "exp_month": 8,
 "exp_year": 2024,
 "fingerprint": "53v265akSHAnIk1X",
 "funding": "credit",
 "last4": "4242",
 "metadata": {
 },
 "name": null,
 "tokenization_method": null
}


・PaymentMethod APIを介して取得したカード
{
 "id": "card_1EBXBSDuWL9wT9brGOaALeD2",
 "object": "payment_method",
 "billing_details": {
   "address": {
     "city": "San Francisco",
     "country": "US",
     "line1": "1234 Fake Street",
     "line2": null,
     "postal_code": null,
     "state": null
   },
   "name": null,
   "phone": null,
   "email": null
 },
 "card": {
   "brand": "visa",
   "checks": {
     "address_line1_check": null,
     "address_postal_code_check": null,
     "cvc_check": null
   },
   "country": "US",
   "exp_month": 8,
   "exp_year": 2024,
   "fingerprint": "53v265akSHAnIk1X",
   "funding": "credit",
   "last4": "4242",
   "three_d_secure_usage": {
     "supported": true
   },
   "wallet": null
 },
 "created": 123456789,
 "customer": "cus_EepWxEKrgMaywv",
 "livemode": false,
 "metadata": {
 },
 "type": "card"
}


・従来のsourceオブジェクト
{
 "id": "src_1AhIN74iJb0CbkEwmbRYPsd4",
 "object": "source",
 "amount": null,
 "client_secret": "src_client_secret_xxxx",
 "created": 1500471469,
 "currency": null,
 "flow": "none",
 "livemode": false,
 "metadata": {
 },
 "owner": {
   "address": {
     "city": "Berlin",
     "country": "DE",
     "line1": "Nollendorfstraße 27",
     "line2": null,
     "postal_code": "10777",
     "state": null
   },
   "email": "jenny.rosen@example.com",
   "name": "Jenny Rosen",
   "phone": null,
   "verified_address": null,
   "verified_email": null,
   "verified_name": null,
   "verified_phone": null
 },
 "status": "chargeable",
 "type": "card",
 "usage": "reusable",
 "card": {
   "exp_month": 4,
   "exp_year": 2024,
   "address_line1_check": "unchecked",
   "address_zip_check": "unchecked",
   "brand": "Visa",
   "country": "US",
   "cvc_check": "unchecked",
   "funding": "credit",
   "last4": "4242",
   "three_d_secure": "optional",
   "tokenization_method": null,
   "dynamic_last4": null
 }
}


・PaymentMethod APIを介して取得したsource
{
 "id": "card_1EBXBSDuWL9wT9brGOaALeD2",
 "object": "payment_method",
 "billing_details": {
   "address": {
     "city": "Berlin",
     "country": "DE",
     "line1": "Nollendorfstraße 27",
     "line2": null,
     "postal_code": "10777",
     "state": null
   },
   "name": "Jenny Rosen",
   "phone": null,
   "email": "jenny.rosen@example.com"
 },
 "card": {
   "brand": "visa",
   "checks": {
     "address_line1_check": null,
     "address_postal_code_check": null,
     "cvc_check": null
   },
   "country": "US",
   "exp_month": 4,
   "exp_year": 2024,
   "fingerprint": "53v265akSHAnIk1X",
   "funding": "credit",
   "last4": "4242",
   "three_d_secure_usage": {
     "supported": true
   },
   "wallet": null
 },
 "created": 1500471469,
 "customer": "#{customer_id}",
 "livemode": false,
 "metadata": {
 },
 "type": "card"
}


この互換性により、新しいオブジェクトは作成されない
・PaymentMethod API は、同じ基礎となるオブジェクトに対して異なるビューを提供する
・例えば、Payment Methods API を介したカードまたはカードソースへの更新は、ソースAPIを介して表示され、またその逆も同様だ

週間人気ページランキング / 4-19 → 4-25
順位 ページタイトル抜粋 アクセス数
1 YouTube | 動画サービス(課金販売できるプラットフォーム) 7
2 EMVCo | クレジットカード仕様(仕様) 6
3 EMVレベル1 / EMVレベル2 / EMVCo とは? 5
4 クレジットカード決済 | 課金 4
5 pixivFANBOX | クリエイター支援プラットフォーム(課金販売できるプラットフォーム) 3
5 Squareは、デジタルコンテンツ(デジタル情報)の配信利用が認められないサービス | 「支払」機能を有する決済系サービス(決済サービス) 3
6 Stripeアカウントへログインする際、モバイル端末で受信したコード入力を求められる理由は? | その他エントリー(Stripe) 2
6 Off-session Payments with Payment Intents / Payment Intents を使用したオフセッション支払 2
6 Stripe Q32。Webhook のエンドポイントから適切な値を返さなかったときの停止措置について | QA(Stripe) 2
6 「支払」と「送金」の違い | 違い 2
6 Stripe Q16。PaymentIntentの支払いで郵便番号入力を求められる。Radar rules の ZIP code を無効にしているのに | QA(Stripe) 2
6 プリペイドカード | カード 2
7 振込 | 送金 1
7 IBAN | 海外送金(送金) 1
7 Stripe Q11。テストAPIで、実際のカード番号を入力したらどうなりますか? | QA(Stripe) 1
7 Stripe Q53.Checkout\Sessionの1回限りの支払いで、決済完了したユーザにだけページ表示させたい | QA(Stripe) 1
7 ツイキャスとは?/ 特徴 / キートスとは? 1
7 note | 課金販売できるプラットフォーム 1
7 Stripe webhook 配信の問題 / 実際に受け取った警告メールの受信例 1
7 Stripe webhook 配信の問題 | その他エントリー(Stripe) 1
2024/4/26 1:02 更新
指定期間人気ページランキング / 2020-5-28 → 2024-4-25
順位 ページタイトル抜粋 アクセス数
1 Stripeアカウントへログインする際、モバイル端末で受信したコード入力を求められる理由は? | その他エントリー(Stripe) 2010
2 EMVCo | クレジットカード仕様(仕様) 1268
3 Stripe Q13。決済成功時に、「請求に紐づけられたメールアドレス」に対して、メール送信したいのですが、 | QA(Stripe) 943
4 Stripe Q16。PaymentIntentの支払いで郵便番号入力を求められる。Radar rules の ZIP code を無効にしているのに | QA(Stripe) 901
5 クレジットカード決済 | 課金 880
6 Twitch | ゲーム実況配信サービス(課金販売できるプラットフォーム) 876
7 決済用語 855
8 Stripe Q50。 Connect 「Standardアカウント」で、自身に連結された子アカウントを、ダッシュボードから削除するには? | QA(Stripe) 824
9 Omise | 「支払」機能を有する決済系サービス(決済サービス) 767
10 Stripe Q1。Stripeにおける個人事業主の定義 | QA(Stripe) 761
11 pixivFANBOX | クリエイター支援プラットフォーム(課金販売できるプラットフォーム) 741
12 Stripe Q31。ダッシュボードでの「支払い作成」の見方について | QA(Stripe) 738
13 EMVレベル1 / EMVレベル2 / EMVCo とは? 727
14 YouTube | 動画サービス(課金販売できるプラットフォーム) 670
15 プリペイドカード | カード 645
16 EPUB | ファイルフォーマット(電子書籍) 587
17 サブスクリプション | 課金 563
18 Stripeで"No such token: src"と表示されたら、最初にAPIキーを確認する | Stripe エラー(Stripe) 544
19 Stripe Q74.「お客様のビジネスの詳細」とは何ですか? | Stripe 542
20 ファンティア | クリエイター支援プラットフォーム(課金販売できるプラットフォーム) 482
2024/4/26 1:02 更新