How can I purchase a specific product directly without using the cart?
You can use the order_products parameter to purchase a product directly without using the cart feature.
Use this feature when you assume that customers will not purchase multiple products at once, such as with paid membership products.
How to use
Use the regular ECOrder:purchase API.
Sample request
Pattern 1 (multiple items)
{
"order_products": [
{
"product_id": 12345,
"quantity": 1
},
{
"product_id": 12345,
"quantity": 2
}
],
"ec_payment_id": XXX
}
Pattern 2 (single item)
{
"product_id": 12345,
"quantity": 1,
"ec_payment_id": XXX
}
There is no need to specify cart_id.
Support
If you have any other questions, please contact us or check out Our Slack Community.