title: How do I use a stored payment source for a purchase in ActiveMerchant?
body: <p>I'm using ActiveMerchant with Braintree as my payment processor. I want to take advantage of Braintree's customer vault functionality to store credit card info. </p>
  
  <p>Storage goes fine, but I can't figure out the correct way to charge the credit card with the <code>customer_vault_id</code>. It seems very straight-forward according to the <a href="http://dev.braintreepaymentsolutions.com/vault/direct-post#issuingtransaction" rel="nofollow noreferrer">Braintree documentation</a>, but I'm not sure how to pass this through ActiveMerchant. I get validation errors from Braintree if I send a credit card with empty data, and errors from ActiveMerchant if I try <code>nil</code>. The only thing that seems obvious is to send the <code>customer_vault_id</code> in the <code>purchase_options</code> hash, like:</p>
  
  <pre><code>GATEWAY.purchase(self.price_in_cents, self.credit_card, 
                   :ip =&gt; self.ip_address,
                   :customer_vault_id =&gt; 12345)
  </code></pre>
  
  <p>Is this the correct way to use a stored customer vault? </p>
  
  <p>If so, what is the correct second argument for this line if I want to use a stored customer vault as payment method?</p>
  
  <p>Thanks.</p>