Guest BBAP / Remedial BBAP
Guest BBAP and Remedial BBAP is another way to provide Amazon Pay to buyers.
Guest BBAP
Guest BBAP saves the buyer who is about to drop from standard checkout flow due to complicated input forms. When BBAP is implemented on EC site, Amazon Pay popup is rendered on the page immediately or after certain period (duration can be set by merchant, or with buyer’s behavior as a trigger) and buyer can use Amazon Pay to skip the input form and continue purchasing journey with Amazon Pay. It helps reducing number of buyers drop from EC site at this point.
Remedial BBAP
Remedial BBAP saves the buyer who is about to give up to pay with credit card because of Authorization failure by taking buyer to Amazon Pay checkout with the higher Authorization success rate. Some merchants have high rates of authorization failures with other payment methods. In such case, merchant can implement Remedial BBAP which pops up on the page to introduce Amazon Pay as an alternative payment method to such declined buyers. Some merchants struggle with too high authorization decline rate while they believe many of them are false positive. To save those false positive, merchant can use this feature.
Remedial BBAP + APB
Remedial BBAP + PayOnly
How to implement Guest/Remedial BBAP
- Download the sample code from amazonPayAssist.js, and save it in your repositry.
- Customize the popup design and display logic with BBAP customization tool, and get sample javascript code generated specifically for your site.
- Add javascript (you get in #2) on your site.
Please see more detail in FAQ.
Ref (only available in Japanese): FAQ - How to integrate Guest BBAP / Remedial BBAP
Button rendering script
Each BBAP button rendering script will be generated via BBAP customization tool in principle.
Below is sample rendering scripts for your reference.
BBAP rendering script sample
<body>
<div id="AmazonPayButton"></div>
<script type="text/javascript" src="amazonpayAssist.js"></script>
<script src="https://static-fe.payments-amazon.com/checkout.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" charset="utf-8">
//javascript to generate popup
amazonpayAssist('AmazonPayButton', {
type: "form",
color: "green"
}).fadeIn(1);
amazon.Pay.renderButton('#AmazonPayButton', {
// set checkout environment
merchantId: 'xxxxxx', //(Required) Please input your merchantId*1
ledgerCurrency: 'JPY', //(Required) Please set JPY in case of Japan
sandbox: true, // (Optional) If you test in Sandbox, please set it true
checkoutLanguage: 'ja_JP', //(Required) Please et ja_JP in case of Japan
productType: 'PayAndShip', //(Required) Please refer to product type detail*2
placement: 'Cart', //(Required) Please refer to placement detail*3
buttonColor: 'Gold', //(Required) Please refer to buttonColor detail*4
createCheckoutSessionConfig: {
payloadJSON: {
"webCheckoutDetails": {
"checkoutReviewReturnUrl": "https://a.com/merchant-review-page" //(Required) Please input your order review page URL
},
"storeId": "amzn1.application-oa2-client.xxxxxxx", //(Required) Please input your storeId*1
"scopes": ["name", "email", "phoneNumber", "billingAddress"], //(Optional) Please input scopes as you need such buyer information
"deliverySpecifications": { //(Optional) Please refer to deliverySpecifications detail*5
"addressRestrictions": {
"type": "Allowed",
"restrictions": {
"JP": {
"statesOrRegions" : ["東京都"],
"zipCodes": ["1530064"]
}
}
}
}
},
signature: 'xxxx', //(Required) Please input payload signature*6
publicKeyId: 'xxxxxxxxxx' //(Required) Please input your publicKeyId*7
}
});
</script>
</body>
- *1: FAQ - How to get Store ID(storeId) and Merchant ID (merchant id)
- *2: productType detail
- *3: placement detail
- *4: buttonColor detail
- *5: deliverySpecification detail
- *6: payload signature
- *7: FAQ - How to get PublicKeyId and Private Key
Remedial BBAP rendering script APB sample
<body>
<div id="AmazonPayButton"></div>
<script type="text/javascript" src="amazonpayAssist.js"></script>
<script src="https://static-fe.payments-amazon.com/checkout.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" charset="utf-8">
//javascript to generate popup
amazonpayAssist('AmazonPayButton', {
type: "card",
color: "blue"
}).fadeIn(1);
amazon.Pay.renderButton('#AmazonPayButton', {
// set checkout environment
merchantId: 'xxxxxx', //(Required) Please input your merchantId*1,
ledgerCurrency: 'JPY', //(Required) Please set JPY in case of Japan
sandbox: true, //(Optional) If you test in Sandbox, please set it true
checkoutLanguage: 'ja_JP', //(Required) Please set ja_JP in case of Japan
productType: 'PayAndShip', //(Required) Please refer to product type detail*2
placement: 'Checkout', //(Required) Please refer to placement detail*3
buttonColor: 'Gold', //(Required) Please refer to buttonColor detail*4
createCheckoutSessionConfig: {
payloadJSON: {
"webCheckoutDetails": {
"checkoutResultReturnUrl": "https://a.com/merchant-result-page", //(Required) Please input your order result page URL
"checkoutMode": "ProcessOrder" //(Required) This is a flag for APB
},
"storeId": "amzn1.application-oa2-client.xxxxxx", //(Required) Please input your storeId*1
"scopes": ["name", "email", "phoneNumber", "billingAddress"], //(Optional) Please input scopes as you need such buyer information
"paymentDetails": { //(Required in case of APB) Please refer to paymentDetails detail*5
"paymentIntent": "AuthorizeWithCapture",
"chargeAmount": {
"amount": "9000",
"currencyCode": "JPY"
}
},
"merchantMetadata": { //(Optional) Please refer to merchantMetadata detail*6
"merchantReferenceId":"Merchant-order-123",
"merchantStoreName":"Merchant Store Name",
"noteToBuyer":"Thank you for your order"
},
"addressDetails": { //(Required in case of APB - PayAndShip) Please refer to addressDetails detail*7
"name": "Paul Smith",
"addressLine1": "Meguro-ku, Shimomeguro 1-8-1",
"stateOrRegion": "Tokyo",
"postalCode": "153-0064",
"countryCode": "JP",
"phoneNumber": "0333333333"
}
},
signature: 'xxxx', //(Required) Please input payload signature*6
publicKeyId: 'xxxxxxxxxx' //(Required) Please input your publicKeyId*7
}
});
</script>
</body>
- *1: FAQ - How to get Store ID(storeId) and Merchant ID (merchant id)
- *2: productType detail
- *3: placement detail
- *4: buttonColor detail
- *5: paymentDetails detail
- *6: merchantMetadata detail
- *7: addressDetails
- *8: payload signature
- *9: FAQ - How to get PublicKeyId and Private Key
- *10: chargePermissionType detail
- *11: recurringMetaData detail
Remedial BBAP rendering script PayOnly sample
<body>
<div id="AmazonPayButton"></div>
<script type="text/javascript" src="amazonpayAssist.js"></script>
<script src="https://static-fe.payments-amazon.com/checkout.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" charset="utf-8">
//javascript to generate popup
amazonpayAssist('AmazonPayButton', {
type: "card",
color: "blue"
}).fadeIn(1);
amazon.Pay.renderButton('#AmazonPayButton', {
// set checkout environment
merchantId: 'xxxxxx', //(Required) Please input your merchantId*1
ledgerCurrency: 'JPY', //(Required) Please set JPY in case of Japan
sandbox: true, // (Optional) If you test in Sandbox, please set it true
checkoutLanguage: 'ja_JP', //(Required) Please set ja_JP in case of Japan
productType: 'PayOnly', //(Required) Please refer to product type detail*2
placement: 'Cart', //(Required) Please refer to placement detail*3
buttonColor: 'Gold', //(Required) Please refer to buttonColor detail*4
createCheckoutSessionConfig: {
payloadJSON: {
"webCheckoutDetails": {
"checkoutReviewReturnUrl": "https://a.com/merchant-review-page" //(Required) Please input your order review page URL
},
"storeId": "amzn1.application-oa2-client.xxxxxxx", //(Required) Please input your storeId*1
"scopes": ["name", "email", "phoneNumber", "billingAddress"], //(Optional) Please input scopes as you need such buyer information
},
signature: 'xxxx', //(Required) Please input payload signature*6
publicKeyId: 'xxxxxxxxxx' //(Required) Please input your publicKeyId*7
}
});
</script>
</body>
- *1: FAQ - How to get Store ID(storeId) and Merchant ID (merchant id)
- *2: productType detail
- *3: placement detail
- *4: buttonColor detail
- *5: deliverySpecification detail
- *6: payload signature
- *7: FAQ - How to get PublicKeyId and Private Key