Provider guide

Braintree

Integration notes, required parameters, test details and example requests for integrating Braintree with the Revo PCI platform.

At a glance
3
Supported transaction types

Supported modes
SALE, TOKEN, TOKENSALE
Testing

Test card details

Card Number:
4444333322221111
Expiry Date:
0531
CVV:
123

Braintree have more test cards which can be found here.

Overview

Integration requirements

Required parameters

transactionType

'SALE' is supported which will take a payment from the requested card.

'TOKEN' is supported which is for tokenising the card details for use later.

'TOKENSALE' is supported for taking a payment with an existing token.

publicKey
This is provided by Braintree.
privateKey
This is provided by Braintree.
Transactions

Supported transaction types

Required parameters

amount
Always has to be a whole number, for example £2 is 200. This is true if your exponent is set to '2' for GBP

Optional parameters

addressLine1
First line of address for the card holder.
region
Region for the card holder.
postalCode
Postcode for the card holder.
firstname
First name of the customer.
lastName
Last name of the customer.
cardHolderName
Name as it appears on the card.
email
Email address of the card holder.
phoneNumber
Phone number of the card holder.

Braintree may support other parameters not currently integrated into the PCI platform, more information can be found here, if you would like any integrated please contact us.

Required parameters

No extra parameters are required by the TOKEN transactionType.

Required parameters

token
Id of the payment method to use.
amount
Always has to be a whole number, for example £2 is 200. This is true if your exponent is set to '2' for GBP

Optional parameters

validate
Whether to run validations on credit card fields.
addressLine1
Full name of the receiver.
region
First line of address for the receiver.
postalCode
Second line of address for the receiver.
firstname
First name of the customer.
lastName
Last name of the customer.
cardHolderName
Name as it appears on the card.
email
Email address of the card holder.
phoneNumber
Phone number of the card holder.

Braintree may support other parameters not currently integrated into the PCI platform, more information can be found here, if you would like any integrated please contact us.

Reference

Example request

cURL exampleAPI request
curl --location 'https://api.revopci.co.uk/' \
                    --header 'X-Session;' \
                    --header 'X-Auth;' \
                    --header 'Content-Type: application/json' \
                    --data '{
                    "provider": "braintree",
                    "mode": "test",
                    "method": "payment",
                    "parameters":
                    {
                    "transactionType": "SALE" or "TOKEN" or "TOKENSALE",
                    "publicKey": "",
                    "privateKey": ""

                    //SALE
                    "amount": "200",
                    "addressLine1": "123 Test Street",
                    "region": "Test",
                    "postalCode": "SANTA1",
                    "firstName": "Test",
                    "lastName": "Test",
                    "cardHolderName": "Test Test",
                    "email": "test@test.com",
                    "phoneNumber": "07123456789"

                    //TOKEN
                    "addressLine1": "123 Test Street",
                    "region": "Test",
                    "postalCode": "SANTA1",
                    "firstName": "Test",
                    "lastName": "Test",
                    "cardHolderName": "Test Test",
                    "email": "test@test.com",
                    "phoneNumber": "07123456789"

                    //TOKENSALE
                    "token": "00000000-0000-0000-0000-000000000000",
                    "amount": "200",
                    "addressLine1": "123 Test Street",
                    "region": "Test",
                    "postalCode": "SANTA1",
                    "firstName": "Test",
                    "lastName": "Test",
                    "cardHolderName": "Test Test",
                    "email": "test@test.com",
                    "phoneNumber": "07123456789"
                    }
                    }'