Credit cards

Learn how to integrate your solution to process credit card payments.

Request parameters

You need to include specific fields for this payment method to work correctly. Check the Purchase operation article for details on authentication, languages of the response, and basic purchase parameters such as amount and currency.

PropertyTypeMandatory?Description
TrxTokenstringYesThe token that identifies the customer’s card.
For more information about how to create the token, refer to Customers.
TargetCountryISOstringYesIndicate the destination country.
DescriptionstringYesAs acquirer requirement, send the purchase description using the following format. MerchantName+OrderId+ [merchantUrl].
Example: TestCommerce #order2572023, [testcommerce.com.br].
CustomerEmailstringYesCustomer’s email.
CustomerFirstNamestringYesCustomer’s first name.
CustomerLastNamestringYesCustomer’s last name.
CustomerDocumentTypeIdnumericYesCustomer’s document type.
Refer to the Document types table to see the possible values.
CustomerDocNumberstringYesCustomer’s Document Number.
CustomerPhoneNumberstringYesCustomer’s phone number.
CustomerBillingAddressCountrystringNoCustomer’s Country.
CustomerBillingAddressStatestringYesCustomer’s State.
Refer to states of residence to know its possible values.
CustomerBillingAddressCitystringYesCustomer’s City.
CustomerBillingAddressAddressDetailstringYesCustomer’s Address Detail.
CustomerBillingAddressPostalCodestringYesCustomer’s Postal Code. Do not include hyphens.

Request example

{
    "TrxToken": "OT__xQytfkLJWa099yCweV_bB2710dGJ_JMB4jiYpVJ8SzQ_",
    "Amount": 5000,
    "Order": "2572023",
    "Currency": "BRL",
    "Capture": true,
    "Installments": 0,
    "TargetCountryISO" : "BR",
    "Description": "TestCommerce #order2572023, [testcommerce.com.br]",
    "Customer": {
        "Email": "breno@mail.com.br",
        "FirstName": "Breno",
        "LastName": "Barbieri",
        "DocNumber": "10058494715",
        "DocumentTypeId": 24,
        "PhoneNumber": "27998764488",
        "BillingAddress": {
            "AddressDetail": "Avenida Anisio Fernandes Coelho, 661 ",
            "PostalCode": "29060670",
            "City": "Vitoria",
            "State": "ES",
            "Country": "Brasil"
        }
    }
}

Response parameters

For more information on the response parameters, please refer to the Response parameters section of the Purchase creation.

Response example

