A transaction can be authorized after a checkout is completed. The authorization status confirms that Bread has approved a loan for the amount and items and guarantees payment once the customer’s order is fulfilled. Only pending transactions can be authorized.

It’s advised to confirm the Bread transaction amount against your expected transaction total prior to making the authorize call. Additionally, if you include a merchantOrderId in your authorize call, the Bread transaction will be updated with your system generated order ID.

ArgumentsDescriptionRequiredLocation
:tx-idIdentifier of the transaction to be retrievedYesRequest Parameter
type"authorize" should be the value of the type provided in the request bodyYesRequest Body
lineItemsArray of line item types you want to associate with the authorizationNoRequest Body
merchantOrderIdUnique identifier from your system to match to the Bread transaction ID. This is recommended for easier financial reconciliation and to troubleshoot any customer support issuesNoRequest Body
POST https://api.getbread.com/transactions/actions/:tx-id
curl -u <api-key>:<secret-key> -X POST \
 -H 'Content-Type: application/json' \
 https://api.getbread.com/transactions/actions/caf8afac-1a6f-4f55-a6d8-fd46763e8cb3 \
 -d = '{"lineItems": [{"price": 4000,"product": {"detailUrl": "http://your-site.com/your-product","imageUrl": "http://our-bucket.s3.amazon.com/your-product-img.jpg","name": "Your cool product","sku": "coolproductsku"},"quantity": 1}],"merchantOrderId": "12345", "type": "authorize"}'

Remainder-pay Decline Error

Occasionally remainder-pay transactions will fail to authorize because the credit card portion of the transaction was declined. In these cases, the Bread API will respond with a 500 status code and include a description indicating an issue with authorizing the credit card portion of the transaction.

Example Error Response:

{
    "description": "There's an issue with authorizing the credit card portion of this transaction due to this reason: \"Charge was declined - This card could not be charged.\" Please have the customer reach out to the bank. Once the transaction is approved by the bank, try reauthorizing in 1-3 business days.",
    "error": true,
    "type": "INTERNAL_ERROR"
}

We recommend checking for this edge case when receiving a non-200 response from an authorize request. The recommended course of action is to automatically cancel the Bread transaction and return an error to the customer. The customer should either contact their credit card issuer to remove the hold or try using another credit card before checking out again.