Amazon Pay APB パラメータテスト

checkoutMode: ProcessOrder 固定の APB (AdditionalPaymentButton / 今すぐ支払う) フロー。 環境: JP / SANDBOX / publicKeyId: SANDBOX-AFF7FDE62V2LAJ26UCGN7IES  |  トップへ

1. ボタンレンダーパラメータ (amazon.Pay.renderButton)
placement *
productType
buttonColor
ledgerCurrency *
checkoutLanguage
sandbox1=SANDBOX / 0=LIVE。鍵の環境と一致させること
design空欄で未指定(例: C0002)

SignIn は APB 非対応のため選択肢から除外。ボタンサイズはコンテナ要素を継承します。

2. webCheckoutDetails
checkoutMode *ProcessOrderAPB のため固定
checkoutResultReturnUrl *
checkoutCancelUrl

https 必須。セラーセントラルに登録済みドメインのみ有効。不正な値は既定値へ戻します。

3. paymentDetails / chargePermissionType
chargePermissionType
paymentIntent *
chargeAmount *
totalOrderAmount空欄で未指定
presentmentCurrencyEU/UK のみ
softDescriptor
canHandlePendingAuthorization
allowOvercharge
extendExpiration
recurringMetadatachargePermissionType=Recurring のときのみ送信
frequency.unit frequency.value amount
4. scopes / merchantMetadata / storeId
storeId *amzn1.application-oa2-client.e829edbd28d44d48a27ede38feff09dc.env より
scopes
merchantMetadata
merchantReferenceId
merchantStoreName
noteToBuyer
customInformation
productType をペイロードにも入れる
5. addressDetails (productType=PayAndShip のとき必須)
送信する
name
addressLine1
addressLine2
addressLine3
city stateOrRegion
postalCode countryCode
phoneNumber

JP は addressLine1 に「市区町村+丁目番地」、city に都道府県を入れる運用。PayOnly 選択時はペイロードから自動的に除外されます。

6. deliverySpecifications
送信する
addressRestrictions.type
対象国コードカンマ/空白区切り (例: JP, US)
specialRestrictions
7. structuredSupplementaryData (QA-789 ドラフト / JP 開発中)
送信する
buyerMetadata
version
isFirstTimeCustomer
numberOfPastPurchases
numberOfDisputedPurchases
hasPastDisputePurchases
isBuyerTrusted
riskScore0.0〜1.0
languagelanguage-LOCALE 形式
browserOrApp
recipientEmailMatches
buyerIsATraveler
userAgent
pickupAddress
  addressLine1
  addressLine2
  postalCode / city
  countryCode
orderMetadata
version
numberOfItems
cartContent
orderType
orderTrackingNumber
expectedDaysToShip0=当日出荷
isDeliveryEmailSameAsAmazon
relatedOrderReferenceId
itemMetadata
形式
versionobject 形式のときのみ使用
items[0] itemId / description
items[1] itemId / description
items[2] itemId / description

ドラフト仕様では項目表 (version + items) と JSON 例 (配列直書き) が食い違っているため両形式を選べます。

transportationMetadata
version
startDateTimeZulu 形式
startPoint / endPoint
lengthOfEvent
isBuyerIncluded
numberOfPassengers

本機能は JP リージョンで開発中のドラフト仕様です。導入には Amazon Pay 担当者 (SA/Sales) との事前調整が必要で、 連携項目はリスクチームが個別に選定します。全項目 Optional のため「未設定」はペイロードから除外されます。

APB は Create Checkout Session API では実行できません(checkoutMode は API では UnrecognizedField になります)。SDK で署名したペイロードを createCheckoutSessionConfig に渡してボタンをレンダーする経路のみが有効なため、 ペイロードの検証は実際にボタンを押して確認してください。

Amazon Pay ボタン

ボタンをクリックすると Amazon Pay ホストページへ遷移し、「今すぐ支払う」で決済後 https://mofuzon.com/apbTest.php に戻ります。

