Skip to content

Braintree Refund

Jovana Veskovic edited this page Jul 16, 2019 · 8 revisions

The Braintree settlement flow is used to implement our refund concept. The Braintree API provides a refund request that credits back the amount previously charged via the authorization or capture request. The following parameters are needed for this request:

Parameter Name Description
pspTransactionId Braintree transaction id
amount Amount for partial refunds

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 refund 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