{
    "Response": {
        "PurchaseId": 1133663,
        "Created": "2023-08-31T15:42:31.105",
        "TrxToken": null,
        "Order": "2572023",
        "Transaction": {
            "TransactionID": 1152559,
            "Created": "2023-08-31T15:42:31.107",
            "AuthorizationDate": "2023-08-31T15:42:34.420",
            "TransactionStatusId": 1,
            "Status": "Approved",
            "ErrorCode": null,
            "Description": "200 PC",
            "ApprovalCode": "12345",
            "Steps": [
                {
                    "Step": "Generic External",
                    "Created": "2023-08-31T15:42:32.250",
                    "Status": "Antifraud Approved",
                    "ResponseCode": null,
                    "ResponseMessage": null,
                    "Error": null,
                    "AuthorizationCode": null,
                    "UniqueID": null,
                    "AcquirerResponseDetail": null
                },
                {
                    "Step": "Generic step for microservices",
                    "Created": "2023-08-31T15:42:34.380",
                    "Status": "Authorization OK",
                    "ResponseCode": "200",
                    "ResponseMessage": "PC",
                    "Error": null,
                    "AuthorizationCode": "12345",
                    "UniqueID": null,
                    "AcquirerResponseDetail": "{\"order\":\"1133663\",\"order_status\":\"PC\",\"authorization_code\":\"12345\",\"error_code\":null}"
                }
            ]
        },
        "Capture": true,
        "Amount": 5000,
        "OriginalAmount": 5000,
        "TaxableAmount": 0,
        "Tip": 0,
        "Installments": 1,
        "Currency": "BRL",
        "Description": "TestCommerce #order2572023, [testcommerce.com.br]",
        "Customer": {
            "CustomerId": 250580,
            "Created": "2023-08-31T15:42:21.197",
            "CommerceCustomerId": null,
            "Owner": "Anonymous",
            "Email": "breno@mail.com.br",
            "Enabled": true,
            "ShippingAddress": null,
            "BillingAddress": {
                "AddressId": 374311,
                "AddressType": 2,
                "Country": "Brasil",
                "State": "ES",
                "AddressDetail": "Avenida Anisio Fernandes Coelho, 661 ",
                "PostalCode": "29060670",
                "City": "Vitoria"
            },
            "Plans": null,
            "AdditionalData": null,
            "PaymentProfiles": [
                {
                    "PaymentProfileId": 255321,
                    "PaymentMediaId": 1,
                    "Created": "2023-08-31T15:42:21.197",
                    "LastUpdate": null,
                    "Brand": "VISA",
                    "CardOwner": "Bruno Rugeiro",
                    "Bin": "498412",
                    "IssuerBank": "Visa",
                    "Installments": "1;2;3;4;5;6;7;8;9;10;11;12;13;14;15;16;17;18;19;20;21;22;23;24",
                    "Type": "CreditCard",
                    "IdCommerceToken": 0,
                    "Token": null,
                    "Expiration": "202912",
                    "Last4": "1234",
                    "Enabled": null,
                    "DocumentNumber": null,
                    "DocumentTypeId": null,
                    "ExternalValue": null,
                    "AffinityGroup": null
                }
            ],
            "CaptureURL": null,
            "UniqueID": null,
            "URL": "https://api.stage.bamboopayment.com/Customer/250580",
            "FirstName": "Breno",
            "LastName": "Barbieri",
            "DocNumber": "10058494715",
            "DocumentTypeId": 24,
            "PhoneNumber": "27998764488",
            "ExternalValue": null
        },
        "RefundList": null,
        "PlanID": null,
        "UniqueID": null,
        "AdditionalData": null,
        "CustomerUserAgent": null,
        "CustomerIP": null,
        "URL": "https://api.stage.bamboopayment.com/Purchase/1133663",
        "DataUY": {
            "IsFinalConsumer": false,
            "Invoice": null,
            "TaxableAmount": 0
        },
        "DataDO": {
            "Invoice": null,
            "Tax": 0
        },
        "Acquirer": {
            "AcquirerID": 70,
            "Name": "PagBrasil",
            "CommerceNumber": null
        },
        "CommerceAction": null,
        "PurchasePaymentProfileId": 255321,
        "LoyaltyPlan": null,
        "DeviceFingerprintId": null,
        "MetadataIn": null,
        "MetadataOut": null,
        "CrossBorderData": null,
        "CrossBorderDataResponse": {
            "TargetCountryISO": "BR",
            "TargetCurrencyISO": "BRL",
            "TargetAmount": 50
        },
        "Redirection": null,
        "IsFirstRecurrentPurchase": false,
        "AntifraudData": {
            "AntifraudFingerprintId": null,
            "AntifraudMetadataIn": null
        },
        "PaymentMediaId": null,
        "PurchaseType": 1,
        "HasCvv": null,
        "TargetCountryISO": null
    },
    "Errors": []
}

Testing cards

Use the following cards to simulate the different status of the purchase.

BrandPANCVVExpiration Date
Mastercard555566667777888412312/29
Visa498412341234123412312/29
Diners3011112222333112312/29
Amex376411112222331123412/29
Hipercard606211112222333912312/29
Elo636297000045701312312/29
footer
Last modified June 24, 2024

© Bamboo | All rights reserved 2024