署名対象ペイロード (1436 bytes)
{
    "webCheckoutDetails": {
        "checkoutResultReturnUrl": "https://mofuzon.com/apbTest.php",
        "checkoutMode": "ProcessOrder"
    },
    "storeId": "amzn1.application-oa2-client.e829edbd28d44d48a27ede38feff09dc",
    "productType": "PayAndShip",
    "scopes": [
        "name",
        "email",
        "phoneNumber",
        "billingAddress"
    ],
    "chargePermissionType": "OneTime",
    "paymentDetails": {
        "paymentIntent": "Authorize",
        "canHandlePendingAuthorization": false,
        "chargeAmount": {
            "amount": "1000",
            "currencyCode": "JPY"
        }
    },
    "merchantMetadata": {
        "merchantReferenceId": "APBTEST-CDFA47EF4CF7A19B",
        "merchantStoreName": "Mofuzon.com",
        "noteToBuyer": "APBテスト注文"
    },
    "addressDetails": {
        "name": "山田 太郎",
        "addressLine1": "目黒区下目黒1-8-1",
        "addressLine2": "アルコタワー",
        "city": "東京都",
        "postalCode": "153-0064",
        "countryCode": "JP",
        "phoneNumber": "08000000000"
    },
    "structuredSupplementaryData": {
        "buyerMetadata": {
            "version": 1,
            "isFirstTimeCustomer": true,
            "numberOfPastPurchases": 0,
            "numberOfDisputedPurchases": 0,
            "hasPastDisputePurchases": false,
            "riskScore": 0.1,
            "userAgent": "Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)",
            "language": "ja-JP",
            "browserOrApp": "WebBrowser"
        },
        "orderMetadata": {
            "version": 1,
            "numberOfItems": 1,
            "cartContent": "Physical",
            "orderType": "Standard",
            "expectedDaysToShip": 1
        },
        "itemMetadata": [
            {
                "itemId": "ITEM-001",
                "description": "Tシャツ Mサイズ"
            }
        ]
    }
}

signature: QUkEA2wGIWxu5bnjDmGnGWCsc25DiD+EmoNoz9JhcFToVcbV6R+0QOJepbIAQonWlKtQ5Tw535BhMyC81gjQz+/Ehn8J+3L7ymWrmNa7+FmM6OYaPdHRSkx9UDAUTZTOaXtPs+Ee0uJZhgJyOQmhf3RHuGMg3L01xOIDelXAaWlgTjkf6Z5JKyPQSB3dpYoGuY0oilfpBYyBlmgPNTh58rxtPMqB2e3DF9TwQ0xhDGHRTb7dw61VucDDV5dVeaSP84rezqxUvFLdFLmunwyYu6KguRpO2kyMN6HnusU42UdZf0BQRdVfxt2m863HvYYckEi9xwSPCc/I+lcluTeBBA==

署名した生の JSON 文字列(1行)
{"webCheckoutDetails":{"checkoutResultReturnUrl":"https://mofuzon.com/apbTest.php","checkoutMode":"ProcessOrder"},"storeId":"amzn1.application-oa2-client.e829edbd28d44d48a27ede38feff09dc","productType":"PayAndShip","scopes":["name","email","phoneNumber","billingAddress"],"chargePermissionType":"OneTime","paymentDetails":{"paymentIntent":"Authorize","canHandlePendingAuthorization":false,"chargeAmount":{"amount":"1000","currencyCode":"JPY"}},"merchantMetadata":{"merchantReferenceId":"APBTEST-CDFA47EF4CF7A19B","merchantStoreName":"Mofuzon.com","noteToBuyer":"APB\u30c6\u30b9\u30c8\u6ce8\u6587"},"addressDetails":{"name":"\u5c71\u7530 \u592a\u90ce","addressLine1":"\u76ee\u9ed2\u533a\u4e0b\u76ee\u9ed21-8-1","addressLine2":"\u30a2\u30eb\u30b3\u30bf\u30ef\u30fc","city":"\u6771\u4eac\u90fd","postalCode":"153-0064","countryCode":"JP","phoneNumber":"08000000000"},"structuredSupplementaryData":{"buyerMetadata":{"version":1,"isFirstTimeCustomer":true,"numberOfPastPurchases":0,"numberOfDisputedPurchases":0,"hasPastDisputePurchases":false,"riskScore":0.1,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","language":"ja-JP","browserOrApp":"WebBrowser"},"orderMetadata":{"version":1,"numberOfItems":1,"cartContent":"Physical","orderType":"Standard","expectedDaysToShip":1},"itemMetadata":[{"itemId":"ITEM-001","description":"T\u30b7\u30e3\u30c4 M\u30b5\u30a4\u30ba"}]}}
現在の設定サマリ
フローAPB (checkoutMode=ProcessOrder)
placementCheckout
productTypePayAndShip
chargePermissionTypeOneTime
paymentIntentAuthorize
chargeAmount1000 JPY
scopesname, email, phoneNumber, billingAddress
addressDetails含む
structuredSupplementaryDatabuyerMetadata, orderMetadata, itemMetadata