決済情報取得

1.基本情報


指定された定期購買IDの決済情報を取得する。
※1 定期購買アプリではクレジットカード番号全ては管理しておりません。下4桁のみの返却となります。
 
項目名内容
アクション名getPaymentMethod
リクエストメソッドPOST

2.リクエストに必要な内容


項目名内容入力例備考
subscriptionContactId定期購買IDgid://shopify/SubscriptionContract/xxxxxxxxxxx

3.レスポンス内容


 
■正常時レスポンス
プロパティ説明
customerPaymentMethodcustomerPaymentMethod | null決済情報
L typestring | null支払い方法種別 下記のいずれか ・CustomerCreaditCard ・CustomerPaypalBillingAgreement ・CustomerShopPayAgreement
L brandstring | nullクレカブランド名
L lastDigitsstring | nullクレカ番号の末尾4桁
L maskedNumberstring | null末尾4桁の前がマスクされたクレカ番号
L namestring | nullクレカ名義
L expiryMonthnumber | null有効期限(月)
L expiryYearnumber | null有効期限(年)
L inactiveboolean | null無効フラグ
L paypalAcountEmailstring | nullPaypalメールアドレス
 
※ 決済方法によって返却されるレスポンスが異なります。
■参考情報(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のデータを取得できなかったデータとなります