Skip to content

Braintree Preauthorization

Afifa Bakiz edited this page May 21, 2019 · 8 revisions

The Braintree authorization flow is used to implement our preauthorization concept. The Braintree API provides TransactionRequest that can be used for the preauthorization by sending the following parameters:

Parameter Name Description
amount Braintree amount in decimal format
paymentToken PSP alias
deviceData Device data collected by client

The Braintree Transaction object will be returned in the response. If the Transaction.errors field of the returned object is empty, we can assume that the related operation is successful. Otherwise, the Transaction.status field should be checked to assess the real status of the request.

There are 2 types of errors that can be considered relevant to our preauthorization flow:

  • ValidationErrors are based on bad requests or configuration problems related to the PSP configuration.
  • SettlementErrors can be inferred from the processorSettlementResponseCode field of the returned Transaction object.
Clone this wiki locally