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,


1 Answer 1


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? Aug 27, 2018 at 6:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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