this is the code from stripe
{
“client_reference_id”: “MYBL633A8664BE14E”,
“line_items”: {
“0”: {
“price_data”: {
“unit_amount”: “9900”,
“currency”: “USD”,
“product_data”: {
“name”: “My Blog Order# MYBL633A8664BE14E”
}
},
“description”: “Purchasing from Zion Supreme | My Blog Order# MYBL633A8664BE14E”,
“quantity”: “1”
}
},
“cancel_url”: “https://zionsupreme.com/cart/”,
“customer_email”: “laurentvienne@icloud.com”,
“mode”: “payment”,
“success_url”: “https://zionsupreme.com/purchases/?MYBL633A8664BE14E”,
“payment_method_types”: {
“0”: “card”
}
}
Response body
{
“error”: {
“message”: “You cannot use line_items.amount
, line_items.currency
, line_items.name
, line_items.description
, or line_items.images
in this API version. Please use line_items.price
or line_items.price_data
. Please see https://stripe.com/docs/payments/checkout/migrating-prices for more information.”,
“type”: “invalid_request_error”
}
}
Request POST body
{
“client_reference_id”: “MYBL633A8664BE14E”,
“line_items”: {
“0”: {
“price_data”: {
“unit_amount”: “9900”,
“currency”: “USD”,
“product_data”: {
“name”: “My Blog Order# MYBL633A8664BE14E”
}
},
“description”: “Purchasing from Zion Supreme | My Blog Order# MYBL633A8664BE14E”,
“quantity”: “1”
}
},
“cancel_url”: “https://zionsupreme.com/cart/”,
“customer_email”: “laurentvienne@icloud.com”,
“mode”: “payment”,
“success_url”: “https://zionsupreme.com/purchases/?MYBL633A8664BE14E”,
“payment_method_types”: {
“0”: “card”
}
}