Describe the bug
Per the Headless Docs, the /payment-information endpoint is used to retrieve the /paymentMethods from Adyen. If you do not first add an item to the cart, ApplePay is missing. Looking at the Adyen API Logs, this appears to be because no amount field is passed until an item exists in the cart.
// example request without item in cart in API logs
{
"channel" : "Web",
"merchantAccount" : "XXXX",
"countryCode" : "US",
"shopperLocale" : "en_US",
"amount" : {
"currency" : "USD"
}
}
// example request with item in cart in API logs
{
"channel" : "Web",
"merchantAccount" : "XXXX",
"countryCode" : "US",
"shopperLocale" : "en_US",
"amount" : {
"currency" : "USD",
"value" : 5200
}
}
To Reproducecurl -X POST https://dev.nexusbox-server.dev/rest/default/V1/guest-cartscurl -X POST https:/dev.nexusbox-server.dev/rest/default/V1/guest-carts/D87vy9KEMQbup2KfhScV6VZwkUH4sGt3/payment-information
Expected behavior
Our Headless flow shows ApplePay availability to users up front; my expectation is that a default amount: 0 should be passed from payment-information so we can see all payment methods without having to first add an item.
Magento version
Adobe Commerce ver. 2.4.6-p3
Plugin version
9.0.2
Additional context
We are building a headless flow. Our business: dispatch.co
Describe the bug Per the Headless Docs, the
/payment-information
endpoint is used to retrieve the/paymentMethods
from Adyen. If you do not first add an item to the cart, ApplePay is missing. Looking at the Adyen API Logs, this appears to be because noamount
field is passed until an item exists in the cart.To Reproduce
curl -X POST https://dev.nexusbox-server.dev/rest/default/V1/guest-carts
curl -X POST https:/dev.nexusbox-server.dev/rest/default/V1/guest-carts/D87vy9KEMQbup2KfhScV6VZwkUH4sGt3/payment-information
When I add an item to the cart and retry
Expected behavior Our Headless flow shows ApplePay availability to users up front; my expectation is that a default
amount: 0
should be passed frompayment-information
so we can see all payment methods without having to first add an item.Magento version Adobe Commerce ver. 2.4.6-p3
Plugin version 9.0.2
Additional context We are building a headless flow. Our business: dispatch.co