Issue
I am using strip payment gateway for checkout/session api
curl https://api.stripe.com/v1/checkout/sessions \
-u sk_test_123: \
-d success_url="https://google.com/success" \
-d cancel_url="https://yahoo.com/cancel" \
-d "line_items[0][price_data][currency]"=USD \
-d "line_items[0][price_data][product_data][name]"=ABC \
-d "line_items[0][price_data][unit_amount]"=150 \
-d "line_items[0][quantity]"=1 \
-d mode=payment
can i set any parameter or identifiers manually in this which I will received in success strip web-hooks ?
Solution
curl https://api.stripe.com/v1/checkout/sessions \
-u sk_test_123: \
-d success_url="https://google.com/success" \
-d cancel_url="https://yahoo.com/cancel" \
-d "line_items[0][price_data][currency]"=USD \
-d "line_items[0][price_data][product_data][name]"=ABC \
-d "line_items[0][price_data][unit_amount]"=150 \
-d "line_items[0][quantity]"=1 \
-d "metadata[order_id]"=waybill \
-d mode=payment
You can set metadata and you will received it in checkout.session.completed
Answered By - Jaskaran singh Rajal Answer Checked By - David Goodson (WPSolving Volunteer)