Skip to content

Flutter: Card payments via Stripe from a mobile app to Magento 2.4 Rest api

After having searched for asolution but found nothing I am asking here to see if anyone can help.

I have been looking at the documentation in Magento 2.4.3 and tried to understand how I make a full transaction to pay for products with a card through an integrated Stripe function in the magento server and via the Rest APIs.

Step 6, Prepare for checkout, https://developer.adobe.com/commerce/webapi/rest/tutorials/orders/order-prepare-checkout/

Step 7, Create order, https://developer.adobe.com/commerce/webapi/rest/tutorials/orders/order-create-order/

Step 8, Create an invoice, https://developer.adobe.com/commerce/webapi/rest/tutorials/orders/order-create-invoice/

Step 9, Create Shipping, https://developer.adobe.com/commerce/webapi/rest/tutorials/orders/order-create-shipment/

Where in these steps do I add a card number?
Do I need to redirect the user to the stripe page?

I have understood it is better to add a card token. How do I get this via the Magento Rest API on the server?
Where do I add the token and how will the body in that step look?

Do I need to redirect the user in the flutter screen to add their card?

Sorry, but I am a complete beginner and do not know how to do these last steps and few flutter developers seem to have this experience.

I appreciate any help and hints as this is no available information on the internet.