Documentation is still being updated. Some content maybe unfinished.
curl --request POST \
--url {protocol}://{host}/wp-json/cocart/preview/order-received/{order_id}/pay \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"order_key": "<string>",
"payment_method": "<string>",
"payment_data": [
{
"key": "wc-stripe-payment-token",
"value": "<string>"
}
]
}
'{
"success": true,
"order_id": 789,
"order_status": "processing",
"redirect_url": "https://example.com/checkout/order-received/789/?key=wc_order_abc123xyz"
}Process payment for an unpaid order (pending or failed orders)
curl --request POST \
--url {protocol}://{host}/wp-json/cocart/preview/order-received/{order_id}/pay \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"order_key": "<string>",
"payment_method": "<string>",
"payment_data": [
{
"key": "wc-stripe-payment-token",
"value": "<string>"
}
]
}
'{
"success": true,
"order_id": 789,
"order_status": "processing",
"redirect_url": "https://example.com/checkout/order-received/789/?key=wc_order_abc123xyz"
}WordPress username and password
Unique identifier for the order
Payment details for the order
Was this page helpful?