NAV
php java ruby python
  • Overview
  • Checkout API
  • Notification
  • Search API
  • Refund API
  • Payment Methods Available by Country
  • Sandbox Environment
  • Errors
  • Overview

    Welcome to the BoaCompra's Checkout API reference guide.

    This document contains the basic concepts and technical details to pay for transactions using our Checkout API for countries that we have available. It also has practical examples of requests and pertinent notes on how our API works.


    Concepts and Terms

    List with the main definitions and standards that developers may need to successfully integrate with BoaCompra's Checkout API.

    Term Concept
    API Application Programming Interface (API) is a way to allow third parties to use your application's resources.
    REST Representational State Transfer (REST) ​​is a style of software architecture for API services.
    HTTPS Hypertext Transfer Protocol Secure (HTTPS) is the secure version of HTTP, which is the main protocol used to send data between a web browser and a website. HTTPS is encrypted to increase data transfer security.
    cURL cURL is a computer software tool for transferring data using various network protocols.
    JSON JavaScript Object Notation (JSON) is a lightweight data interchange format.
    TLD Top-Level Domain is the last segment of your domain name, that element located after the last dot. Since it is at the end of the address, it is also known as the domain suffix.
    Sandbox Safe dummy domain beyond production, suitable for a smooth integration experience.
    Merchant Person or organization that provides work or supplies goods for a particular niche.
    Store Store or commercial establishment used in the integration.
    Customer Person or organization that makes the payment, for work performed or goods received.
    transaction-code Transaction code is generated by BoaCompra after the completion of a payment request. This code is returned through the Notify API.
    checkout-code BoaCompra generated code to identify the Checkout created by the request.
    OBT Offline bank transfer (OBT), in this method the buyer receives a reference number during the payment process. They will be able to complete the purchase through their internet banking, or directly at a bank service station, informing the reference number or payment details to complete the transaction, in which case the authorization is not immediate.
    EFT Real-Time transfer\Electronic Funds Transfer(EFT). In this method the customer pays using some of the bank's online functionality, like internet banking. In most cases payment authorization is immediate.
    prepay The buyer must be in possession of or purchase a card/voucher before initiating a transaction. These cards are generally not associated with acquisitions and authorization is usually immediate. Most prepay products have a fund limit and some do not allow multiple cards/vouchers to move a single transaction.
    postpay When the shopper makes an online transaction and pays later at an affiliated network of stores or a banking network. These are usually methods that allow payment in cash.
    e-wallet e-Wallet is an electronic device, online service, or software program that allows one party to make electronic transactions with another party bartering digital currency units for goods and services. This can include purchasing items on-line with a computer or using a smartphone to purchase something at a store.

    Considerations

    Checkout API uses REST architecture. The protocol used is HTTPS. BoaCompra Checkout’s API uses the Basic Authentication The API’s requests and responses bodies are in JSON format.

    Onboarding

    Merchant who wants to transact with BoaCompra must contact our sales team through the website: https://boacompra.com/get-in-touch/contact-form.

    Credentials

    To carry out the authentication process, the Merchant needs the credentials (Merchant ID and Password) made available in its registration with BoaCompra, through the page: https://myaccount.boacompra.com.

    Environments

    Sandbox

    Test environment available to assist in the development of the integration and simulate transaction requests and status changes available on the platform. Attention: the environment only simulates the creation of a transaction.

    Base URL: https://api.sandbox.boacompra.com

    All transactions generated in the sandbox environment can be manipulated manually by developers to simulate the possible situations that BoaCompra returns through the site: https://billing-partner.boacompra.com

    In the Sandbox Environment section we explain how to use the sandbox environment.

    Production

    Environment used to create transactions in real time. All transactions generated in this environment will be processed by BoaCompra.

    Base URL: https://api.boacompra.com

    Authentication

    All requests made to the BoaCompra APIs must be authenticated. BoaCompra Checkout’s API uses the Basic Authentication approach. That means the Merchant have to send the HTTP requests with the Authorization header. The Authorization header must contain the word Basic followed by a space and a base64-encoded string with merchant_id:secret_key. For example:

    Authorization: Basic MTIzNDozN2IzNmUxNy1lZGIyLTRkNjAtOWFmZC05MTA2MmJlYmY1ZTQ=

    Because base64 is easily decoded, BoaCompra Checkout’s API only accepts request throughout HTTPS/SSL/TLS. Once Merchant’s On-boarding is concluded, Merchant’s Developers will have a credential pair (merchant_id and secret_key) to use in the requests. Anyone in possession of the credential pair will be able to create checkouts with BoaCompra. Be sure to keep both, merchant_id and secret_key, in a safety and private place. Do not share it in client-side application or public repositories. The code snippet below shows an Authorization header’s example generated in PHP:

    Example authorization

    <php
    $key = '1234';
    $secret = '37b36e17-edb2-4d60-9afd-91062bebf5e4';
    $encoded = base64_encode(sprintf('%s:%s', $key, $secret));
    $header = sprintf('Authorization: Basic %s', $encoded);
    
    echo $header;
    
    // Authorization: Basic MTIzNDozN2IzNmUxNy1lZGIyLTRkNjAtOWFmZC05MTA2MmJlYmY1ZTQ=
    
    String key = "1234";
    String secret = "37b36e17-edb2-4d60-9afd-91062bebf5e4";
    
    String encoded = Base64.getEncoder().encodeToString((key + ":" + secret).getBytes());
    String header = "Authorization: Basic " + encoded;
    
    System.out.println(header);
    
    //Authorization: Basic MTIzNDozN2IzNmUxNy1lZGIyLTRkNjAtOWFmZC05MTA2MmJlYmY1ZTQ=
    
    import base64
    
    key = "1234"
    secret = "37b36e17-edb2-4d60-9afd-91062bebf5e4"
    key_secret = key + ":" + secret
    
    encoded = key_secret.encode("ascii")
    header = "Authorization: Basic " + base64.b64encode(encoded).decode()
    
    print(header)
    
    // Authorization: Basic MTIzNDozN2IzNmUxNy1lZGIyLTRkNjAtOWFmZC05MTA2MmJlYmY1ZTQ=
    
    require "base64"
    
    key = '1234'
    secret = '37b36e17-edb2-4d60-9afd-91062bebf5e4'
    
    encoded = Base64.encode64(key + ':' + secret)
    header = 'Authorization: Basic ' + encoded
    
    puts header
    
    // Authorization: Basic MTIzNDozN2IzNmUxNy1lZGIyLTRkNjAtOWFmZC05MTA2MmJlYmY1ZTQ=
    

    Checkout API

    Sequence Flow

    Checkout API Workflow

    1- Customer → Merchant: Customer finalizes the purchase through Merchants Store

    2- Merchant → BoaCompra: Merchant sends a Create Checkout request to BoaCompra with Customer data

    3- BoaCompra → Merchant: BoaCompra processes the requested data and returns a Checkout URL to the Merchant

    4- Merchant → Customer: Merchant redirect Customer to the Checkout URL generated by BoaCompra

    5- Customer → BoaCompra: Customer completes the payment flow at BoaCompra Checkout;

    6- BoaCompra → Merchant: BoaCompra redirects the customer to the Merchant Store.

    Environments

    Production: https://api.boacompra.com/v3/checkouts

    Sandbox: https://api.sandbox.boacompra.com/v3/checkouts

    Method: POST

    Request

    To create a Checkout with the BoaCompra API, the “integration”, “order”, “checkout”, “charge” and “payer” objects will be used.

    Integration

    The “integration” object contains integration data referring to the Merchant Store. The available parameters are:

    Parameter Description Type Validation Mandatory
    integration General integration information. Object - Yes
    integration.reference Merchant reference code. String Min. 4, Max. 64 Yes
    integration.notification_url URL (must bind ports 80 or 443) used to send transaction status changes notifications by HTTP String Max. 200 Yes
    integration.project Integration project identifier. Default value is 1 Integer Min. 1 No

    Order

    The “order” object contains the value and list of products that Customer purchased from the Merchant store. The available parameters are:

    Parameter Description Type Validation Mandatory
    order General order information. Object - Yes
    order.currency Currency of order (ISO 4217) String [*] Yes
    order.items[] Set of items Array Min. 1, Max. 100 Yes
    order.items[].quantity Item quantity Integer Min. 1 Yes
    order.items[].description Item description String Max. 180 Yes
    order.items[].unit_price Price per unit. Separating cents by dot Float Min. 0.01 Yes

    Validation Currency

    List of accepted currencies by country:

    ISO Code Currency
    ARS Argentine Peso (Argentina)
    BOB Bolivian Boliviano (Bolivia)
    BRL Brazilian Real (Brazil)
    CLP Chilean Peso (Chile)
    COP Colombian Peso (Colombia)
    CRC Costa Rican Colon (Costa Rica)
    EUR Euro (Portugal, Spain)
    GTQ Guatemalan Quetzal (Guatemala)
    MXN Mexican Peso (Mexico)
    NIO Cordoba (Nicaragua)
    PEN Nuevo Sol (Peru)
    PYG Guarani (Paraguay)
    RON Leu Romeno (Romania)
    TRY Turkish Lira (Turkey)
    USD Dollar (Ecuador, El Salvador, Panama, Puerto Rico, USA)
    UYU Uruguayan Peso (Uruguay)

    Checkout

    The “checkout” object contains information on how the BoaCompra Checkout will be displayed to Customer, the available parameters are:

    Parameter Description Type Validation Mandatory
    checkout Checkout information Object - Yes
    checkout.language Checkout language String [*] Yes
    checkout.redirect_urls Checkout redirect URLs Object - Yes
    checkout.redirect_urls.success Checkout redirect URL success String Max. 200 Yes

    Validation Language

    List of translations available for BoaCompra Checkout:

    Language Locate
    en_US English
    es_ES Spanish
    pt_BR Brazilian Portuguese
    pt_PT Portugal Portuguese
    tr_TR Turkish

    Charge

    The “charge” object contains the payment information to generate the transaction. Checkout can present the payment methods to Customer in two ways, via the type or via the specific method.

    The type is a group of payment methods, being possible to inform only the type, which will show all linked methods at checkout, or directly inform the payment method. Eg: it is possible to inform the credit card type, which will open options to inform the brand, or inform the VISA payment method directly.

    The type can also be omited, in which case checkout would present all payment methods to the customer.

    The available parameters are:

    Parameter Description Type Validation Mandatory
    charge Object that contains the Billing data for a transaction. Object - Yes
    charge.country Country of origin of the collection. String [*] Yes
    charge.type Grouper with the Type of charge to be presented at Checkout String [*] No
    charge.credit_card Credit Card specific payment method. String [*] No
    charge.debit_card Debit Card-Specific Payment Method String [*] No
    charge.e_wallet Specific payment method for Electronic Wallet String [*] No
    charge.eft Specific payment method for Real-Time transfer\Electronic Funds Transfer(EFT) String [*] No
    charge.obt Specific payment method for Offline bank transfer (OBT) String [*] No
    charge.postpay Postpay specific payment method String [*] No
    charge.prepay Prepay specific payment method String [*] No

    Country Validation

    The list of all payment methods by country can be found in the section: Available payment methods by country.

    ISO Country
    AR Argentina
    BO Bolivia
    BR Brazil
    CL Chile
    CO Colombia
    CR Costa Rica
    EC Ecuador
    SV El Salvador
    GT Guatemala
    MX Mexico
    NI Nicaragua
    PA Panama
    PY Paraguay
    PE Peru
    PT Portugal
    PR Puerto Rico
    RO Romania
    ES Spain
    TR Turkey
    US United States
    UY Uruguay

    Type Validation

    List of payment types accepted by BoaCompra Checkout:

    Credit Card Validation

    List of accepted payment methods:

    Debit Card Validation

    List of accepted payment methods:

    e-Wallet Validation

    List of accepted payment methods:

    EFT Validation

    List of accepted payment methods:

    OBT Validation

    List of accepted payment methods:

    Postpay Validation

    List of accepted payment methods:

    Prepay Validation

    List of accepted payment methods:

    Payer

    The “payer” object contains information about the Customer who made the purchase on the Merchant, the available parameters are:

    Parameter Description Type Validation Mandatory
    payer Payer information Object - No
    payer.email Payer E-mail String Max. 60 [*] No
    payer.person Payer of type Person information Object - No
    payer.person.name Person name String Min. 4, Max. 50 [*] No
    payer.person.phone Phone information Object - No
    payer.person.phone.country_code Phone country code String Min. 1, Max. 3 Yes
    payer.person.phone.number Phone number String Min. 1, Max. 11 Yes
    payer.person.birth_date Person birth date String Format (YYYY-mm-dd) No

    E-mail Validation

    Rules for validating the email:

    Name Validation

    Rules for validating the payer’s name:

    Examples

    To create a credit card checkout, make a POST request as the example:

    Status 201 Created

    {
        "integration": {
            "reference": "REF-XXX-1234567890",
            "notification_url": "https://www.merchantwebsite.com/notify?type=transaction",
            "project": 1
        },
        "order": {
            "currency": "BRL",
            "items": [
                {
                    "quantity": 1,
                    "description": "Product description",
                    "unit_price": 101.1
                }
            ]
        },
        "checkout": {
            "language": "pt_BR",
            "redirect_urls": {
                "success": "https://www.merchantwebsite.com/success"
            }
        },
        "charge": {
            "country": "BR",
            "type": "CREDIT_CARD"
        },
        "payer": {
            "email": "payer@example.com",
            "person": {
                "name": "Mr. Payer",
                "birth_date": "1970-01-01",
                "phone": {
                    "country_code": "55",
                    "number": "44900000000"
                }
            }
        }
    }
    

    Charge information is used to inform checkout payment settings. The type attribute allows you to select the category of payment methods that can be used to finalize the checkout.

    Example of a credit card type request

    {
        ...
        "charge": {
            "country": "BR",
            "type": "CREDIT_CARD"
        }
        ...
    }
    

    Example of a postpay type request

    {
        ...
        "charge": {
            "country": "BR",
            "type": "POSTPAY"
        }
        ...
    }
    

    You can also enter a specific payment method:

    Example of a specific credit_card

    {
        ...
        "charge": {
            "country": "BR",
            "credit_card": "VISA"
        }
        ...
    }
    

    It is mandatory to inform the type or method of payment. It's not possible to inform them simultaneously.

    Response

    Parameter Description Type
    code Checkout UUID code, only used for internal BoaCompra tracking String
    url Checkout URL, used to redirect the customer String
    created_at Checkout creation date (ISO 8601/RFC3339) with UTC Timezone ISO 8601 Date
    expires_at Checkout expiration date (ISO 8601/RFC3339) with UTC Timezone, maximum time to access the checkout URL ISO 8601 Date

    Example of a response

    {
        "code": "5be8a351f5bc4e33ae92dd4b860db314",
        "url": "https://payment.boacompra.com/5be8a351f5bc4e33ae92dd4b860db314",
        "created_at": "2021-04-12T12:43:13Z",
        "expires_at": "2021-04-12T12:45:13Z"
    }
    

    The Checkout URL returned has an expiration time, therefore, this URL must be exposed to Customer as soon as it is generated. The expiration time of each URL varies, being 2 minutes for Checkout 2.0 and 15 minutes for Checkout 1.0.

    Notification

    Workflow

    Status Change Flow

    1- BoaCompra → Merchant: BoaCompra notifies Merchant that a transaction status has changed

    2- Merchant → BoaCompra: With the transaction code provided in the notification, Merchant requests transaction informations to BoaCompra

    3- BoaCompra → Merchant: BoaCompra responds back with transaction informations

    To verify the current transaction status, Merchant needs to use Search API to query the transaction. In case BoaCompra responds the transaction with status COMPLETE, Merchant needs to deliver the purchase to the End User.

    Notification request

    After changing the payment status, BoaCompra sends the notification to the Merchant through the URL provided in the integration.notification_url parameter.

    Notification metadata example

    POST https://www.merchantwebsite.com/notify?type=transaction HTTP/1.1
    Content-Type: application/json
    

    Notification body example

    {
        "test_mode": false,
        "notification_type": "transaction",
        "transaction_code": "9DB1FAFB-C0E6-4184-822C-8F18B3D70321"
    }
    

    Please note that to receive our notifications, in case you use a firewall, you should allowlist the following IPs:

    Search API

    The Search API will return the details of the transaction processed by BoaCompra, according to the flow below:

    How it Works

    The Query API can be done in two ways, through the transaction code, where the API returns the specific data of the informed transaction, and through the query parameters, where a list of transactions corresponding to the parameters will be returned.

    Search by Transaction code

    The query performed through transaction-code, sent by the Notify API (which uses the url informed in the integration.notification_url parameter).

    Environments

    Production: https://api.boacompra.com/v3/transactions/{transaction_code}

    Sandbox: https://api.sandbox.boacompra.com/v3/transactions/{transaction_code}

    Method: GET

    Request

    Parameters Description Type Validation Errors Mandatory
    transaction_code Unique transaction identifier Uuid Length 36 [*] Yes.

    Response

    Parameters Description Type
    code Unique identifier of the transaction generated by BoaCompra Uuid
    status Transaction Status [see more] String
    refundable Indicates whether the transaction is refundable or not Boolean
    integration.reference Order reference sent by Merchant String
    integration.store Merchant Identifier Integer
    integration.project Project number submitted by Merchant Integer
    integration.notification_url Notification URL used by BoaCompra to notify Merchant about transaction status updates String
    charge.country Payer's country String
    charge.type Payment type grouper used by the payer [*] String
    charge.method Payment method used by the payer [*] String
    charge.credit_card.installments Number of installments used by the payer Integer
    charge.payment_response Object returned when there is failure in the card processing by PagSeguro. This return only occurs for some payments, please consult your Account Manager for more information. Object
    charge.payment_response.code Transaction refusal reason code Integer
    charge.payment_response.message Message with details of the reason for rejecting the transaction String
    checkout.language Language used at checkout by the payer String
    payer.email Payer's Email String
    order.date Transaction creation date Date/Time ISO 8601
    order.currency Currency in which the order was sent String
    order.items Due to current limitations, it will only return 1 item, even if several are sent through the API. At any time, you can return the items as shipped Array of Objects
    order.items[].quantity Item quantity String
    order.items[].description Item description String
    order.items[].unit_price Item unit price String
    refunds[] List of refunds registered for the transaction Array of Objects
    refunds[].id Refund unique identifier Integer
    refunds[].reference Refund reference sent by merchant String
    refunds[].status Refund Status: REQUESTED, PROCESSING, PROCESSED, REJECTED String
    refunds[].amount Requested refund amount Float
    refunds[].date Refund request date Date/Time ISO 8601
    refunds[].processing_date Refund processing date Date/Time ISO 8601

    Example

    API result on request with refund:

    {
       "code": "FCDA9C80-AF1F-4968-87AB-F71890CCF137",
       "status": "REFUNDED",
       "refundable": true,
       "integration": {
          "reference": "3ecb69fe75bf444889dc55c514a60494",
          "store": 10,
          "project": 1,
          "notification_url": "https://merchantwebsite.com/?notify"
       },
       "charge": {
          "country": "BR",
          "type": "CREDIT_CARD",
          "method": "MASTERCARD",
          "credit_card": {
             "installments": 1
          }
       },
       "checkout": {
          "language": "pt_BR"
       },
       "payer": {
          "email": "customer_email@example.com"
       },
       "order": {
          "currency": "BRL",
          "date": "2021-06-01T14:52:08Z",
          "items": [
             {
                "quantity": 1,
                "description": "Product Example",
                "unit_price": 1
             }
          ]
       },
       "refunds": [
          {
             "id": 254593,
             "reference": "REFUND-REFERENCE-TEST",
             "status": "PROCESSED",
             "amount": 1,
             "date": "2021-06-01T14:54:22Z",
             "processing_date": "2021-06-01T03:00:00Z"
          }
       ]
    }
    

    Search by Period

    In this query, the API returns all transactions processed by BoaCompra according to the period informed.

    Environments

    Production: https://api.boacompra.com/v3/transactions/{query}

    Sandbox: https://api.sandbox.boacompra.com/v3/transactions/{query}

    Method: GET

    Request

    Parameter Description Type Validation Errors Mandatory
    initial_transaction_date Transaction start date Date/Time ISO 8601 Format: dd/mm/yyyyThh:mm:ssZ [*] Yes.
    final_transaction_date Transaction end date Date/Time ISO 8601 Format: dd/mm/yyyyThh:mm:ssZ [*] Yes.
    page Page number Integer Min: 1 [*] No. Default:1
    max_results Maximum number of results per page Integer Min: 1, Max: 10 [*] No. Default:10

    Example

    The transaction query by period returns a list of transactions, which has the same contract as the transaction code query, in addition to the pagination data:

    Result:

    {
      "transactions": [
        {
          "code": "F2C09432-02DD-4FCF-B2DD-362850B63077",
          "status": "NOT-PAID",
          "refundable": false,
          "integration": {
            "reference": "bc874692de33485aa9f1f98c21f2bd09",
            "store": 10,
            "project": 1,
            "notification_url": "https://merchantwebsite.com/?notify"
          },
          "charge": {
            "country": "BR",
            "type": "CREDIT_CARD",
            "method": "MASTERCARD",
            "payment_response": {
              "code": 10000,
              "message": "Not authorized by acquirer"
            },
            "credit_card": {
              "installments": 1
            }
          },
          "checkout": {
            "language": "pt_BR"
          },
          "payer": {
            "email": "payer@example.com"
          },
          "order": {
            "currency": "BRL",
            "date": "2021-06-01T14:58:27Z",
            "items": [
              {
                "quantity": 1,
                "description": "Product Example",
                "unit_price": 1
              }
            ]
          },
          "refunds": []
        },
        {
          "code": "FCDA9C80-AF1F-4968-87AB-F71890CCF137",
          "status": "REFUNDED",
          "refundable": true,
          "integration": {
            "reference": "3ecb69fe75bf444889dc55c514a60494",
            "store": 10,
            "project": 1,
            "notification_url": "https://merchantwebsite.com/?notify"
          },
          "charge": {
            "country": "BR",
            "type": "CREDIT_CARD",
            "method": "MASTERCARD",
            "credit_card": {
              "installments": 1
            }
          },
          "checkout": {
            "language": "pt_BR"
          },
          "payer": {
            "email": "payer@example.com"
          },
          "order": {
            "date": "2021-06-01T14:52:08Z",
            "currency": "BRL",
            "items": [
              {
                "quantity": 1,
                "description": "Product Example",
                "unit_price": 1
              }
            ]
          },
          "refunds": [
            {
              "id": 254593,
              "reference": "REFUND-REFERENCE-TEST",
              "status": "PROCESSED",
              "amount": 1,
              "date": "2021-06-01T14:54:22Z",
              "processing_date": "2021-06-01T03:00:00Z"
            }
          ]
        },
        ...
      ],
      "pagination": {
        "total": 339,
        "results": 10,
        "page": 1,
        "pages": 34
      }
    }
    

    Transaction Status

    Each transaction has a transaction.status that represent its current state, as well as any action you should take:

    Name Description
    CANCELLED Transaction was cancelled by BoaCompra
    COMPLETE Transaction was paid and approved.
    Products should be delivered to the Customer.
    CHARGEBACK An approved transaction was cancelled by the Customer. Please consult your Account Manager for costs.
    EXPIRED Payment date of transaction expired.
    NOT-PAID Payment confirmation of transaction was not received.
    PENDING Transaction was created.
    REFUNDED A partial or full refund was requested and accepted for the transaction
    UNDER-REVIEW Transaction is under review by BoaCompra Analysis team. It will be approved or cancelled based on the analysis.

    Refund API

    Refund API is used to request a refund, according to the flow below:

    Work Flow

    Status Change Flow

    How it Works

    1. Merchant requests refund to BoaCompra

    2. BoaCompra receives the data and returns the refund identifier to the Merchant

    3. BoaCompra processes the data transferred by the Merchant

    4. BoaCompra notifies the Merchant with the status of the transaction change

    5. Merchant receives notification and updates order status as described in the Notify API topic

    To identify whether the transaction is refundable, you can check through the query, the “refundable” parameter indicates whether the payment can be refunded. The other way is to validate which methods are refundable by BoaCompra, check the list of payment methods available by country.

    Environments

    Production: https://api.boacompra.com/v3/transactions/{transaction_code}/refunds

    Sandbox: https://api.sandbox.boacompra.com/v3/transactions/{transaction_code}/refunds

    Method: POST

    Request

    Query parameter list

    Parameters Description Type Validation Errors Mandatory
    transaction_code Transaction code UUID, uppercase formatted with hyphens/dashes String - - Yes

    Body parameter list

    Parameters Description Type Validation Errors Mandatory
    notification_url URL (must bind ports 80 or 443) used to send transaction status changes notifications by HTTP String Max. 200 [*] Yes
    amount Amount to be refunded. If not sent, the refund will be processed for the entire value of the transaction Float Min. 0.01, Max. ? [*] No. Default: transaction amount
    reference Merchant reference String Max. 50 [*] No

    Example

    To refund a checkout, make a POST request as the example. Example URL: https://api.boacompra.com/v3/transactions/00EEE57E-2DCA-4580-A33C-76D9773C9808/refunds

    Example of a request:

    {
        "notification_url": "https://www.merchantwebsite.com/notify?type=refund",
        "amount": 101.1,
        "reference": "REF-XXX-1234567890"
    }
    

    Response

    Parameters Description Type Details
    id Refund identifier String -
    reference Merchant reference String -
    amount Amount to be refunded Float -
    status Refund status String [*]
    created_at Refund creation date (ISO 8601/RFC3339) with UTC Timezone Date/Time ISO 8601 -
    updated_at Refund last update date (ISO 8601/RFC3339) with UTC Timezone Date/Time ISO 8601 -

    Example

    Status 201 Created

    Example of a response:

    {
        "id": 35,
        "reference": "REF-XXX-1234567890",
        "amount": 100.1,
        "status": "requested",
        "created_at": "2021-04-12T11:16:55Z",
        "updated_at": "2021-04-12T11:16:55Z"
    }
    

    Refund Status

    Refund status returned by BoaCompra.:

    Name Description
    REQUESTED Refund requested by Customer.
    PROCESSING Refund in process.
    PROCESSED Refund successfully completed.
    REJECTED Refund was rejected.

    Payment Methods Available by Country

    AR - Argentina

    Payment Method Type Method Financial Group Refundable
    Visa CREDIT_CARD VISA Card Yes
    American Express CREDIT_CARD AMEX Card Yes
    MasterCard CREDIT_CARD MASTERCARD Card Yes
    Diners CREDIT_CARD DINERS Card Yes
    Cencosud CREDIT_CARD CENCOSUD Card Yes
    ArgenCard CREDIT_CARD ARGENCARD Card Yes
    Cabal CREDIT_CARD CABAL Card Yes
    Tarjeta Shopping CREDIT_CARD TARJETA_SHOPPING Card Yes
    Nativa Master Card CREDIT_CARD NATIVA Card Yes
    Visa Electron DEBIT_CARD VISA_ELECTRON Card Yes
    MasterCard Maestro DEBIT_CARD MAESTRO Card Yes
    Santander EFT SANTANDER Bank Transfer No
    Citi OBT CITI Bank Transfer Yes
    Macro OBT MACRO Bank Transfer Yes
    Pago Facil POSTPAY PAGO_FACIL Cash POS No
    Rapipago POSTPAY RAPIPAGO Cash POS No

    BO - Bolivia

    Payment Method Type Method Financial Group Refundable
    PayPal E_WALLET PAYPAL E-Wallet Yes

    BR - Brazil

    Payment Method Type Method Financial Group Refundable
    Visa CREDIT_CARD VISA Card Yes
    American Express CREDIT_CARD AMEX Card Yes
    MasterCard CREDIT_CARD MASTERCARD Card Yes
    Elo Card CREDIT_CARD ELO Card Yes
    HiperCard CREDIT_CARD HIPERCARD Card Yes
    Visa Electron DEBIT_CARD VISA_ELECTRON Card Yes
    PayPal E_WALLET PAYPAL E-wallet Yes
    PagSeguro E_WALLET PAGSEGURO E-wallet Yes
    Banco do Brasil online EFT BANCO_DO_BRASIL Bank transfer Yes
    Itaú online EFT ITAU Bank transfer Yes
    Banrisul EFT BANRISUL Bank transfer Yes
    Pix EFT PIX Bank transfer Yes
    Itaú OBT ITAU Cash deposit Yes
    Bradesco OBT BRADESCO Cash deposit Yes
    Banco do Brasil OBT BANCO_DO_BRASIL Cash deposit Yes
    Santander OBT SANTANDER Cash deposit Yes
    Boleto POSTPAY BOLETO Bank Slip Yes
    Boleto Flash POSTPAY BOLETO_FLASH Bank Slip No

    CL - Chile

    Payment Method Type Method Financial Group Refundable
    Visa CREDIT_CARD VISA Card Yes
    American Express CREDIT_CARD AMEX Card Yes
    MasterCard CREDIT_CARD MASTERCARD Card Yes
    Diners CREDIT_CARD DINERS Card Yes
    CMR CREDIT_CARD CMR Card Yes
    Cencosud CREDIT_CARD CENCOSUD Card Yes
    Ripley CREDIT_CARD RIPLEY Card Yes
    Magna CREDIT_CARD MAGNA Card Yes
    Visa Electron DEBIT_CARD VISA_ELECTRON Card Yes
    MasterCard Maestro DEBIT_CARD MAESTRO Card Yes
    Redcompra DEBIT_CARD REDCOMPRA Card Yes
    PayPal E_WALLET PAYPAL E-wallet Yes
    Khipu EFT KHIPU Bank transfer No
    Santander OBT SANTANDER Cash deposit No
    SafetyPay OBT SAFETYPAY Bank transfer No
    Servipag OBT SERVIPAG Bank transfer Yes
    Banco Estado OBT BANCO_ESTADO Bank transfer No
    Banco Credito & Inversiones OBT BCI Bank transfer No
    Cash POSTPAY CASH Cash POS Yes
    Multicaja POSTPAY MULTICAJA Cash POS Yes

    CO - Colombia

    Payment Method Type Method Financial Group Refundable
    Visa CREDIT_CARD VISA Card Yes
    American Express CREDIT_CARD AMEX Card Yes
    MasterCard CREDIT_CARD MASTERCARD Card Yes
    Diners CREDIT_CARD DINERS Card Yes
    Visa Electron DEBIT_CARD VISA_ELECTRON Card Yes
    MasterCard Maestro DEBIT_CARD MAESTRO Card Yes
    PayPal E_WALLET PAYPAL E-wallet Yes
    Banco de Occidente EFT BANCO_DE_OCCIDENTE Bank transfer No
    Bancolombia EFT BANCOLOMBIA Bank transfer No
    PSE OBT PSE Bank transfer No
    SafetyPay OBT SAFETYPAY Bank transfer No
    Banco Davivienda OBT DAVIVIENDA Bank transfer No
    Banco de Bogota OBT BANCO_DE_BOGOTA Bank transfer No
    BBVA OBT BBVA Bank transfer No
    Bancolombia OBT BANCOLOMBIA Bank transfer No
    Baloto POSTPAY BALOTO Cash POS No
    Efecty POSTPAY EFECTY Cash POS No
    Gana POSTPAY GANA Cash POS No

    CR - Costa Rica

    Payment Method Type Method Financial Group Refundable
    PayPal E_WALLET PAYPAL E-wallet Yes
    Scotiabank EFT SCOTIABANK Bank transfer No
    SafetyPay OBT SAFETYPAY Bank transfer No
    Banco Nacional de Costa Rica OBT BANCO_NACIONAL_CR Bank transfer No
    Cathay OBT CATHAY Bank transfer No
    Bancentro Lafise OBT BANCENTRO_LAFISE Bank transfer No
    Grupo Mucap OBT MUCAP Bank transfer No
    Grupo Mutual Alajueda OBT MUTUAL_ALAJUEDA Bank transfer No
    Cash POSTPAY CASH Cash POS No
    Cathay POSTPAY CATHAY Cash POS No
    Bancentro Lafise POSTPAY BANCENTRO_LAFISE Cash POS No
    Banco Nacional de Costa Rica POSTPAY BANCO_NACIONAL_CR Cash POS No
    Grupo Mucap POSTPAY MUCAP Cash POS No
    Grupo Mutual Alajueda POSTPAY MUTUAL_ALAJUEDA Cash POS No

    EC - Ecuador

    Payment Method Type Method Financial Group Refundable
    PayPal E_WALLET PAYPAL E-wallet Yes
    SafetyPay OBT SAFETYPAY Bank transfer No
    Cash POSTPAY CASH Cash POS No

    ES - Spanish

    Payment Method Type Method Financial Group Refundable
    Visa CREDIT_CARD VISA Card Yes
    MasterCard CREDIT_CARD MASTERCARD Card Yes
    PayPal E_WALLET PAYPAL E-wallet Yes

    GT - Guatemala

    Payment Method Type Method Financial Group Refundable
    PayPal E_WALLET PAYPAL E-wallet Yes

    MX - México

    Payment Method Type Method Financial Group Refundable
    Visa CREDIT_CARD VISA Card Yes
    American Express CREDIT_CARD AMEX Card Yes
    MasterCard CREDIT_CARD MASTERCARD Card Yes
    PayPal E_WALLET PAYPAL E-wallet Yes
    Scotiabank EFT SCOTIABANK Bank transfer No
    Santander EFT SANTANDER Bank transfer No
    Bancomer OBT BANCOMER Bank transfer No
    SafetyPay OBT SAFETYPAY Bank transfer No
    Banamex OBT BANAMEX Bank transfer No
    SPEI OBT SPEI Bank transfer No
    Oxxo POSTPAY OXXO Cash POS No
    Cash POSTPAY CASH Cash POS No
    Todito Cash PREPAY TODITO Cash POS No

    NI - Nicaragua

    Payment Method Type Method Financial Group Refundable
    PayPal E_WALLET PAYPAL E-wallet Yes

    PA - Panamá

    Payment Method Type Method Financial Group Refundable
    PayPal E_WALLET PAYPAL E-wallet Yes

    PE - Peru

    Payment Method Type Method Financial Group Refundable
    Visa CREDIT_CARD VISA Card Yes
    American Express CREDIT_CARD AMEX Card Yes
    MasterCard CREDIT_CARD MASTERCARD Card Yes
    Diners CREDIT_CARD DINERS Card Yes
    Visa Electron DEBIT_CARD VISA_ELECTRON Card Yes
    MasterCard Maestro DEBIT_CARD MAESTRO Card Yes
    PayPal E_WALLET PAYPAL E-wallet Yes
    Scotiabank EFT SCOTIABANK Bank transfer No
    BBVA EFT BBVA Bank transfer No
    Interbank EFT INTERBANK Bank transfer No
    Western Union OBT WESTERN Cash deposit No
    Banco de Crédito del Perú OBT BCP Cash deposit No
    SafetyPay OBT SAFETYPAY Bank transfer No
    BBVA OBT BBVA Bank transfer No
    Interbank OBT INTERBANK Cash deposit No
    Scotiabank OBT SCOTIABANK Cash deposit No
    Pago Efectivo POSTPAY PAGO_EFECTIVO Cash POS No
    Cash POSTPAY CASH Cash POS No

    PR – Porto Rico

    Payment Method Type Method Financial Group Refundable
    PayPal E_WALLET PAYPAL E-wallet Yes

    PT - Portugal

    Payment Method Type Method Financial Group Refundable
    Visa CREDIT_CARD VISA Card Yes
    MasterCard CREDIT_CARD MASTERCARD Card Yes
    PayPal E_WALLET PAYPAL E-wallet Yes
    Multibanco POSTPAY MULTIBANCO Cash POS No
    Payshop POSTPAY PAYSHOP Cash POS No

    PY - Paraguay

    Payment Method Type Method Financial Group Refundable
    PayPal E_WALLET PAYPAL E-wallet Yes

    RO - Romania

    Payment Method Type Method Financial Group Refundable
    PayPal E_WALLET PAYPAL E-wallet Yes

    SV - El Salvador

    Payment Method Type Method Financial Group Refundable
    PayPal E_WALLET PAYPAL E-wallet Yes
    Cash POSTPAY CASH Cash POS No

    TR - Turkey

    Payment Method Type Method Financial Group Refundable
    Visa CREDIT_CARD VISA Card Yes
    American Express CREDIT_CARD AMEX Card No
    MasterCard CREDIT_CARD MASTERCARD Card Yes
    Troycard CREDIT_CARD TROYCARD Card Yes
    Visa Electron DEBIT_CARD VISA_ELECTRON Card Yes
    MasterCard Maestro DEBIT_CARD MAESTRO Card Yes
    GPay Wallet E_WALLET GPAY E-wallet No
    Is Bank OBT ISBANK Cash deposit No
    Garanti Bankasi OBT GARANTI Cash deposit No
    Akbank OBT AKBANK Cash deposit No
    Yapi Kredi OBT YAPI_KREDI Cash deposit No
    PTT OBT PTT Cash deposit No
    Kuvet Turk Bank OBT KUVET Cash deposit No
    Vakifar Bank OBT VAKIFAR Cash deposit No
    Ziraat Bank OBT ZIRAAT Cash deposit No
    T. Economi OBT ECONOMI Cash deposit No

    US - United States

    Payment Method Type Method Financial Group Refundable
    PayPal E_WALLET PAYPAL E-wallet Yes

    UY - Uruguay

    Payment Method Type Method Financial Group Refundable
    Visa CREDIT_CARD VISA Card Yes
    MasterCard CREDIT_CARD MASTERCARD Card Yes
    Diners CREDIT_CARD DINERS Card Yes
    Oca CREDIT_CARD OCA Card Yes
    Lider CREDIT_CARD LIDER Card Yes
    PayPal E_WALLET PAYPAL E-wallet Yes
    Redpagos POSTPAY REDPAGOS Cash POS Yes

    Financial group: Indicates how the payment method will be billed from Merchant.

    Sandbox Environment

    BoaCompra provides a sandbox environment for testing purposes. To create testing transactions send requests to the sandbox URL provided in each section (base URL: https://api.sandbox.boacompra.com).

    BoaCompra offers a panel for proper simulation of all status and the integration flow. Please access the following URL with credentials provided by your Account Manager: https://billing-partner.boacompra.com

    In the “Transactions test” menu, search for your test transaction:

    Transaction Test

    Once you find it, please click on the “detail” icon:

    Transaction List

    You can select the status you want to simulate and send a notification by clicking “Notify”:

    Transaction Notification

    Errors

    Authorization Header

    Bad Request

    Status 400 Bad Request

    Authorization header not entered

    {
        "errors": [
            {
                "message": "Value is required and can't be empty",
                "location": "header.authorization"
            }
        ]
    }
    

    Authorization header in invalid format. Pattern:/^\d+:[a-zA-Z0-9]{64}$/

    {
        "errors": [
            {
                "message": "The input does not appear to be a valid hash",
                "location": "header.authorization"
            }
        ]
    }
    

    Unauthorized

    Status 401 Unauthorized

    Checkout API

    Status 400 Bad Request

    Integration

    Integration reference errors:

    {
       "errors": [
            {
                "message": "Value is required and can't be empty",
                "location": "body.integration.reference"
            },
            {
                "message": "The input does not match against pattern '/^([A-Za-z0-9-,_\\/]){4,64}$/'",
                "location": "body.integration.reference"
            }
        ]
    }
    

    Integration notification URL errors:

    {
        "errors": [
            {
                "message": "The input does not appear to be a valid Url",
                "location": "body.integration.notification_url"
            },
            {
                "message": "The input is more than 200 characters long",
                "location": "body.integration.notification_url"
            },
            {
                "message": "Value is required and can't be empty",
                "location": "body.integration.notification_url"
            },
             {
                "message": "Invalid type given. String expected",
                "location": "body.integration.notification_url"
            }
        ]
    }
    

    Integration project errors:

    {
        "errors": [
            {
                "message": "The input is not strictly an integer",
                "location": "body.integration.project"
            },
            {
                "message": "The input is not greater than or equal to 1",
                "location": "body.integration.project"
            }
        ]
    }
    

    Order

    Order currency errors:

    {
        "errors": [
            {
                "message": "Value is required and can't be empty",
                "location": "body.order.currency"
            },
            {
                "message": "Invalid value. Options are: ARS, BOB, BRL, CLP, COP, CRC, EUR, GTQ, MXN, NIO, PEN, PYG, TRY, USD, UYU",
                "location": "body.order.currency"
            }
        ]
    }
    

    Order items errors:

    {
        "errors": [
            {
                "message": "Value is required and can't be empty",
                "location": "body.order.items.0"
            },
            {
                "message": "The items count must be less or equal than 100",
                "location": "body.order.items"
            }
        ]
    }
    

    Order items quantity errors:

    {
        "errors": [
            {
                "message": "The input is not strictly an integer",
                "location": "body.order.items.0.quantity"
            },
            {
                "message": "The input is not greater than or equal to 1",
                "location": "body.order.items.0.quantity"
            },
            {
                "message": "Value is required and can't be empty",
                "location": "body.order.items.0.quantity"
            }
        ]
    }
    

    Order items description errors:

    {
        "errors": [
            {
                "message": "Invalid type given. String expected",
                "location": "body.order.items.0.description"
            },
            {
                "message": "Value is required and can't be empty",
                "location": "body.order.items.0.description"
            },
            {
                "message": "The input is more than 180 characters long",
                "location": "body.order.items.0.description"
            }
        ]
    }
    

    Order items unit_price errors:

    {
        "errors": [
                    {
                "message": "The input is not strictly a float",
                "location": "body.order.items.0.unit_price"
            },
            {
                "message": "The input is not greater than or equal to 0.01",
                "location": "body.order.items.0.unit_price"
            },
            {
                "message": "Value is required and can't be empty",
                "location": "body.order.items.0.unit_price"
            }
        ]
    }
    

    Checkout

    Checkout language errors:

    {
        "errors": [
            {
                "message": "Value is required and can't be empty",
                "location": "body.checkout.language"
            },
            {
                "message": "Invalid value. Options are: en_US, es_ES, pt_BR, pt_PT, tr_TR",
                "location": "body.checkout.language"
            }
        ]
    }
    

    Checkout redirect_urls success errors:

    {
        "errors": [
            {
                "message": "The input does not appear to be a valid Url",
                "location": "body.checkout.redirect_urls.success"
            },
            {
                "message": "Invalid type given. String expected",
                "location": "body.checkout.redirect_urls.success"
            },
            {
                "message": "Value is required and can't be empty",
                "location": "body.checkout.redirect_urls.success"
            }
        ]
    }
    

    Charge

    Charge country errors:

    {
        "errors": [
            {
                "message": "Value is required and can't be empty",
                "location": "body.charge.country"
            },
            {
                "message": "Invalid value. Options are: AR, BO, BR, CL, CO, CR, EC, SV, GT, MX, NI, PA, PY, PE, PT, PR, ES, TR, UY, US",
                "location": "body.charge.country"
            }
        ]
    }
    

    Charge type errors:

    {
        "errors": [
            {
                "message": "Invalid value. Options are: CREDIT_CARD, DEBIT_CARD, E_WALLET, EFT, OBT, POSTPAY, PREPAY",
                "location": "body.charge.type"
            },
            {
                "message": "Only charge.type or one specific payment method must be filled",
                "location": "body.charge.type"
            }
        ]
    }
    

    Charge credit_card errors:

    {
        "errors": [
             {
                "message": "Invalid value. Options are: AMEX, ARGENCARD, CABAL, CENCOSUD, CMR, DINERS, ELO, HIPERCARD, LIDER, MAGNA, MASTERCARD, NATIVA, OCA, RIPLEY, TARJETA_SHOPPING, TROYCARD, VISA",
                "location": "body.charge.credit_card"
            }
        ]
    }
    

    Charge debit_card errors:

    {
        "errors": [
            {
                "message": "Invalid value. Options are: MAESTRO, REDCOMPRA, VISA_ELECTRON",
                "location": "body.charge.debit_card"
            }
        ]
    }
    

    Charge e_wallet errors:

    {
        "errors": [
            {
                "message": "Invalid value. Options are: GPAY, PAGSEGURO, PAYPAL",
                "location": "body.charge.e_wallet"
            }
        ]
    }
    

    Charge eft errors:

    {
        "errors": [
            {
                "message": "Invalid value. Options are: BANCO_DE_OCCIDENTE, BANCO_DO_BRASIL, BANCOLOMBIA, BANRISUL, BBVA, INTERBANK, ITAU, KHIPU, PIX, SANTANDER, SCOTIABANK",
                "location": "body.charge.eft"
            }
        ]
    }
    

    Charge obt errors:

    {
        "errors": [
            {
                "message": "Invalid value. Options are: AKBANK, BANAMEX, BANCENTRO_LAFISE, BANCO_DE_BOGOTA, BANCO_DO_BRASIL, BANCO_ESTADO, BANCO_NACIONAL_CR, BANCOLOMBIA, BANCOMER, BBVA, BCI, BCP, BRADESCO, CATHAY, CITI, DAVIVIENDA, ECONOMI, GARANTI, ISBANK, INTERBANK, ITAU, KUVET, MACRO, MUCAP, MUTUAL_ALAJUEDA, PSE, PTT, SAFETYPAY, SANTANDER, SCOTIABANK, SERVIPAG, SPEI, VAKIFAR, WESTERN, YAPI_KREDI, ZIRAAT",
                "location": "body.charge.obt"
            }
        ]
    }
    

    Charge postpay errors:

    {
        "errors": [
            {
                "message": "Invalid value. Options are: BALOTO, BANCENTRO_LAFISE, BANCO_NACIONAL_CR, BOLETO, BOLETO_FLASH, CATHAY, CASH, EFECTY, GANA, MUCAP, MULTIBANCO, MULTICAJA, MUTUAL_ALAJUEDA, OXXO, PAGO_EFECTIVO, PAGO_FACIL, PAYSHOP, RAPIPAGO, REDPAGOS",
                "location": "body.charge.postpay"
            }
        ]
    }
    

    Charge prepay errors:

    {
        "errors": [
            {
                "message": "Invalid value. Options are: TODITO",
                "location": "body.charge.prepay"
            }
        ]
    }
    

    Payer

    Payer email errors:

    {
        "errors": [
            {
                "message": "Invalid type given. String expected",
                "location": "body.payer.email"
            },
            {
                "message": "The input is not a valid email address. Use the basic format name@domain.com",
                "location": "body.payer.email"
            },
            {
                "message": "The input is more than 60 characters long",
                "location": "body.payer.email"
            }
        ]
    }
    

    Payer person name errors:

    {
        "errors": [
            {
                "message": "If value is provided can't be empty",
                "location": "body.payer.person.name"
            },
            {
                "message": "Invalid type given. String expected",
                "location": "body.payer.person.name"
            },
            {
                "message": "The input contains invalid characters",
                "location": "body.payer.person.name"
            },
            {
                "message": "The surnames words must be between 1 and 40 characters long",
                "location": "body.payer.person.name"
            },
            {
                "message": "The input must have more than one word",
                "location": "body.payer.person.name"
            },
            {
                "message": "The first name must be greater than or equal to 2 characters long",
                "location": "body.payer.person.name"
            },
            {
                "message": "The input contains more than one space between words",
                "location": "body.payer.person.name"
            }
        ]
    }
    

    Payer person phone country_code errors:

    {
        "errors": [
            {
                "message": "The input must contain only digits",
                "location": "body.payer.person.phone.country_code"
            },
            {
                "message": "The input is more than 3 characters long",
                "location": "body.payer.person.phone.country_code"
            },
                 {
                "message": "Invalid type given. String expected",
                "location": "body.payer.person.phone.country_code"
            },
            {
                "message": "If phone is provided, country_code is required",
                "location": "body.payer.person.phone.country_code"
            }
        ]
    }
    

    Payer person phone number errors:

    {
        "errors": [
            {
                "message": "The input must contain only digits",
                "location": "body.payer.person.phone.number"
            },
            {
                "message": "The input is more than 11 characters long",
                "location": "body.payer.person.phone.number"
            },
            {
                "message": "Invalid type given. String expected",
                "location": "body.payer.person.phone.number"
            },
            {
                "message": "If phone is provided, number is required",
                "location": "body.payer.person.phone.number"
            }
        ]
    }
    

    Payer person birthdate errors:

    {
        "errors": [
            {
                "message": "Invalid type given. String expected",
                "location": "body.payer.person.birth_date"
            },
            {
                "message": "The input does not appear to be a valid date",
                "location": "body.payer.person.birth_date"
            },
            {
                "message": "The input does not fit the date format 'Y-m-d'",
                "location": "body.payer.person.birth_date"
            }
        ]
    }
    

    Search API

    Route not found

    Status 404 Not Found

    {
        "error": "route_not_found"
    }
    

    Bad Request

    Status 400 Bad Request

    Initial date not entered

    {
        "errors": [
            {
                "message": "Value is required and can't be empty",
                "location": "params.initial_transaction_date"
            }
        ]
    }
    

    Initial date is invalid

    {
        "errors": [
            {
                "message": "The parameter does not appear to be a valid UTC DateTime",
                "location": "params.initial_transaction_date"
            }
        ]
    }
    

    Final date not entered

    {
        "errors": [
            {
                "message": "Value is required and can't be empty",
                "location": "params.final_transaction_date"
            }
        ]
    }
    

    Final date is invalid

    {
        "errors": [
            {
                "message": "The parameter does not appear to be a valid UTC DateTime",
                "location": "params.final_transaction_date"
            }
        ]
    }
    

    Transaction final date greater than initial date

    {
        "errors": [
            {
                "message": "The final_transaction_date param must be greater than initial_transaction_date",
                "location": "params.final_transaction_date"
            }
        ]
    }
    

    Invalid page number

    {
        "errors": [
            {
                "message": "The input is not between '1' and '2147483647', inclusively",
                "location": "params.page"
            }
        ]
    }
    

    Invalid amount per page

    {
        "errors": [
            {
                "message": "The input is not between '1' and '10', inclusively",
                "location": "params.max_results"
            }
        ]
    }
    

    Refund API

    Bad Request

    Status 400 Bad Request

    Refund notification_url errors

    {
        "errors": [
            {
                "message": "Value is required and can't be empty",
                "location": "body.notification_url"
            },
            {
                "message": "The input does not appear to be a valid Url",
                "location": "body.notification_url"
            },
            {
                "message": "Invalid type given. String expected",
                "location": "body.notification_url"
            }
        ]
    }
    

    Refund amount errors

    {
        "errors": [
            {
                "message": "The input is not strictly a float",
                "location": "body.amount"
            },
            {
                "message": "The input is not greater than or equal to 0.01",
                "location": "body.amount"
            },
            {
                "message": "Value is required and can't be empty",
                "location": "body.amount"
            }
        ]
    }
    

    Refund reference errors

    {
        "errors": [
            {
                "message": "Value is required and can't be empty",
                "location": "body.reference"
            },
            {
                "message": "Invalid type given. String expected",
                "location": "body.reference"
            }
        ]
    }
    

    Refund domain errors Status 422 Unprocessable Entity

    {
        "error": "refund_already_requested"
    },
    {
        "error": "refund_amount_is_greater_than_limit"
    },
    {
        "error": "refund_amount_is_greater_than_transaction"
    },
    {
        "error": "transaction_status_does_not_accept_refund"
    },
    {
        "error": "payment_does_not_accept_refund"
    },
    {
        "error": "expired_refund_request"
    },
    {
        "error": "partial_refund_not_allowed"
    }