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.

asked Feb 20, 2019 at 13:15
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. Commented Feb 20, 2019 at 19:16

1 Answer 1

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.

answered Apr 21, 2021 at 17:47

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.