1

When i trying get The Payment Methods using REST API , "rest/V1/carts/{cartId}/payment-methods" , it is returning Empty Array as a result.

I'm passing Admin Bearer Token as Authorization.

1
  • This WEB API endpoint returns only active payment methods (enabled in admin panel) and available for the specified quote. The payment method implements \Magento\Payment\Model\MethodInterface::isAvailable it should return true, also payment method should satisfy default validators like useOnCheckout, useForCountry, useForCurrency, orderTotalMinMax - some of them can be configured via Admin Panel, some in config.xml for per a payment integration.
    – joni jones
    Feb 20 '19 at 19:16
0

I am facing similar issue as of now. with guest-carta api.

https://www.example.com/rest/{store}/V1/guest- 
carts/{quote_mask_id}/payment-information

What I did is I build a wrapper api of my own and called this api to initate order and then in case if the api response is empty I am calling sql query i.e

SELECT * FROM `quote_id_mask` WHERE `masked_id` = 
'{QUOTE_KEY}'

or

SELECT * FROM `quote_id_mask` WHERE `quote_id` = 
'{QUOTE_ID_MASK}'

It will give you entityID to initiate order for payment processing.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.