Skip to content

Magento2.4.4 Place order using stripe payment method through REST API

From stripe sdk I am able to create payment id successfully but when call api to create order in magento2 then getting authentication error.

I am calling below API
http://localhost/xxx/rest/default/V1/carts/mine/payment-information

with below body

{
  "paymentMethod": {
        "method": "stripe_payments",
        "additional_data": {
                   "cc_stripejs_token": "pm_1LqgYeSIs8FpUNNkeMFrz05K"
        }
    },
  "billing_address": {
    "email": "[email protected]",
    "region": "New York",
    "region_id": 43,
    "region_code": "NY",
    "country_id": "US",
    "street": [
      "123 Oak Ave"
    ],
    "postcode": "10577",
    "city": "Purchase",
    "telephone": "512-555-1111",
    "firstname": "Jane",
    "lastname": "Doe"
  }
}

and getting below error

Authentication Required: pi_3LqfaVSIs8FpUNNk1KdMRl8U_secret_NsK4Xtg0SEdlO4asn2ipnQAhh