title: WooCommerce REST API v2: How to process payment?
body: <p>Using the <a href="http://woothemes.github.io/woocommerce-rest-api-docs/#create-an-order" rel="noreferrer">WooCommerce REST API v2</a>, I'm successfully creating an order in a pending, unpaid state. </p>
  
  <p>I can see that I can set the <code>order.payment_details.paid</code> field to <code>true</code> which will create the order in a completed state and send out a completed order email, but it doesn't actually process the payment.</p>
  
  <p>What is the proper way using the REST API v2 to create an order and have WooCommerce process the payment using the payment gateway?</p>
  
  <p>Or do I need to add a plugin hook to the API on the server side? (I think so)</p>
  
  <p>Here's what I've tried</p>
  
  <pre><code>curl -X POST https://example.com/wc-api/v2/orders \
      -u consumer_key:consumer_secret \
      -H "Content-Type: application/json" \
      -d '{
            "order": {
              "customer_id": 2,
              "payment_details": {
                "method_id": "da_big_bank",
                "method_title": "StackOverflow Money Laundering, Inc.",
                "paid":true
              },
              "line_items": [
                {
                  "product_id": 341,
                  "quantity": 1
                }
              ]
            }
          }'
  </code></pre>
  
  <p>which, as I said, generates an order in completed state, but doesn't actually process any money with my gateway (which is not "StackOverflow Money Laundering, Inc." and is a legitimate gateway that does work when using our WooCommerce site)</p>