Version: current

Google Pay

About this guide

This page explains how to use Google Pay to process payments using our Direct API. With Google Pay your customers can pay for their purchases with the cards and information already saved in their Google Accounts, along with data saved on their Android Pay, Chrome and YouTube accounts.

Availability

Google Pay integration with EBANX is available to the following countries and payment methods:

đŸ‡§đŸ‡· Brazil

Available payment methods
  • creditcard: Credit Cards
Available currencies
  • BRL: Brazillian Reais
  • EUR: Euros
  • USD: US Dollars

How it works

Google pay flow

To complete an integration using Google Pay, follow the steps below.

  1. Setup your integration with Google

    To start processing payments with Google Pay, you need to integrate with Google via Web or SKD.

    During the integration you will see that some parameters are required to process Google Pay through EBANX, these include:

    • Information for gatewayMerchantId – You will need to access your Dashboard Account, click on your “Username”, then on “Account Settings” and on “Integration”. It is the way you will see your gateway merchant ID in the “Secret Keys” area. If you have any questions, send an email to the Integration Team;

    • The parameter gateway should be filled with ebanx;

    • Mandatory fields: Name, address, phone, and email.

    info

    To offer support for tokenized debit or credit combo cards from Brazil, the countryCode in TransactionInfo must be BR, and both the credit and debit networks need to be specified in the request, property allowedCardNetworks.

    The following networks are supported: VISA, ELECTRON, MASTERCARD, MAESTRO, ELO and ELO_DEBIT

  2. Add the Google Pay token to your Direct API Call

    When you receive the customer’s information sent from Google and build the request body, make sure to send the “token” that you received from Google in the google_pay parameter like the example below.

    info

    Important to know: This parameter expects a string, so there’s no need to parse it to JSON.

    Pay Attention

    The CPF (government issued identification document in Brazil) is not a required field for Google, but, it is required for EBANX, so don’t forget to ask your customer about it, because Google will not provide it to you otherwise.

    curl -X POST 'https://api.ebanxpay.com/ws/direct'\
    -d 'request_body={
    "integration_key": "your_integration_key",
    "operation": "request",
    "payment": {
    "name": "José Silva",
    "email": "jose@example.com",
    "document": "853.513.468-93",
    "address": "Rua E",
    "street_number": "1040",
    "city": "MaracanaĂș",
    "state": "CE",
    "zipcode": "61919-230",
    "country": "br",
    "phone_number": "8522847035",
    "payment_type_code": "creditcard",
    "merchant_payment_code": "<%= random_order_id %>",
    "currency_code": "BRL",
    "amount_total": 100,
    "card": {
    "card_name": "José Silva",
    "google_pay": "{\"signature\":\"MEUCIFU/vJavw2HKB4bHbVxZp1JqaIdUa5R1ENbk59MG +
    fHFAiEA1UBu7ZS1YC1v + Go6ScIbel / XyBKVt29Qr1mSdObWIig\\ u003d\ ",\"protoc
    olVersion\ ":\"ECv1\",\"signedMessage\":\"{\\\"encryptedMessage\\\":\\\
    "ZkxOdAiV2EJXbNRkU1izADoLPyQtidbSvAC4HxnAGJPkFcnFbwwMVKHeXYjmkGbIjAg
    3 uzIqsds1G5NrDMzwwztdwmPQ0BjE3lIhVASIg1iljIiNQzcTkhHqTMc01Rs9yn3w2T9W
    gws2UGJ42YEnkeiVPjQfM3NvIAmxwCA8CAWrYZFmQfQCUGHK6H0dZolvjGGI8YtNwaImo
    4 aC6YMCo4t9FfwT + pITZdS9BfIMmjx2iXzjZF1Iy + c53lwzVVFEljGF5mh6cHEzZdKCVj
    F5U11tKt6MybAkEU6yxEqOfdjp41FwjcJ3SknlzrDBrFXqL66cq + xtfCGTPfRvzs7SnFE
    h5MKtzg14VmAQ0TyoQpZuBvrhRnmWxkQU4yzj4q6wCX2VSDO4M4KVvSpVUVTCWVydPmdn
    hFKzL84uVU2YKV8dxjGz7VJNOlF4sJH + G158Ru + w\\\\ u003d\\\ ",\\\"ephemeralPu
    blicKey\\\ ":\\\"BF1s3ATPQMJkfCvLmOAgG9oTcF+P9Wdh5WNJyGeMjcywjEtBhfFdG
    HOkZTZR + poT2LQjBrRADtWkD5yFuEEV7w\\\\ u003d\\\ ",\\\"tag\\\":\\\"SP4tH1
    HxhSTbcNEhmFfEgSRHW7G46B1J3m / FEl6mPzg\\\\ u003d\\\ "}\"}"
    }
    }
    }'

    A successful request will return a JSON response similar to the one below.

    {
    "payment": {
    "hash": "5a1c6820f28a2fd24c11a1dcde32e79c01c9814b66183cc3",
    "pin": "467872297",
    "merchant_payment_code": "80b83352839",
    "order_number": null,
    "status": "CO",
    "status_date": "2017-11-27 19:31:43",
    "open_date": "2017-11-27 19:31:43",
    "confirm_date": "2017-11-27 19:31:43",
    "transfer_date": null,
    "amount_br": "100.38",
    "amount_ext": "100.00",
    "amount_iof": "0.38",
    "currency_rate": "1.0000",
    "currency_ext": "BRL",
    "due_date": "2017-11-30",
    "instalments": "1",
    "payment_type_code": "visa",
    "details": {
    "billing_descriptor": "YOUR DESCRIPTOR"
    },
    "transaction_status": {
    "acquirer": "EBANX",
    "code": "OK",
    "description": "Accepted",
    "authcode": "82656"
    },
    "pre_approved": true,
    "capture_available": false
    },
    "status": "SUCCESS"
    }

Getting help

We hope this article was enlightening, but in case we’ve failed to take out your doubts you have the following options to keep on seeking for answers:

  • If you’re not our partner yet and would like to know more about our prices and conditions please fill our this form and our commercial team will get in touch with you.
  • In case you’re already our partner please get in touch with our support team at integration@ebanx.com.
Last updated on by Fernando Pankiewicz Gomes