Bring Your Own Token

Through Bring Your Own Token (BYOT), merchants who tokenize cards with another Payment Service Provider (PSP) or who vault Network Tokens themselves can use their existing Network Tokens with Braintree.

Creating transactionsAnchorIcon

A BYOT transaction can be created using Transaction: Sale with the required network token parameters. The required parameters differ based on the type of BYOT transaction being created.

Required parametersAnchorIcon

The following parameters are always required:

For more information on what should be passed in the cryptogram field, see the "Customer Initiated Transactions" and "Merchant Initiated Transactions" fields below.

Optional parametersAnchorIcon

The following parameters are always optional:

Refer to Transaction: Sale for detailed examples and a complete listing of transaction options.

Customer initiated transactionsAnchorIcon

When creating a customer initiated transaction (CIT) or the first in a recurring series, a network-issued cryptogram is required.
  1. Ruby
result = gateway.transaction.sale( :amount => "10.00", :credit_card => { :number: => "4111111111111111", :expiration_date => "05/2027", network_tokenization_attributes => { :cryptogram => "/wAAAAAAAcb8AlGUF/1JQEkAAAA=", :token_requestor_id => "45310020105", :ecommerce_indicator => "05" } }, ) if result.success? # See result.transaction for details # result.transaction.processed_with_network_token? == true else # Handle errors end

Merchant initiated transactionsAnchorIcon

When creating a merchant initiated transaction (MIT) or subsequent transaction, a network transaction identifier (NTI) and related parameters are required. The cryptogram must still be present, but a static cryptogram value of "STATIC_RECURRING" should be included in place of a network-issued cryptogram.

Required parametersAnchorIcon

  1. Ruby
result = gateway.transaction.sale( :amount => "10.00", :transaction_source => "recurring", :credit_card => { :number: => "4111111111111111", :expiration_date => "05/2027", network_tokenization_attributes => { :token_requestor_id => "45310020105", :ecommerce_indicator => "05", :cryptogram => "STATIC_RECURRING" } }, :external_vault => { :status => "vaulted", :previous_network_transaction_id => "123456789012345" } ) if result.success? # See result.transaction for details # result.transaction.processed_with_network_token? == true else # Handle errors end