WC StoreAPI payment_data array
-
I am looking at using WooCommerce for a headless WordPress build coming up, and in particular the new StoreAPI to handle the cart and checkout experience.
On the official WooCommerce GitHub documentation on the attached link, they give an example of the POST request data you would need to send the endpoint to process the order. One of the parameters is a payment_data array of objects.
In their docs it states the following:
“An example of the payment data sent to the Checkout Order endpoint when using the WooCommerce Stripe Payment Gateway is shown below.”
"payment_data": [ { "key": "stripe_source", "value": "src_xxxxxxxxxxxxx" }, { "key": "billing_email", "value": "[email protected]" }, { "key": "billing_first_name", "value": "Jane" }, { "key": "billing_last_name", "value": "Doe" }, { "key": "paymentMethod", "value": "stripe" }, { "key": "paymentRequestType", "value": "cc" }, { "key": "wc-stripe-new-payment-method", "value": true } ]
“There are many payment gateways available for merchants to use, and each one will be expecting different?
payment_data
. We cannot comprehensively list all expected requests for all payment gateways, and we would recommend reaching out to the authors of the payment gateway plugins you’re working with for further information.“I am reaching out to find out from you as my preferred stripe plugin of choice what you would need within this payment_data array?
In their example, it doesn’t even include any card details or payment details so I’m not sure how this is meant to even work, using their example.
Any help and advice for this specific plugin would be greatly appreciated.
Many thanks,
PhilThe page I need help with: [log in to see the link]
- The topic ‘WC StoreAPI payment_data array’ is closed to new replies.