10. Creating Credit Cards for a Client



This section does not apply to Affiliates. If you are an affiliate please skip to Creating Orders (Affiliates).



Prerequisites

As mentioned earlier, you must have a Braintree Gateway in order to safely and securely store and charge credit/debit cards. Before attempting to charge credit cards please ensure that Ticket Evolution has completed your Braintree Gateway setup.

Testing Credit Cards in Sandbox

Test Cards

The Ticket Evolution API Sandbox connects to Braintree’s Sandbox environment so that you can test creating credit cards and purchases without having to use a real credit card or worry about incurring any charges. The Braintree Sandbox only accepts test credit card numbers, nonces, and tokens and they provide a list of different cards, nonces, and tokens that do and do not results in errors.

Link: Braintree Sandbox test credit card numbers

Test Amounts

The Braintree Sandbox utilizes different test amounts to allow you to test various scenarios such as successful and unsuccessful charges. Please review their list of test amounts to ensure you are submitting the correct order total to match your desired test situation.

Link: Braintree Sandbox test amounts

Test CVV/CID Numbers

The Braintree Sandbox utilizes different CVV/CID values in order to test different scenarios.

Link: Braintree Sandbox test CVV/CID numbers

Testing the Address Verification System

Lastly, you can test different error and success situations with the Address Verification System (AVS) by using different street addresses and zip codes for the billing address of a card.

Link: Braintree Sandbox test AVS test values

Creating a Credit Card

We recommend using the methods Braintree provides such as their Drop-in UI or Hosted Fields to retrieve either a reusable token or a single-use nonce and pass to use in way that does not require sending other credit card information through our API. The token or nonce can be include in the payments portion of the Orders / Create body.

Single-use Nonce

"payments": [ { "payment_method_nonce": "AvgRPFtHJPHpQVdNiBX5n1G8eASTrjbk", "type": "credit_card" } ],

Reusable Token

"payments": [ { "payment_method_token": "7R5kLg83", "type": "credit_card" } ],