決済情報取得
1.基本情報
指定された定期購買IDの決済情報を取得する。
※1 定期購買アプリではクレジットカード番号全ては管理しておりません。下4桁のみの返却となります。
項目名 | 内容 |
---|---|
アクション名 | getPaymentMethod |
リクエストメソッド | POST |
2.リクエストに必要な内容
項目名 | 内容 | 入力例 | 備考 |
---|---|---|---|
subscriptionContactId | 定期購買ID | gid://shopify/SubscriptionContract/xxxxxxxxxxx |
3.レスポンス内容
■正常時レスポンス
プロパティ | 型 | 説明 |
---|---|---|
customerPaymentMethod | customerPaymentMethod | null | 決済情報 |
L type | string | null | 支払い方法種別 下記のいずれか ・CustomerCreaditCard ・CustomerPaypalBillingAgreement ・CustomerShopPayAgreement |
L brand | string | null | クレカブランド名 |
L lastDigits | string | null | クレカ番号の末尾4桁 |
L maskedNumber | string | null | 末尾4桁の前がマスクされたクレカ番号 |
L name | string | null | クレカ名義 |
L expiryMonth | number | null | 有効期限(月) |
L expiryYear | number | null | 有効期限(年) |
L inactive | boolean | null | 無効フラグ |
L paypalAcountEmail | string | null | Paypalメールアドレス |
※ 決済方法によって返却されるレスポンスが異なります。
■参考情報(Shopifyにおける支払い方法の取り扱いについて)
(1)Shopify Payment(クレジットカード)による支払いの場合
上記の通り、下4桁のカード番号に加え、期限や名前などの情報が返却されます。
(Google Payはクレジットカードと同じ取り扱いとなるため、上記と同じく返却されます)
(2)Shopify Payment(クレジットカード)以外の支払いの場合
- Shop Pay
- PayPal Express
など
4.補足情報
■返却パターン
(1)クレジットカード(type=CustomerCreaditCard)の場合、以下のプロパティに値が入る
- brand
- lastDigits
- maskedNumber
- name
- expiryMonth
- expiryYear
(2)Paypal(type=CustomerPaypalBillingAgreement)の場合、以下のプロパティに値が入る
- inactive
- paypalAccountEmail
(3)ShopPay(type=CustomerShopPayAgreement)の場合、以下のプロパティに値が入る
- expiryMonth
- expiryYear
- inactive
(4)customerPaymentMethod = null または、customerPaymentMethod.type = null
※既存の支払い方法に対して、同期バッチを実施した際に、Shopifyのデータを取得できなかったデータとなります