I working on an APIs to create mobile application, everything worked ok, now I need to pay for the mobile application using Magento 2 rest API.

how can I pay using rest API?

Is there any API available which can process payment and validate payments?

I am new to Magento, I need to pay using credit cards and debit cards using Magento default configurations.

It will be great if anyone can help,



To process the payment you can use the native API of the payment method, but you can use these methods to get the payment methods available and to place an order in Magento using the REST API.

Get Payment Method

curl -g -X GET "XXXXX_STOREURL_XXXXX/index.php/rest/V1/guest-carts/56241bf6bc084cd7589426c8754fc9c5/payment-information" \
    -H "Authorization: Bearer XXXXX_TOKEN_XXXXX" 

Place Order

curl -g -X PUT "XXXXX_STOREURL_XXXXX/index.php/rest/V1/guest-carts/56241bf6bc084cd7589426c8754fc9c5/order" \
    -H "Authorization: Bearer XXXXX_TOKEN_XXXXX" \
    -H "Content-Type:application/json" \
     -d '
    "method": {
        "method": "checkmo"
  • While we can place an order with API the store_id stored as 0. is there any way where we can pass store id for Guest? – Ketan Panchal Aug 27 '18 at 6:35

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.