Tutorial

Sigue los pasos de este tutorial para integrar una aplicación web con la API de Google Pay y configurarla para que acepte tarjetas de pago.

Paso 1: Define la versión de la API Google Pay

Declara la versión de la API de Google Pay que usa tu sitio. Las versiones principal y secundaria son obligatorias en los campos de cada objeto transferido y se incluyen en la respuesta.

En el siguiente código de ejemplo se muestran las versiones de la API declaradas:

const baseRequest = {
  apiVersion: 2,
  apiVersionMinor: 0
};

Paso 2: Solicita un token de pago a tu proveedor de pagos

Google cifra la información sobre la tarjeta seleccionada de un pagador para que un proveedor de pagos la procese de forma segura.

const tokenizationSpecification = {
  type: 'PAYMENT_GATEWAY',
  parameters: {
    'gateway': 'example',
    'gatewayMerchantId': 'exampleGatewayMerchantId'
  }
};

Sustituye example y exampleGatewayMerchantId por los valores adecuados de tu proveedor de pagos. Consulta la siguiente tabla para encontrar los valores específicos de gateway y gatewayMerchantId de tu proveedor de pagos:

Pasarela Parámetros y documentos
9Pay
  "gateway": "ninepay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

ABA PayWay
  "gateway": "ababank"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

accept.blue
  "gateway": "acceptblue"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

ACI
  "gateway": "aciworldwide"
  "gatewayMerchantId": "YOUR_ENTITY_ID"

Documentación para desarrolladores

ACpay
  "gateway": "acpay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Acquired.com
  "gateway": "acquired"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Adyen
  "gateway": "adyen"
  "gatewayMerchantId": "YOUR_MERCHANT_ACCOUNT_NAME"

Documentación para desarrolladores

IA para fintech
  "gateway": "aifintech"
  "gatewayMerchantId": "YOUR_MERCHANT_ACCOUNT_NAME"

Documentación para desarrolladores

Airba Pay
  "gateway": "airbapay""
  "gatewayMerchantId": "YOUR_MERCHANT_ACCOUNT_NAME"

Documentación para desarrolladores

Airvend
  "gateway": "airvend"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Airwallex
  "gateway": "airwallex"
  "gatewayMerchantId": "YOUR_MERCHANT_ACCOUNT_NAME"

Documentación para desarrolladores

Akurateco
  "gateway": "akuratecolab"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Alfa-Bank
  "gateway": "alfabank"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Algoritma
  "gateway": "algoritma"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Allinpay
  "gateway": "allinpayintl"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

AllPayments
  "gateway": "allpayments"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

alticepay
  "gateway": "alticepay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

AMO FINTECH LLC
  "gateway": "amofintech"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Amwal Pay
  "gateway": "amwalalraqamia"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

No hay documentación para desarrolladores disponible

Anedot
  "gateway": "anedot"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

ApcoPay
  "gateway": "apcopay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

APPEX
  "gateway": "epos"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

AsiaBill
  "gateway": "asiabill"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

No hay documentación para desarrolladores disponible

Assist
  "gateway": "assist"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Assist Belarus
  "gateway": "belassist"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Assist Kazakhstan
  "gateway": "assistkz"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Aurus
  "gateway": "auruspay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Authorize.net
  "gateway": "authorizenet"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Axerve
  "gateway": "gestpay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

azericardgpay
  "gateway": "azericardgpay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

B2B Soft Pay
  "gateway": "b2bsoftpay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Banco 131
  "gateway": "bank131"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

BANK RBK
  "gateway": "bankrbkkzpay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Bank Vostok
  "gateway": "bankvostok"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Barclaycard
  "gateway": "barclayssmartpayadvance"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Barion
  "gateway": "barion"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Basis Theory
  "gateway": "basistheory"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

BCC.KZ
  "gateway": "bccpay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

bePaid
  "gateway": "ecomcharge"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Bereke Bank
  "gateway": "berekepay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Sistemas de facturación
  "gateway": "billingsystems"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Bindo Labs Limited
  "gateway": "bindo"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

bisys.kz
  "gateway": "bisysgpay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Bizzon
  "gateway": "bizzon"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Bloques
  "gateway": "blocks"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Bluefin
  "gateway": "bluefin"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Bluefin Europe
  "gateway": "bluefineurope"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Blue Media
  "gateway": "bluemedia"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

BlueSnap
  "gateway": "bluesnap"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

BORICA
  "gateway": "borica"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

BPC
  "gateway": "bpcpay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

BR-DGE
  "gateway": "comcarde"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Braintree
  "gateway": "braintree"
  "braintree:apiVersion": "v1"
  "braintree:sdkVersion": "braintree.client.VERSION"
  "braintree:merchantId": "YOUR_BRAINTREE_MERCHANT_ID"
  "braintree:clientKey": "YOUR_BRAINTREE_TOKENIZATION_KEY"

Documentación para desarrolladores

Braspag
  "gateway": "cielo"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

BridgerPay
  "gateway": "bridgerpay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

BT Pay
  "gateway": "btpay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Buckaroo
  "gateway": "buckaroo"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Buya
  "gateway": "buya"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

CardCom
  "gateway": "cardcom"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

CardConnect
  "gateway": "cardconnect"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Cardknox
  "gateway": "cardknox"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

cardlink
  "gateway": "cardlink"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Cardstream
  "gateway": "crst"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Flujos de efectivo
  "gateway": "cashflowsgateway"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Cathay United Bank
  "gateway": "cathaybk"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

CCavenue (EAU)
  "gateway": "ccavenueuae"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

CCV
  "gateway": "ccv"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Cecabank
  "gateway": "cecabank"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Celerispay
  "gateway": "celerispay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

CentralPay
  "gateway": "centralpay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Chargehive
  "gateway": "chargehive"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

CharityEngine
  "gateway": "charityengine"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Chase Merchant Services
  "gateway": "chase"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Checkout.com
  "gateway": "checkoutltd"
  "gatewayMerchantId": "YOUR_PUBLIC_KEY"

Documentación para desarrolladores

CityPay
  "gateway": "citypay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Pasarela de pagos de Cloud9 (C9PG)
  "gateway": "c9pg"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

CloudPayments
  "gateway": "cloudpayments"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

CloudWalk
  "gateway": "cloudwalk"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Coinflow
  "gateway": "coinflow"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Computop
  "gateway": "computop"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

ConcordPay
  "gateway": "concordpay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Connectum
  "gateway": "connectum"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

ConnexPay
  "gateway": "connexpay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

CoralPay
  "gateway": "coralpay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Corefy
  "gateway": "paycoreio"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Corvus Pay
  "gateway": "corvuspay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Credorax
  "gateway": "credorax"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

CrossPay
  "gateway": "crosspay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Cross Switch
  "gateway": "crossswitch"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

CSG Forte
  "gateway": "csgforte"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

CTBC Bank
  "gateway": "ctbcbank"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

CURO Payments
  "gateway": "curopayments"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

CYBERBIZ
  "gateway": "cyberbizpay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Cybersource
  "gateway": "cybersource"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

danube.pay
  "gateway": "danubepay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Datacap Systems, Inc.
  "gateway": "datatrans"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Datatrans
  "gateway": "datatrans"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

DECTA
  "gateway": "decta"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

No hay documentación para desarrolladores

Dejavoo
  "gateway": "denovosystempay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

DEUNA
  "gateway": "deuna"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Deutsche Bank AG
  "gateway":
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

No hay documentación para desarrolladores

Deutsche Bank – Merchant Solutions
  "gateway":
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

DG Financial Technology, Inc.
  "gateway": "veritrans"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Finanzas digitales
  "gateway": "digitalfinance"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Dintero
  "gateway": "dintero"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

dLocal
  "gateway": "dlocal"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

DNA Payments
  "gateway": "dnapayments"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Dojo
  "gateway": "dojo"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Dotpay
  "gateway": "dotpay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

e-SiTef - Software Express
  "gateway": "softwareexpress"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

easycard
  "gateway": "easycard"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

EasyPay
  "gateway": "easypay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Easypay EU
  "gateway": "easypaypt"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

EBANX
  "gateway": "ebanx"
  "gatewayMerchantId": "YOUR_PUBLIC_INTEGRATION_KEY"

Documentación para desarrolladores

Tarjeta electrónica
  "gateway": "ecard"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

ECOMMPAY
  "gateway": "ecommpay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Ecopaynet
  "gateway": "ecopaynet"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

ECPay
  "gateway": "ecpay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

No hay documentación para desarrolladores disponible

eftcorporation
  "gateway": "eftcorporation"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

eGHL
  "gateway": "eghl"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Elavon (Converge)
  "gateway": "convergepay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Emerchantpay
  "gateway": "emerchantpay"
  "gatewayMerchantID": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

emspay
  "gateway": "emsonline"
  "gatewayMerchantID": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Codificado
  "gateway": "encoded"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

epay
  "gateway": "epay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

EPAYJSC
  "gateway": "epayjsc"
  "gatewayMerchantID": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

EpicPay
  "gateway": "epicpay"
  "gatewayMerchantID": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Espago
  "gateway": "espago"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Etisalat
  "gateway": "etisalatpaymentgateway"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

No hay documentación para desarrolladores disponible

EveryPay S.A.
  "gateway": "EveryPay S.A."
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Evervault
  "gateway": "evervault"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

EVONET
  "gateway": "cardinfolink"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

EVOPAY
  "gateway": "EVOPAY"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Pasarela de pagos de Evo
  "gateway": "evopaymentgateway"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

No hay documentación para desarrolladores disponible

exactly.com
  "gateway": "exactly"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Pagos exactos
  "gateway": "exactpay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Fat Zebra
  "gateway": "fatzebra"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Fenige
  "gateway": "fenige"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Fexco payUnite
  "gateway": "fexco"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Fibonatix
  "gateway": "fibonatixparagon"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Financial Line
  "gateway": "finline"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Finanso UA
  "gateway": "finansoua"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

fincode byGMO
  "gateway": "fincode"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

FINEXUS
  "gateway": "finexus"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Finix
  "gateway": "finix"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

First American de Deluxe
  "gateway": "firstpay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Fiuu (antes Razer Merchant Services y MOLPay)
  "gateway": "molpay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

FIS Biller Solutions
  "gateway": "fisglobalbsp"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Fiserv
  "gateway": "fiserv"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Fiserv
  "gateway": "fiservipg"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Flitt
  "gateway": "flitt"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Fluid Pay
  "gateway": "fluidpay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

FM Finance LTD
  "gateway": "fmfinanceltd"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

ForteBank
  "gateway": "fortebank"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Fractal
  "gateway": "fractal"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Freedom Finance Bank
  "gateway": "axayscom"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

FreedomPay
  "gateway": "freedompay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

FreedomPay.Money
  "gateway": "payboxmoney"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Freepay
  "gateway": "freepay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Frontstream
  "gateway": "frontstreampayments"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Fung Payments
  "gateway": "fungpayments"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

GBPayments
  "gateway": "gbpayments"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

geidea
  "gateway": "geidea"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

GETTRX
  "gateway": "globalelectronictechnology"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Global One Pay
  "gateway": "globalonepay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

No hay documentación para desarrolladores disponible

Pagos internacionales
  "gateway": "globalpayments"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

globalpaymentsinc
  "gateway": "globalpaymentsinc"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

GMO Payment Gateway
  "gateway": "gmopg"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

GoDaddy Payments
  "gateway": "godaddypayments"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Good Idea Technologies
  "gateway": "git"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

GoPay
  "gateway": "gopay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

GP Webpay
  "gateway": "gpwebpay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

No hay documentación para desarrolladores disponible

Gravity Payments
  "gateway": "gravitypayments"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Gr4vy
  "gateway": "gr4vy"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Halyk Bank
  "gateway": "halykbank"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Helcim
  "gateway": "helcim"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

HIPS
  "gateway": "hips"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

HiTrust
  "gateway": "hitrustpay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

hutko
  "gateway": "hutko"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Hyp
  "gateway": "hyp"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

icard
  "gateway": "icardwallet"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

iCount
  "gateway": "iCount"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

IDid Tecnologia Ltda
  "gateway": "idid"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

iKhokha
  "gateway": "ikhokha"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

IMOJE
  "gateway": "imoje"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Impaya
  "gateway": "impayarus"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Inovio Payments
  "gateway": "inoviopay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

InPlat
  "gateway": "inplat"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

InstaMed
  "gateway": "instamed"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

IntaSend Solutions Limited
  "gateway": "intasend"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

IntellectMoney
  "gateway": "intellectmoney"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Interactive Transaction Solutions
  "gateway": "interactivets"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Galería de pagos de Interswitch
  "gateway": "interswitch"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Intervale
  "gateway": "intervale"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

ioka fintech
  "gateway": "ioka"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

iPay88
  "gateway": "ipay88"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

IPSI
  "gateway": "ipsi"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

iQmetrix
  "gateway": "iqmetrixpaymentservicesgateway"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

IXOPAY
  "gateway": "ixopay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

JetPay
  "gateway": "jetpay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

JudoPay
  "gateway": "judopay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

No hay documentación para desarrolladores disponible

KapitalBank
  "gateway": "eCommerceKapitalBank"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Kassa
  "gateway": "kassacom"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

kassa24pay
  "gateway": "kassa24pay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Kineox
  "gateway": "kineox"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Klix de Citadele
  "gateway": "klix"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Koin
  "gateway": "koin"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

KPay Group
  "gateway": "kpaygroup"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Lapsa Payments
  "gateway": "lapsapayments"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

LHV Pank
  "gateway": "lhvpank"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Liberty
  "gateway": "liberty"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Life Pay
  "gateway": "lifepay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Limepay
  "gateway": "limepay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Linkly
  "gateway": "linkly"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

LiqPay
  "gateway": "liqpay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

LITIQON OÜ
  "gateway": "nuvex"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Littlepay
  "gateway": "littlepay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

LogPay
  "gateway": "logpay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Loyale
  "gateway": "loyale"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

lynck
  "gateway": "lynck"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Lyra
  "gateway": "lyra"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Magnetiq Bank
  "gateway": "magnetiq"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

maib
  "gateway": "maibecomm"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

MakeCommerce (Maksekeskus)
  "gateway": "maksekeskus"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Maksu GMBH
  "gateway": "maksupayeu"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Mandarín
  "gateway": "mandarin"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Market Pay
  "gateway": "marketpay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Mastercard Payment Gateway Services
  "gateway": "mpgs"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

MerchantE
  "gateway": "merchante"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Midtrans
  "gateway": "midtrans"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Mercader guerrero
  "gateway": "merchantwarrior"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Minsait Payments Systems
  "gateway": "minsaitpaymentsgateway"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

MITEC
  "gateway": "mitecmx"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

MIXPLAT
  "gateway": "mixplat"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

MOBI.Money
  "gateway": "mobimoney"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Modulbank
  "gateway": "modulbank"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Mollie
  "gateway": "mollie"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Mondido
  "gateway": "mondido"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Monei
  "gateway": "monei"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

monek
  "gateway": "monek"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Moneris
  "gateway": "moneris"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Moneta
  "gateway": "moneta"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

No hay documentación para desarrolladores disponible

Monext
  "gateway": "monext"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

MoneyHash
  "gateway": "moneyhash"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Money.Mail.Ru
  "gateway": "moneymailru"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

monripayments
  "gateway": "monripayments"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Moov
  "gateway": "moov"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

MPay
  "gateway": "managepay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

mstartipg
  "gateway": "mstartipg"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Multicarta
  "gateway": "mulitcarta"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

MultiSafepay
  "gateway": "multisafepay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Mundipagg
  "gateway": "mundipagg"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

MyCheck
  "gateway": "mycheck"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

MyChoice2Pay
  "gateway": "mychoice2pay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

MyFatoorah
    "gateway": "myfatoorah"
    "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

MyPay
  "gateway": "mypay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

No hay documentación para desarrolladores disponible

myPOS
  "gateway": "mypos"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

N&TS Group
  "gateway": "netsgroup"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

NCCC
  "gateway": "nccc"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Neolink
  "gateway": "neolinkprocessing"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Neon Pay
  "gateway": "neonpay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Netopia
  "gateway": "netopia"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Netvalve
  "gateway": "netvalve"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Network International
  "gateway": "networkintl"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Newebpay (antes STPath, Pay2Go)
  "gateway": "newebpay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Newtech
  "gateway": "newtechmobile"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Nexi
  "gateway": "nexi"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Nexi Easy
  "gateway": "easy"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

NMI
  "gateway": "gatewayservices"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Pagos de noon
  "gateway": "noonpayments"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Noqoody Pay
  "gateway": "noqoodypay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Novalnet
  "gateway": "novalnet"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Nexi Relay
  "gateway": "nexirelay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

NTT DATA
  "gateway": "nttdatahk"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Nuvei
  "gateway": "nuvei"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Oceanpayment
  "gateway": "oceanpayment"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Omise
  "gateway": "omise"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Omno
  "gateway": "omno"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

One Inc
  "gateway": "oneinc"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Onelya
  "gateway": "onelya"
  "gatewayMerchantId": "YOUR_GATWAY_MERCHANT_ID"

Documentación para desarrolladores

Onerway
  "gateway": "ronghan"
  "gatewayMerchantId": "YOUR_GATWAY_MERCHANT_ID"

Documentación para desarrolladores

OneVision Limited
  "gateway": "onevision"
  "gatewayMerchantId": "YOUR_GATWAY_MERCHANT_ID"

Documentación para desarrolladores

OnPay
  "gateway": "onpayio"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Opayo de Elavon
  "gateway": "opayoelavon"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

OrkestaPay
  "gateway": "orkestapay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Oschadbank
  "gateway": "oschadbank"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

pagarme
  "gateway": "pagarme"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

PagBank
  "gateway": "pagbank"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

PagBrasil
  "gateway": "pagbrasil"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

PagSeguro
  "gateway": "pagsegurointernational"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

PAY2M
  "gateway": "pay2m"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Payarc
  "gateway": "payarc"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Pay.com
  "gateway": "paycom"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

PAYCOMET
  "gateway": "paycomet"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Paycross Ltd
  "gateway": "paycross"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Paydock
  "gateway": "paydock"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

PayEase
  "gateway": "payeasenet"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

PayEngine
  "gateway": "payengine"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

PayerMax
  "gateway": "payermax"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

PayFabric
  "gateway": "payfabric"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

PayFacto
  "gateway": "payfacto"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

PayFast
  "gateway": "gopayfastuat"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

paygent
  "gateway": "paygent"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Payhub
  "gateway": "payhub"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

PayKKa
  "gateway": "paykkaeu"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

PayLane
  "gateway": "paylane"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Payler
  "gateway": "payler"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

PayLink®
  "gateway": "paylink"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Carga útil
  "gateway": "payload"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Paymark
  "gateway": "paymark"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

PayMaster
  "gateway": "paymaster"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Fusión de pagos
  "gateway": "paymentfusion"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Paymentvision
  "gateway": "paymentvision"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Paymentwall
  "gateway": "paymentwall"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Paymo
  "gateway": "paymo"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Paymob
  "gateway": "gpaymob"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

PayMongo
  "gateway": "paymongo"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Paymtech
  "gateway": "paymtech"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

PayNearMe
  "gateway": "paynearme"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Payneteasy
  "gateway": "payneteasy"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Pay.nl
  "gateway": "paynl"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Paynopain
  "gateway": "paynopain"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

PayOne
  "gateway": "payone"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

PayOnline
  "gateway": "payonline"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Payoo
  "gateway": "payoo"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Pay Theory
  "gateway": "paytheory"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

PayPlus
  "gateway": "payplus"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

PayPro Pvt Ltd
  "gateway": "paypro"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

No hay documentación para desarrolladores disponible

Payrails
  "gateway": "payrails"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Payrexx
  "gateway": "payrexx"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

PayRiff
  "gateway": "payriff"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Payrix
  "gateway": "payrix"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Paysafe
  "gateway": "paysafe"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Payscout
  "gateway": "payscout"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Paysend Business
  "gateway": "paysend"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Paysoft
  "gateway": "paysoft"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Pay360
  "gateway": "pay360"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

paytech
  "gateway": "paytechsolutions"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

PayTech Ukraine
  "gateway": "paytech"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Pasarela de pagos de Payten
  "gateway": "paytentr"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Paythru
  "gateway": "paythru"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Payture
  "gateway": "payture"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

PayU
  "gateway": "payu"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

PayU LATAM
  "gateway": "payulatam"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

PAYUNi
  "gateway": "payuni"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

PayU Romania
  "gateway": "payuro"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

PayU Rusia
  "gateway": "payuru"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Payway
  "gateway": "payway"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Paywiser
  "gateway": "paywiser"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Payzone Ireland
  "gateway": "payzoneireland"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

PBT Gateway Services Ltd
  "gateway": "pbtgateway"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Pelecard
  "gateway": "pelecard"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Pensopay
  "gateway": "pensopay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Pikassa
  "gateway": "pikassa"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

PingPong
  "gateway": "pingpongx"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Pin Payments
  "gateway": "pinpayments"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Planeta
  "gateway": "cccpayment"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

PlanetPay
  "gateway": "itcardpaymentservice"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Plategka.com
  "gateway": "plategkacom"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Platón
  "gateway": "platon"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Pomelo
  "gateway": "pomelopay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Portmone
  "gateway": "portmonecom"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Preczn
  "gateway": "preczn"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

PrimePay
  "gateway": "primepay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Primer
  "gateway": "primer"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Procard
  "gateway": "procard"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

ProcessOut
  "gateway": "processout"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Przelewy24
  "gateway": "przelewy24"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

PSCB
  "gateway": "pscbru"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

PSiGate Inc.
  "gateway": "psigate"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

PXP Financial
  "gateway": "pxpfinancial"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Qenta Payment CEE
  "gateway": "qenta"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

QIWI
  "gateway": "qiwi"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Qualpay
  "gateway": "qualpay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

QuickPay
  "gateway": "quickpay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Qvalent
  "gateway": "qvalent"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Radial
  "gateway": "radial"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Raiffeisen Processing Centre
  "gateway": "raiffeisenprocessingcentre"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Rapyd
  "gateway": "rapyd"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

RBK.money
  "gateway": "rbkmoney"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Rebail Capital
  "gateway": "rebailcapital"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Rebilly
  "gateway": "Rebilly"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Recurly
  "gateway": "recurly"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Reddot
  "gateway": "reddotpayment"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Rede
  "gateway": "rede"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Redsys
  "gateway": "redsys"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Reepay
  "gateway": "reepay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

RocketGate
  "gateway": "rocketgate"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Rootline
  "gateway": "rootline"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Russian Standard Bank
  "gateway": "rsb"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Ryft
  "gateway": "ryft"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Safepay
  "gateway": "safepay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Saferpay
  "gateway": "worldlinesaferpay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Safexpay
  "gateway": "safexpay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Sberbank
  "gateway": "sberbank"
  "gatewayMerchantId": "YOUR_ORGANIZATION_NAME"

Documentación para desarrolladores

SEB Baltic
  "gateway": "sebbaltic"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

SEBES Technology
  "gateway": "sebes"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

SecurePay
  "gateway": "securepay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Sense Bank
  "gateway": "sensebank"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

SensePass
  "gateway": "sensepass"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Servicios Digitales Popular S.A.
  "gateway": "pagosazul"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Shift4
  "gateway": "shift4payments"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Shiji Group
  "gateway": "shijipaymentsolutions"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

SH Start High
  "gateway": "shstartpay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

shvarenapay
  "gateway": "shvarenapay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

simbasoft
  "gateway": "simbasoft"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Sipay
  "gateway": "sipay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

SmartPay
  "gateway": "smartpay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Softbank Payment Service
  "gateway": "sbps"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Softtouch POS and Payments
  "gateway": "softtouch"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Liso
  "gateway": "solid"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Sony Payment Services
  "gateway": "sonypaymentservices"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Splitit
  "gateway": "splitit"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Spreedly
  "gateway": "spreedly"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Cuadrado
  "gateway": "square"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

SredaPay
  "gateway": "sredapay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

SSLCOMMERZ
  "gateway": "sslcommerz"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Stancer
  "gateway": "stancer"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Stripe
  "gateway": "stripe"
  "stripe:version": "2018-10-31"
  "stripe:publishableKey": "YOUR_PUBLIC_STRIPE_KEY"

Documentación para desarrolladores

SUMIT
  "gateway": "sumit"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Suntech
  "gateway": "esafe"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Pagos con Surfboard
  "gateway": "surfboard"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Svea Bank
  "gateway": "svea"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Swedbank Baltic
  "gateway": "swedbankbaltic"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Swedbank Pay
  "gateway": "payexswedbankpay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

TabaPay
  "gateway": "tabapay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

TapPay (Cherri Tech)
  "gateway": "tappay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

TapPayments
  "gateway": "tappayments"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

tarlanpayments
  "gateway": "tarlanpayments"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Enlace de TAS
  "gateway": "taslink"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Tatra banka (CardPay)
  "gateway": "tatrabanka"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

No hay documentación para desarrolladores disponible

TEKO
  "gateway": "teko"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

theMAP
  "gateway": "themap"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Till Payments
  "gateway": "tillpayments"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Time Project LLC
  "gateway": "timeproject"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Tinkoff
  "gateway": "tinkoff"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

TIPTOP PAY
  "gateway": "tiptoppay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

No hay documentación para desarrolladores disponible

TPay
  "gateway": "tpaycom"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

TPay.com
  "gateway": "tpay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Transact Campus
  "gateway": "transactcampus"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Transact Pro
  "gateway": "transactpro"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Red de servicios de transacciones
  "gateway": "tns"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Transpayrent
  "gateway": "transpayrent"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Tranzila
  "gateway": "tranzila"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Tranzzo
  "gateway": "tranzzo"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Tribe Payments
  "gateway": "tribepayments"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Truevo
  "gateway": "truevo"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

TrustPay
  "gateway": "trustpay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Trust Payments
  "gateway": "trustpayments"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Atún
  "gateway": "tuna"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

2can&ibox
  "gateway": "twocan"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

UAPAY
  "gateway": "uapay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

UBRR
  "gateway": "ubrrpay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Ukrcardpay
  "gateway": "ukrcardpay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

UkrGasBank Pay
  "gateway": "ukrgasbankpay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Unibank OJSC
  "gateway": "unibankcheckout"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

unitedfinancialcorporation
  "gateway": "unitedfinancialcorporation"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Uniteller
  "gateway": "uniteller"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Unitpay
  "gateway": "unitpay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Unlimint
  "gateway": "unlimint"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Unzer
  "gateway": "unzer"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Unzer Austria
  "gateway": "unzeraustria"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

UPC
  "gateway": "upc"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Upgate
  "gateway": "upgate"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

USAePay
  "gateway": "usaepay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

UseePay
  "gateway": "useepay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

USIO, Inc.
  "gateway": "usio"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Valitor
  "gateway": "valitor"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

value.io
  "gateway": "inspirecommerce"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Vanco
  "gateway": "vanco"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

VantagePay
  "gateway": "vantagepay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

No hay documentación para desarrolladores disponible

Vantiv
  "gateway": "vantiv"
  "vantiv:merchantPayPageId": "YOUR_PAY_PAGE_ID"
  "vantiv:merchantOrderId": "YOUR_ORDER_ID"
  "vantiv:merchantTransactionId": "YOUR_TRANSACTION_ID"
  "vantiv:merchantReportGroup": "*web"

Documentación para desarrolladores

Vayapay
  "gateway": "vayapay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

No hay documentación para desarrolladores disponible

Vendo
  "gateway": "vendoservices"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Verestro
  "gateway": "verestro"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Seguridad muy buena
  "gateway": "verygoodsecurity"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Victoriabank
  "gateway": "victoriabank"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Vindicia
  "gateway": "vindicia"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Viva Wallet
  "gateway": "vivawallet"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

VTEX
  "gateway": "vtex"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Waffo
  "gateway": "waffo"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Wallee
  "gateway": "wallee"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Walletdoc
  "gateway": "walletdoc"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Walletto
  "gateway": "walletto"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

WayForPay
  "gateway": "wayforpay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

WEAT
  "gateway": "weatpay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

WhenThen
  "gateway": "whenthen"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Windcave
  "gateway": "windcave"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Wirebank
  "gateway": "wirebank"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Wirecard
  "gateway": "wirecard"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

WOOPPAY
  "gateway": "wooppay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

WooshPay
  "gateway": "swooshtransfer"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Worldline (GlobalCollect)
  "gateway": "globalcollect"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Worldline - Ingenico (WL Online Checkout)
  "gateway": "worldlineingenicoogone"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Worldline Nordics (Worldline Online Checkout)
  "gateway": "worldlineonlinecheckout"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Worldline Sips
  "gateway": "wlsips"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Worldnet
  "gateway": "worldnet"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Worldpay
  "gateway": "worldpay"
  "gatewayMerchantId": "YOUR_WORLDPAY_MERCHANT_ID"

Documentación para desarrolladores

Wpay
  "gateway": "wpayaus"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

WSPay
  "gateway": "wspay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

xMoney
  "gateway": "xmoneypay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

XPATE
  "gateway": "xpate"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

xpay
  "gateway": "xpaycomua"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

XPay by PostEx
  "gateway": "xpaybypostex"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

YabandPay B.V.
  "gateway": "yabandpay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Sistema de pago YIĞIM
  "gateway": "yigim"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

No hay documentación para desarrolladores disponible

ЮKassa (YooKassa)
  "gateway": "yoomoney"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Yuno
  "gateway": "yuno"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Crédito Z
  "gateway": "zcredit"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Zalopay
  "gateway": "zalopay"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

ZEN.com
  "gateway": "zen"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Zest
  "gateway": "zestpayment"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Zuora
  "gateway": "zuora"
  "gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"

Documentación para desarrolladores

Nota: example es un nombre de pasarela válido en el entorno de prueba. Si quieres probar la API, puedes dejar el ejemplo de código anterior tal cual. Cuando uses la pasarela example, tu sitio no recibirá datos de tarjetas que permitan realizar transacciones, pero el flujo de usuario será el mismo.

El tipo de tokenización PAYMENT_GATEWAY es la implementación más habitual del método de pago con tarjeta en la API de Google Pay. Si tu proveedor de pagos no es compatible, es posible que puedas aceptar Google Pay mediante una integración DIRECTA. Para obtener más información, consulta la documentación sobre la tokenización directa.

Paso 3: Define las redes de tarjetas de pago admitidas

Defina las redes de tarjetas aceptadas por su sitio. Consulta el siguiente código de ejemplo:

const allowedCardNetworks = ["AMEX", "DISCOVER", "INTERAC", "JCB", "MASTERCARD", "VISA"];

La API Google Pay puede devolver tarjetas registradas en Google.com (PAN_ONLY) o un token de dispositivo en un dispositivo Android autenticado con un criptograma 3-D Secure (CRYPTOGRAM_3DS). Puedes controlar si se pueden devolver ambos métodos o solo uno de ellos.

Antes de configurar allowedCardAuthMethods, confirma con tu procesador de pagos y tu entidad adquirente si se admiten tokens de dispositivo (CRYPTOGRAM_3DS) en tu región.

Consulta el siguiente código de ejemplo:

const allowedCardAuthMethods = ["PAN_ONLY", "CRYPTOGRAM_3DS"];

Para obtener más información, consulta CardParameters en nuestra documentación de referencia de objetos. Además, consulta con tu pasarela o procesador las redes de tarjetas admitidas y si admiten tokens de dispositivos Android.

Importante:
  • Asegúrate de aplicar también las comprobaciones y los controles de riesgo que ya tengas a las transacciones de Google Pay. Las validaciones y comprobaciones de fraude de Google Pay no tienen como objetivo sustituir tus procesos de gestión de riesgos.
  • Si admites PAN_ONLY, asegúrate de activar 3D Secure (autenticación reforzada) para las transacciones PAN_ONLY de PAN de Google Pay de la misma forma que activas 3D Secure para las transacciones normales con tarjeta.

Paso 4: Describe los métodos de pago que permites

Para describir los métodos de pago que aceptas, sigue estos pasos:

  1. Combina tus métodos de autenticación y redes de tarjetas admitidos para describir la compatibilidad de tu sitio con el método de pago CARD. Consulta el siguiente código de ejemplo:
    const baseCardPaymentMethod = {
      type: 'CARD',
      parameters: {
        allowedAuthMethods: allowedCardAuthMethods,
        allowedCardNetworks: allowedCardNetworks
      }
    };
  2. Extiende el objeto del método de pago de la tarjeta base para describir la información que esperas que se devuelva a tu aplicación. Incluya una descripción de los datos de pago tokenizados. Consulta el siguiente código de ejemplo:
    const cardPaymentMethod = Object.assign(
      {tokenizationSpecification: tokenizationSpecification},
      baseCardPaymentMethod
    );
  3. Para obtener más información sobre las parameters admitidas, consulta CardParameters.

    Actualmente, Google Pay solo admite el tipo de método de pago CARD.

Paso 5: Carga la biblioteca de JavaScript de la API Google Pay

Para cargar la biblioteca JavaScript de la API Google Pay, sigue estos pasos:

  1. Incluye el JavaScript alojado de Google en tu página. Consulta el siguiente código de ejemplo:
    <script
      async
      src="https://pay.google.com/gp/p/js/pay.js"
      onload="console.log('TODO: add onload function')">
    </script>
  2. Una vez que se haya cargado la biblioteca de JavaScript de la API de Google Pay, inicializa un objeto PaymentsClient. El desarrollo inicial usa un entorno TEST, que devuelve métodos de pago ficticios adecuados para hacer referencia a la estructura de una respuesta de pago. En este entorno, el método de pago seleccionado no puede realizar transacciones. Consulta el siguiente código de ejemplo.
    Nota: Te recomendamos que inicialices paymentsClient solo una vez. Usa la misma instancia cuando invoques todas las demás APIs, como CreateButton, IsReadyToPay, PrefetchPaymentData y LoadPaymentData.
    const paymentsClient =
        new google.payments.api.PaymentsClient({environment: 'TEST'});

    Para obtener más información sobre los requisitos de un entorno de PRODUCTION que devuelva métodos de pago facturables, consulta la lista de comprobación de la integración.

Paso 6: Determina si se puede pagar con la API Google Pay

Para determinar si se puede pagar con la API Google Pay, sigue estos pasos:

  1. Añade los métodos de pago permitidos al objeto de solicitud base. Consulta el siguiente código de ejemplo:
    const isReadyToPayRequest = Object.assign({}, baseRequest);
    isReadyToPayRequest.allowedPaymentMethods = [baseCardPaymentMethod];
  2. Llama a isReadyToPay() para determinar si el dispositivo y el navegador actuales admiten la API de Google Pay para los métodos de pago especificados. Consulta el siguiente código de ejemplo:
    paymentsClient.isReadyToPay(isReadyToPayRequest)
        .then(function(response) {
          if (response.result) {
            // add a Google Pay payment button
          }
        })
        .catch(function(err) {
          // show error in developer console for debugging
          console.error(err);
        });

Paso 7: Añade un botón de pago de Google Pay

Añade un botón de pago de Google Pay a tu página para animar a los compradores a completar la compra con métodos de pago compatibles con la API de Google Pay y tu sitio. Para obtener más información sobre los tipos de botones, los colores y los requisitos de visualización disponibles, consulta las directrices de marca.

Consulta el siguiente código de ejemplo de botón de pago:

const button =
    paymentsClient.createButton({onClick: () => console.log('TODO: click handler'),
    allowedPaymentMethods: []}); // same payment methods as for the loadPaymentData() API call
document.getElementById('container').appendChild(button);

Paso 8: Crea un objeto PaymentDataRequest

Para crear un objeto PaymentDataRequest, sigue estos pasos:

  1. Crea un objeto de JavaScript que describa la compatibilidad de tu sitio con la API Google Pay. Para ver una lista completa de las propiedades admitidas, consulta PaymentDataRequest. Consulta el siguiente código de ejemplo:
    const paymentDataRequest = Object.assign({}, baseRequest);
  2. Añade los métodos de pago admitidos por tu aplicación, como cualquier configuración de datos adicionales que se espere en la respuesta. Consulta el siguiente código de ejemplo:
    paymentDataRequest.allowedPaymentMethods = [cardPaymentMethod];
  3. Define un precio total y una moneda para que el comprador autorice la compra. Consulta el siguiente código de ejemplo:
    Importante: Los comerciantes que procesen transacciones en el Espacio Económico Europeo (EEE) o en cualquier otro país sujeto a la autenticación reforzada de clientes (SCA) deben incluir los parámetros countryCode, totalPrice y merchantName para cumplir los requisitos de la SCA.
    paymentDataRequest.transactionInfo = {
      totalPriceStatus: 'FINAL',
      totalPrice: '123.45',
      currencyCode: 'USD',
      countryCode: 'US'
    };
  4. Proporcione un nombre de comerciante visible para los usuarios y utilice el valor TEST merchantId cuando esté en TEST. Para obtener más información y saber cuándo sustituir el valor de TEST merchantId, consulta MerchantInfo. Consulta el siguiente código de ejemplo de un nombre de comerciante visible para los usuarios:
    paymentDataRequest.merchantInfo = {
      merchantName: 'Example Merchant'
      merchantId: '12345678901234567890'
    };
    Nota: El valor TEST merchantId es numérico. El valor de merchantId puede ser numérico o alfanumérico. Consulte MerchantInfo para obtener más información sobre cómo obtener su merchantId específico.

Paso 9: Registra un controlador de eventos para los gestos del usuario

Para registrar un controlador de eventos para los gestos del usuario, sigue estos pasos:

  1. Registra un controlador de eventos de clic para el botón de compra. El controlador de eventos llama a loadPaymentData() inmediatamente después de interactuar con el botón de pago de Google Pay.
  2. Después de que un usuario de Google conceda permiso a tu sitio para recibir información sobre la forma de pago seleccionada y los datos de contacto opcionales, gestiona la respuesta de la API de Google Pay.
  3. Extrae el token de pago de la respuesta paymentData. Si implementas una integración de pasarela, envía este token a tu pasarela sin modificarlo.
    Nota: En un entorno de TEST, una respuesta de pago incluye datos de resumen sobre el método de pago seleccionado que se pueden mostrar en una página de confirmación. La respuesta de pago no incluye un método de pago que pueda realizar una transacción.
    paymentsClient.loadPaymentData(paymentDataRequest).then(function(paymentData){
      // if using gateway tokenization, pass this token without modification
      paymentToken = paymentData.paymentMethodData.tokenizationData.token;
    }).catch(function(err){
      // show error in developer console for debugging
      console.error(err);
    });

Paso 10 (opcional): Configura Autorizar pagos

Authorize Payments se usa para iniciar el proceso de pago y confirmar el estado de autorización de un pago. Para configurar Autorizar pagos, sigue estos pasos:

  1. Registra una retrollamada de onPaymentAuthorized() en PaymentOptions.
  2. Llama a la función loadPaymentData() con el intent de retrollamada PAYMENT_AUTHORIZATION.
  3. Implementa onPaymentAuthorized().

Registrar retrollamadas onPaymentAuthorized

En el siguiente código de ejemplo se muestra cómo registrar las devoluciones de llamada de onPaymentAuthorized:

{
  environment: "TEST",
  merchantInfo: {
    merchantName: "Example Merchant",
    merchantId: "12345678901234567890"
  },
  paymentDataCallbacks: {
    onPaymentAuthorized: onPaymentAuthorized
  }
}

Cargar datos de pago con intents de retrollamada

En el siguiente código de ejemplo se muestra cómo inicializar la hoja de pago con Authorize Payments:

const paymentDataRequest = Object.assign({}, baseRequest);
paymentDataRequest.allowedPaymentMethods = [cardPaymentMethod];
paymentDataRequest.transactionInfo = getGoogleTransactionInfo();
paymentDataRequest.merchantInfo = {
  merchantName: 'Example Merchant'
  merchantId: '12345678901234567890',
};

paymentDataRequest.callbackIntents = ["PAYMENT_AUTHORIZATION"];

Gestionar las retrollamadas onPaymentAuthorized

Google invoca la retrollamada onPaymentAuthorized() con un objeto PaymentData después de que el pagador apruebe el pago mediante un gesto del usuario, por ejemplo, si hace clic en Pagar.

La retrollamada devuelve un valor Promise<PaymentAuthorizationResult>. El objeto PaymentAuthorizationResult tiene el estado de transacción SUCCESS o ERROR. Si se completa correctamente, la hoja de pago se cierra correctamente. Si se produce un error, la hoja de pago muestra los detalles del error devueltos después de procesar el pago. El usuario puede cambiar los datos de pago de la hoja de pago y volver a autorizar el pago. Consulta el siguiente código de ejemplo:

function onPaymentAuthorized(paymentData) {
  return new Promise(function(resolve, reject){
    // handle the response
    processPayment(paymentData)
    .then(function() {
      resolve({transactionState: 'SUCCESS'});
    })
    .catch(function() {
      resolve({
        transactionState: 'ERROR',
        error: {
          intent: 'PAYMENT_AUTHORIZATION',
          message: 'Insufficient funds',
          reason: 'PAYMENT_DATA_INVALID'
        }
      });
    });
  });
}

Paso 11 (opcional si ha habilitado los envíos): Configurar las actualizaciones dinámicas de precios

Las actualizaciones dinámicas de precios permiten a los comerciantes actualizar dinámicamente las opciones de envío y la información de las transacciones en función de la dirección de envío elegida. Además, puede actualizar dinámicamente la información de las transacciones en función de la opción de envío elegida.

Para configurar las actualizaciones dinámicas de precios, sigue estos pasos:

  1. Registra las retrollamadas onPaymentAuthorized y onPaymentDataChanged en PaymentOptions.
  2. Llama a la función loadPaymentData() con intents de retrollamada. Para obtener más información, consulta el ejemplo correspondiente.
  3. Implementa onPaymentAuthorized y onPaymentDataChanged.

Registrar la retrollamada PaymentData

En el siguiente ejemplo de código se muestra que la actualización dinámica de precios requiere que se registren funciones de retrollamada en el objeto PaymentsClient paymentOptions.

{
  environment: "TEST",
  merchantInfo: {
    merchantName: "Example Merchant",
    merchantId: "12345678901234567890"
  },
  paymentDataCallbacks: {
    onPaymentAuthorized: onPaymentAuthorized,
    onPaymentDataChanged: onPaymentDataChanged
  }
}

Cargar datos de pago con intents de retrollamada

En el siguiente código de ejemplo se muestra cómo se debe inicializar una hoja de pago con una dirección de envío obligatoria y una configuración de opciones de envío:

const paymentDataRequest = Object.assign({}, baseRequest);
paymentDataRequest.allowedPaymentMethods = [cardPaymentMethod];
paymentDataRequest.transactionInfo = getGoogleTransactionInfo();
paymentDataRequest.merchantInfo = {
  merchantId: '12345678901234567890',
  merchantName: 'Example Merchant'
};

paymentDataRequest.callbackIntents = ["SHIPPING_ADDRESS",  "SHIPPING_OPTION", "PAYMENT_AUTHORIZATION"];


paymentDataRequest.shippingAddressRequired = true;
paymentDataRequest.shippingAddressParameters = getGoogleShippingAddressParameters();
paymentDataRequest.shippingOptionRequired = true;

Gestionar la retrollamada onPaymentDataChanged

Se invoca la retrollamada onPaymentDataChanged con un objeto IntermediatePaymentData que incluye la dirección de envío y la opción de envío seleccionadas en la hoja de pago.

La retrollamada devuelve un objeto Promise<PaymentDataRequestUpdate>. El objeto PaymentDataRequestUpdate tiene nueva información de la transacción, opciones de envío y un error en los datos de pago. Estos datos actualizan la hoja de pago.

Gestiona directamente en la hoja de pago los casos excepcionales, como una dirección de envío no válida o una opción de envío no válida. Configura un objeto PaymentDataError para destacar el motivo del error con un mensaje de error para el usuario. No olvides incluir la intención relacionada en el mensaje. Para obtener información sobre cómo configurar el objeto y el mensaje, consulta el siguiente código de muestra:

function onPaymentDataChanged(intermediatePaymentData) {
  return new Promise(function(resolve, reject) {

    let shippingAddress = intermediatePaymentData.shippingAddress;
    let shippingOptionData = intermediatePaymentData.shippingOptionData;
    let paymentDataRequestUpdate = {};

    if (intermediatePaymentData.callbackTrigger == "INITIALIZE" || intermediatePaymentData.callbackTrigger == "SHIPPING_ADDRESS") {
      if(shippingAddress.administrativeArea == "NJ")  {
        paymentDataRequestUpdate.error = getGoogleUnserviceableAddressError();
      }
      else {
        paymentDataRequestUpdate.newShippingOptionParameters = getGoogleDefaultShippingOptions();
        let selectedShippingOptionId = paymentDataRequestUpdate.newShippingOptionParameters.defaultSelectedOptionId;
        paymentDataRequestUpdate.newTransactionInfo = calculateNewTransactionInfo(selectedShippingOptionId);
      }
    }
    else if (intermediatePaymentData.callbackTrigger == "SHIPPING_OPTION") {
      paymentDataRequestUpdate.newTransactionInfo = calculateNewTransactionInfo(shippingOptionData.id);
    }

    resolve(paymentDataRequestUpdate);
  });
}

Paso 12 (opcional para códigos promocionales): Configura los códigos promocionales

Los códigos promocionales permiten a los comerciantes actualizar dinámicamente las opciones de envío y la información de las transacciones en función de un código promocional proporcionado.

Para configurar códigos promocionales, sigue estos pasos:

  1. Registra las retrollamadas de onPaymentDataChanged en PaymentOptions.
  2. Llama a la función loadPaymentData() con intents de retrollamada. Para obtener más información, consulta el ejemplo correspondiente.
  3. Implementa onPaymentDataChanged callback function.

Registrar retrollamada de oferta

En el siguiente código de ejemplo se muestra que los códigos promocionales requieren que las funciones de retrollamada se registren en el objeto PaymentsClient paymentOptions.

{
  environment: "TEST",
  merchantInfo: {
    merchantName: "Example Merchant",
    merchantId: "12345678901234567890"
  },
  paymentDataCallbacks: {
    onPaymentDataChanged: onPaymentDataChanged
  }
}

Cargar datos de pago con intents de retrollamada

En el siguiente código de ejemplo se muestra cómo se debe inicializar una hoja de pago con un intent de devolución de llamada OFFER:

const paymentDataRequest = Object.assign({}, baseRequest);
paymentDataRequest.allowedPaymentMethods = [cardPaymentMethod];
paymentDataRequest.transactionInfo = getGoogleTransactionInfo();
paymentDataRequest.merchantInfo = {
  merchantId: '12345678901234567890',
  merchantName: 'Example Merchant'
};

paymentDataRequest.callbackIntents = ["OFFER"];

Gestionar la retrollamada onPaymentDataChanged

Se invoca la retrollamada onPaymentDataChanged con un objeto IntermediatePaymentData que incluye la dirección de envío y la opción de envío seleccionadas en la hoja de pago.

La retrollamada debe devolver un Promise<PaymentDataRequestUpdate>. El objeto PaymentDataRequestUpdate tiene nueva información sobre la transacción, opciones de envío, datos de la oferta y un error en los datos de pago. Estos datos actualizan la hoja de pago.

Gestiona directamente en la hoja de pagos los casos excepcionales, como los códigos promocionales no válidos. Configura un objeto PaymentDataError para destacar el motivo del error con un mensaje de error para el usuario. No olvides incluir la intención relacionada en el mensaje. Para obtener información sobre cómo configurar el objeto y el mensaje, consulta el siguiente código de ejemplo, que hace referencia a un objeto (validPromoCodes) que contiene los valores de los códigos promocionales:

function onPaymentDataChanged(intermediatePaymentData) {
  return new Promise(function(resolve, reject) {

    let redemptionCodes = [];
    let shippingOptionData = intermediatePaymentData.shippingOptionData;
    let paymentDataRequestUpdate = {};
    paymentDataRequestUpdate.newTransactionInfo = getGoogleTransactionInfo();

    // ensure that promo codes set is unique
    if(typeof intermediatePaymentData.offerData != 'undefined') {
      // convert to set then back to array
      redemptionCodes = Array.from(
        new Set(intermediatePaymentData.offerData.redemptionCodes)
      );
    }

    // OPTIONAL: ensure that the newest promo code is the only one applied
    // redemptionCodes = new Array(redemptionCodes[redemptionCodes.length -1]);

    // validate promo codes and add descriptions to payment sheet
    if (intermediatePaymentData.callbackTrigger === 'OFFER') {
      paymentDataRequestUpdate.newOfferInfo = {};
      paymentDataRequestUpdate.newOfferInfo.offers = [];
      for (redemptionCode of redemptionCodes) {
        if (validPromoCodes[redemptionCode]) {
          paymentDataRequestUpdate = validPromoCodes[redemptionCode].function(
            validPromoCodes[redemptionCode],
            paymentDataRequestUpdate
          );
        } else {
          paymentDataRequestUpdate.error = getGoogleOfferInvalidError(redemptionCode);
        }
      }
    }

Analizar todos los datos en conjunto

Los bloques de código de ejemplo de esta sección muestran un ejemplo completo de principio a fin del tutorial de la biblioteca JavaScript de la API Google Pay, Autorizar pagos, Actualizaciones dinámicas de precios y Códigos promocionales.

Tutorial

<div id="container"></div>

<script>
/**
 * Define the version of the Google Pay API referenced when creating your
 * configuration
 *
 * @see {@link https://developers.google.com/pay/api/web/reference/request-objects#PaymentDataRequest|apiVersion in PaymentDataRequest}
 */
const baseRequest = {
  apiVersion: 2,
  apiVersionMinor: 0
};

/**
 * Card networks supported by your site and your gateway
 *
 * @see {@link https://developers.google.com/pay/api/web/reference/request-objects#CardParameters|CardParameters}
 * @todo confirm card networks supported by your site and gateway
 */
const allowedCardNetworks = ["AMEX", "DISCOVER", "INTERAC", "JCB", "MASTERCARD", "VISA"];

/**
 * Card authentication methods supported by your site and your gateway
 *
 * @see {@link https://developers.google.com/pay/api/web/reference/request-objects#CardParameters|CardParameters}
 * @todo confirm your processor supports Android device tokens for your
 * supported card networks
 */
const allowedCardAuthMethods = ["PAN_ONLY", "CRYPTOGRAM_3DS"];

/**
 * Identify your gateway and your site's gateway merchant identifier
 *
 * The Google Pay API response will return an encrypted payment method capable
 * of being charged by a supported gateway after payer authorization
 *
 * @todo check with your gateway on the parameters to pass
 * @see {@link https://developers.google.com/pay/api/web/reference/request-objects#gateway|PaymentMethodTokenizationSpecification}
 */
const tokenizationSpecification = {
  type: 'PAYMENT_GATEWAY',
  parameters: {
    'gateway': 'example',
    'gatewayMerchantId': 'exampleGatewayMerchantId'
  }
};

/**
 * Describe your site's support for the CARD payment method and its required
 * fields
 *
 * @see {@link https://developers.google.com/pay/api/web/reference/request-objects#CardParameters|CardParameters}
 */
const baseCardPaymentMethod = {
  type: 'CARD',
  parameters: {
    allowedAuthMethods: allowedCardAuthMethods,
    allowedCardNetworks: allowedCardNetworks
  }
};

/**
 * Describe your site's support for the CARD payment method including optional
 * fields
 *
 * @see {@link https://developers.google.com/pay/api/web/reference/request-objects#CardParameters|CardParameters}
 */
const cardPaymentMethod = Object.assign(
  {},
  baseCardPaymentMethod,
  {
    tokenizationSpecification: tokenizationSpecification
  }
);

/**
 * An initialized google.payments.api.PaymentsClient object or null if not yet set
 *
 * @see {@link getGooglePaymentsClient}
 */
let paymentsClient = null;

/**
 * Configure your site's support for payment methods supported by the Google Pay
 * API.
 *
 * Each member of allowedPaymentMethods should contain only the required fields,
 * allowing reuse of this base request when determining a viewer's ability
 * to pay and later requesting a supported payment method
 *
 * @returns {object} Google Pay API version, payment methods supported by the site
 */
function getGoogleIsReadyToPayRequest() {
  return Object.assign(
      {},
      baseRequest,
      {
        allowedPaymentMethods: [baseCardPaymentMethod]
      }
  );
}

/**
 * Configure support for the Google Pay API
 *
 * @see {@link https://developers.google.com/pay/api/web/reference/request-objects#PaymentDataRequest|PaymentDataRequest}
 * @returns {object} PaymentDataRequest fields
 */
function getGooglePaymentDataRequest() {
  const paymentDataRequest = Object.assign({}, baseRequest);
  paymentDataRequest.allowedPaymentMethods = [cardPaymentMethod];
  paymentDataRequest.transactionInfo = getGoogleTransactionInfo();
  paymentDataRequest.merchantInfo = {
    // @todo a merchant ID is available for a production environment after approval by Google
    // See {@link https://developers.google.com/pay/api/web/guides/test-and-deploy/integration-checklist|Integration checklist}
    // merchantId: '12345678901234567890',
    merchantName: 'Example Merchant'
  };
  return paymentDataRequest;
}

/**
 * Return an active PaymentsClient or initialize
 *
 * @see {@link https://developers.google.com/pay/api/web/reference/client#PaymentsClient|PaymentsClient constructor}
 * @returns {google.payments.api.PaymentsClient} Google Pay API client
 */
function getGooglePaymentsClient() {
  if ( paymentsClient === null ) {
    paymentsClient = new google.payments.api.PaymentsClient({environment: 'TEST'});
  }
  return paymentsClient;
}

/**
 * Initialize Google PaymentsClient after Google-hosted JavaScript has loaded
 *
 * Display a Google Pay payment button after confirmation of the viewer's
 * ability to pay.
 */
function onGooglePayLoaded() {
  const paymentsClient = getGooglePaymentsClient();
  paymentsClient.isReadyToPay(getGoogleIsReadyToPayRequest())
      .then(function(response) {
        if (response.result) {
          addGooglePayButton();
          // @todo prefetch payment data to improve performance after confirming site functionality
          // prefetchGooglePaymentData();
        }
      })
      .catch(function(err) {
        // show error in developer console for debugging
        console.error(err);
      });
}

/**
 * Add a Google Pay purchase button alongside an existing checkout button
 *
 * @see {@link https://developers.google.com/pay/api/web/reference/request-objects#ButtonOptions|Button options}
 * @see {@link https://developers.google.com/pay/api/web/guides/brand-guidelines|Google Pay brand guidelines}
 */
function addGooglePayButton() {
  const paymentsClient = getGooglePaymentsClient();
  const button =
      paymentsClient.createButton({
        onClick: onGooglePaymentButtonClicked,
        allowedPaymentMethods: [baseCardPaymentMethod]
      });
  document.getElementById('container').appendChild(button);
}

/**
 * Provide Google Pay API with a payment amount, currency, and amount status
 *
 * @see {@link https://developers.google.com/pay/api/web/reference/request-objects#TransactionInfo|TransactionInfo}
 * @returns {object} transaction info, suitable for use as transactionInfo property of PaymentDataRequest
 */
function getGoogleTransactionInfo() {
  return {
    countryCode: 'US',
    currencyCode: 'USD',
    totalPriceStatus: 'FINAL',
    // set to cart total
    totalPrice: '1.00'
  };
}

/**
 * Prefetch payment data to improve performance
 *
 * @see {@link https://developers.google.com/pay/api/web/reference/client#prefetchPaymentData|prefetchPaymentData()}
 */
function prefetchGooglePaymentData() {
  const paymentDataRequest = getGooglePaymentDataRequest();
  // transactionInfo must be set but does not affect cache
  paymentDataRequest.transactionInfo = {
    totalPriceStatus: 'NOT_CURRENTLY_KNOWN',
    currencyCode: 'USD'
  };
  const paymentsClient = getGooglePaymentsClient();
  paymentsClient.prefetchPaymentData(paymentDataRequest);
}

/**
 * Show Google Pay payment sheet when Google Pay payment button is clicked
 */
function onGooglePaymentButtonClicked() {
  const paymentDataRequest = getGooglePaymentDataRequest();
  paymentDataRequest.transactionInfo = getGoogleTransactionInfo();

  const paymentsClient = getGooglePaymentsClient();
  paymentsClient.loadPaymentData(paymentDataRequest)
      .then(function(paymentData) {
        // handle the response
        processPayment(paymentData);
      })
      .catch(function(err) {
        // show error in developer console for debugging
        console.error(err);
      });
}
/**
 * Process payment data returned by the Google Pay API
 *
 * @param {object} paymentData response from Google Pay API after user approves payment
 * @see {@link https://developers.google.com/pay/api/web/reference/response-objects#PaymentData|PaymentData object reference}
 */
function processPayment(paymentData) {
  // show returned data in developer console for debugging
    console.log(paymentData);
  // @todo pass payment token to your gateway to process payment
  // @note DO NOT save the payment credentials for future transactions,
  // unless they're used for merchant-initiated transactions with user
  // consent in place.
  paymentToken = paymentData.paymentMethodData.tokenizationData.token;
}</script>
<script async
  src="https://pay.google.com/gp/p/js/pay.js"
  onload="onGooglePayLoaded()"></script>

Autorizar pagos

<div id="container"></div>

<script>
/**
 * Define the version of the Google Pay API referenced when creating your
 * configuration
 *
 * @see {@link https://developers.google.com/pay/api/web/reference/request-objects#PaymentDataRequest|apiVersion in PaymentDataRequest}
 */
const baseRequest = {
  apiVersion: 2,
  apiVersionMinor: 0
};

/**
 * Card networks supported by your site and your gateway
 *
 * @see {@link https://developers.google.com/pay/api/web/reference/request-objects#CardParameters|CardParameters}
 * @todo confirm card networks supported by your site and gateway
 */
const allowedCardNetworks = ["AMEX", "DISCOVER", "INTERAC", "JCB", "MASTERCARD", "VISA"];

/**
 * Card authentication methods supported by your site and your gateway
 *
 * @see {@link https://developers.google.com/pay/api/web/reference/request-objects#CardParameters|CardParameters}
 * @todo confirm your processor supports Android device tokens for your
 * supported card networks
 */
const allowedCardAuthMethods = ["PAN_ONLY", "CRYPTOGRAM_3DS"];

/**
 * Identify your gateway and your site's gateway merchant identifier
 *
 * The Google Pay API response will return an encrypted payment method capable
 * of being charged by a supported gateway after payer authorization
 *
 * @todo check with your gateway on the parameters to pass
 * @see {@link https://developers.google.com/pay/api/web/reference/request-objects#gateway|PaymentMethodTokenizationSpecification}
 */
const tokenizationSpecification = {
  type: 'PAYMENT_GATEWAY',
  parameters: {
    'gateway': 'example',
    'gatewayMerchantId': 'exampleGatewayMerchantId'
  }
};

/**
 * Describe your site's support for the CARD payment method and its required
 * fields
 *
 * @see {@link https://developers.google.com/pay/api/web/reference/request-objects#CardParameters|CardParameters}
 */
const baseCardPaymentMethod = {
  type: 'CARD',
  parameters: {
    allowedAuthMethods: allowedCardAuthMethods,
    allowedCardNetworks: allowedCardNetworks
  }
};

/**
 * Describe your site's support for the CARD payment method including optional
 * fields
 *
 * @see {@link https://developers.google.com/pay/api/web/reference/request-objects#CardParameters|CardParameters}
 */
const cardPaymentMethod = Object.assign(
  {},
  baseCardPaymentMethod,
  {
    tokenizationSpecification: tokenizationSpecification
  }
);

/**
 * An initialized google.payments.api.PaymentsClient object or null if not yet set
 *
 * @see {@link getGooglePaymentsClient}
 */
let paymentsClient = null;

/**
 * Configure your site's support for payment methods supported by the Google Pay
 * API.
 *
 * Each member of allowedPaymentMethods should contain only the required fields,
 * allowing reuse of this base request when determining a viewer's ability
 * to pay and later requesting a supported payment method
 *
 * @returns {object} Google Pay API version, payment methods supported by the site
 */
function getGoogleIsReadyToPayRequest() {
  return Object.assign(
      {},
      baseRequest,
      {
        allowedPaymentMethods: [baseCardPaymentMethod]
      }
  );
}

/**
 * Configure support for the Google Pay API
 *
 * @see {@link https://developers.google.com/pay/api/web/reference/request-objects#PaymentDataRequest|PaymentDataRequest}
 * @returns {object} PaymentDataRequest fields
 */
function getGooglePaymentDataRequest() {
  const paymentDataRequest = Object.assign({}, baseRequest);
  paymentDataRequest.allowedPaymentMethods = [cardPaymentMethod];
  paymentDataRequest.transactionInfo = getGoogleTransactionInfo();
  paymentDataRequest.merchantInfo = {
    // @todo a merchant ID is available for a production environment after approval by Google
    // See {@link https://developers.google.com/pay/api/web/guides/test-and-deploy/integration-checklist|Integration checklist}
    // merchantId: '12345678901234567890',
    merchantName: 'Example Merchant'
  };

  paymentDataRequest.callbackIntents = ["PAYMENT_AUTHORIZATION"];

  return paymentDataRequest;
}

/**
 * Return an active PaymentsClient or initialize
 *
 * @see {@link https://developers.google.com/pay/api/web/reference/client#PaymentsClient|PaymentsClient constructor}
 * @returns {google.payments.api.PaymentsClient} Google Pay API client
 */
function getGooglePaymentsClient() {
  if ( paymentsClient === null ) {
    paymentsClient = new google.payments.api.PaymentsClient({
    	environment: 'TEST',
      paymentDataCallbacks: {
      	onPaymentAuthorized: onPaymentAuthorized
      }
    });
  }
  return paymentsClient;
}

/**
 * Handles authorize payments callback intents.
 *
 * @param {object} paymentData response from Google Pay API after a payer approves payment through user gesture.
 * @see {@link https://developers.google.com/pay/api/web/reference/response-objects#PaymentData object reference}
 *
 * @see {@link https://developers.google.com/pay/api/web/reference/response-objects#PaymentAuthorizationResult}
 * @returns Promise<{object}> Promise of PaymentAuthorizationResult object to acknowledge the payment authorization status.
 */
function onPaymentAuthorized(paymentData) {
	return new Promise(function(resolve, reject){
    // handle the response
    processPayment(paymentData)
    .then(function() {
      resolve({transactionState: 'SUCCESS'});
    })
    .catch(function() {
      resolve({
        transactionState: 'ERROR',
        error: {
          intent: 'PAYMENT_AUTHORIZATION',
          message: 'Insufficient funds',
          reason: 'PAYMENT_DATA_INVALID'
        }
      });
  	});
  });
}

/**
 * Initialize Google PaymentsClient after Google-hosted JavaScript has loaded
 *
 * Display a Google Pay payment button after confirmation of the viewer's
 * ability to pay.
 */
function onGooglePayLoaded() {
  const paymentsClient = getGooglePaymentsClient();
  paymentsClient.isReadyToPay(getGoogleIsReadyToPayRequest())
      .then(function(response) {
        if (response.result) {
          addGooglePayButton();
        }
      })
      .catch(function(err) {
        // show error in developer console for debugging
        console.error(err);
      });
}

/**
 * Add a Google Pay purchase button alongside an existing checkout button
 *
 * @see {@link https://developers.google.com/pay/api/web/reference/request-objects#ButtonOptions|Button options}
 * @see {@link https://developers.google.com/pay/api/web/guides/brand-guidelines|Google Pay brand guidelines}
 */
function addGooglePayButton() {
  const paymentsClient = getGooglePaymentsClient();
  const button =
      paymentsClient.createButton({
        onClick: onGooglePaymentButtonClicked,
        allowedPaymentMethods: [baseCardPaymentMethod]
      });
  document.getElementById('container').appendChild(button);
}

/**
 * Provide Google Pay API with a payment amount, currency, and amount status
 *
 * @see {@link https://developers.google.com/pay/api/web/reference/request-objects#TransactionInfo|TransactionInfo}
 * @returns {object} transaction info, suitable for use as transactionInfo property of PaymentDataRequest
 */
function getGoogleTransactionInfo() {
  return {
        displayItems: [
        {
          label: "Subtotal",
          type: "SUBTOTAL",
          price: "11.00",
        },
      {
          label: "Tax",
          type: "TAX",
          price: "1.00",
        }
    ],
    countryCode: 'US',
    currencyCode: "USD",
    totalPriceStatus: "FINAL",
    totalPrice: "12.00",
    totalPriceLabel: "Total"
  };
}

/**
 * Show Google Pay payment sheet when Google Pay payment button is clicked
 */
function onGooglePaymentButtonClicked() {
  const paymentDataRequest = getGooglePaymentDataRequest();
  paymentDataRequest.transactionInfo = getGoogleTransactionInfo();

  const paymentsClient = getGooglePaymentsClient();
  paymentsClient.loadPaymentData(paymentDataRequest);
}

/**
 * Process payment data returned by the Google Pay API
 *
 * @param {object} paymentData response from Google Pay API after user approves payment
 * @see {@link https://developers.google.com/pay/api/web/reference/response-objects#PaymentData|PaymentData object reference}
 */
function processPayment(paymentData) {
	return new Promise(function(resolve, reject) {
  	setTimeout(function() {
  		// @todo pass payment token to your gateway to process payment
  		paymentToken = paymentData.paymentMethodData.tokenizationData.token;

    	resolve({});
    }, 3000);
  });
}</script>
<script async
  src="https://pay.google.com/gp/p/js/pay.js"
  onload="onGooglePayLoaded()"></script>

Actualizaciones dinámicas de precios

<div id="container"></div>

<script>
/**
 * Define the version of the Google Pay API referenced when creating your
 * configuration
 *
 * @see {@link https://developers.google.com/pay/api/web/reference/request-objects#PaymentDataRequest|apiVersion in PaymentDataRequest}
 */
const baseRequest = {
  apiVersion: 2,
  apiVersionMinor: 0
};

/**
 * Card networks supported by your site and your gateway
 *
 * @see {@link https://developers.google.com/pay/api/web/reference/request-objects#CardParameters|CardParameters}
 * @todo confirm card networks supported by your site and gateway
 */
const allowedCardNetworks = ["AMEX", "DISCOVER", "JCB", "MASTERCARD", "VISA"];

/**
 * Card authentication methods supported by your site and your gateway
 *
 * @see {@link https://developers.google.com/pay/api/web/reference/request-objects#CardParameters|CardParameters}
 * @todo confirm your processor supports Android device tokens for your
 * supported card networks
 */
const allowedCardAuthMethods = ["PAN_ONLY", "CRYPTOGRAM_3DS"];

/**
 * Identify your gateway and your site's gateway merchant identifier
 *
 * The Google Pay API response will return an encrypted payment method capable
 * of being charged by a supported gateway after payer authorization
 *
 * @todo check with your gateway on the parameters to pass
 * @see {@link https://developers.google.com/pay/api/web/reference/request-objects#gateway|PaymentMethodTokenizationSpecification}
 */
const tokenizationSpecification = {
  type: 'PAYMENT_GATEWAY',
  parameters: {
    'gateway': 'example',
    'gatewayMerchantId': 'exampleGatewayMerchantId'
  }
};

/**
 * Describe your site's support for the CARD payment method and its required
 * fields
 *
 * @see {@link https://developers.google.com/pay/api/web/reference/request-objects#CardParameters|CardParameters}
 */
const baseCardPaymentMethod = {
  type: 'CARD',
  parameters: {
    allowedAuthMethods: allowedCardAuthMethods,
    allowedCardNetworks: allowedCardNetworks
  }
};

/**
 * Describe your site's support for the CARD payment method including optional
 * fields
 *
 * @see {@link https://developers.google.com/pay/api/web/reference/request-objects#CardParameters|CardParameters}
 */
const cardPaymentMethod = Object.assign(
  {},
  baseCardPaymentMethod,
  {
    tokenizationSpecification: tokenizationSpecification
  }
);

/**
 * An initialized google.payments.api.PaymentsClient object or null if not yet set
 *
 * @see {@link getGooglePaymentsClient}
 */
let paymentsClient = null;

/**
 * Configure your site's support for payment methods supported by the Google Pay
 * API.
 *
 * Each member of allowedPaymentMethods should contain only the required fields,
 * allowing reuse of this base request when determining a viewer's ability
 * to pay and later requesting a supported payment method
 *
 * @returns {object} Google Pay API version, payment methods supported by the site
 */
function getGoogleIsReadyToPayRequest() {
  return Object.assign(
      {},
      baseRequest,
      {
        allowedPaymentMethods: [baseCardPaymentMethod]
      }
  );
}

/**
 * Configure support for the Google Pay API
 *
 * @see {@link https://developers.google.com/pay/api/web/reference/request-objects#PaymentDataRequest|PaymentDataRequest}
 * @returns {object} PaymentDataRequest fields
 */
function getGooglePaymentDataRequest() {
  const paymentDataRequest = Object.assign({}, baseRequest);
  paymentDataRequest.allowedPaymentMethods = [cardPaymentMethod];
  paymentDataRequest.transactionInfo = getGoogleTransactionInfo();
  paymentDataRequest.merchantInfo = {
    // @todo a merchant ID is available for a production environment after approval by Google
    // See {@link https://developers.google.com/pay/api/web/guides/test-and-deploy/integration-checklist|Integration checklist}
    // merchantId: '12345678901234567890',
    merchantName: 'Example Merchant'
  };

  paymentDataRequest.callbackIntents = ["SHIPPING_ADDRESS",  "SHIPPING_OPTION", "PAYMENT_AUTHORIZATION"];
  paymentDataRequest.shippingAddressRequired = true;
  paymentDataRequest.shippingAddressParameters = getGoogleShippingAddressParameters();
  paymentDataRequest.shippingOptionRequired = true;

  return paymentDataRequest;
}

/**
 * Return an active PaymentsClient or initialize
 *
 * @see {@link https://developers.google.com/pay/api/web/reference/client#PaymentsClient|PaymentsClient constructor}
 * @returns {google.payments.api.PaymentsClient} Google Pay API client
 */
function getGooglePaymentsClient() {
  if ( paymentsClient === null ) {
    paymentsClient = new google.payments.api.PaymentsClient({
      environment: "TEST",
      merchantInfo: {
        merchantName: "Example Merchant",
        merchantId: "01234567890123456789"
      },
      paymentDataCallbacks: {
      	onPaymentAuthorized: onPaymentAuthorized,
        onPaymentDataChanged: onPaymentDataChanged
      }
    });
  }
  return paymentsClient;
}


function onPaymentAuthorized(paymentData) {
	return new Promise(function(resolve, reject){

  // handle the response
  processPayment(paymentData)
    .then(function() {
      resolve({transactionState: 'SUCCESS'});
    })
    .catch(function() {
    	resolve({
        transactionState: 'ERROR',
        error: {
          intent: 'PAYMENT_AUTHORIZATION',
          message: 'Insufficient funds',
          reason: 'PAYMENT_DATA_INVALID'
        }
      });
    });

  });
}

/**
 * Handles dynamic buy flow shipping address and shipping options callback intents.
 *
 * @param {object} itermediatePaymentData response from Google Pay API a shipping address or shipping option is selected in the payment sheet.
 * @see {@link https://developers.google.com/pay/api/web/reference/response-objects#IntermediatePaymentData|IntermediatePaymentData object reference}
 *
 * @see {@link https://developers.google.com/pay/api/web/reference/response-objects#PaymentDataRequestUpdate|PaymentDataRequestUpdate}
 * @returns Promise<{object}> Promise of PaymentDataRequestUpdate object to update the payment sheet.
 */
function onPaymentDataChanged(intermediatePaymentData) {
  return new Promise(function(resolve, reject) {

   	let shippingAddress = intermediatePaymentData.shippingAddress;
    let shippingOptionData = intermediatePaymentData.shippingOptionData;
    let paymentDataRequestUpdate = {};

    if (intermediatePaymentData.callbackTrigger == "INITIALIZE" || intermediatePaymentData.callbackTrigger == "SHIPPING_ADDRESS") {
      if(shippingAddress.administrativeArea == "NJ")  {
        paymentDataRequestUpdate.error = getGoogleUnserviceableAddressError();
      }
      else {
        paymentDataRequestUpdate.newShippingOptionParameters = getGoogleDefaultShippingOptions();
        let selectedShippingOptionId = paymentDataRequestUpdate.newShippingOptionParameters.defaultSelectedOptionId;
        paymentDataRequestUpdate.newTransactionInfo = calculateNewTransactionInfo(selectedShippingOptionId);
      }
    }
    else if (intermediatePaymentData.callbackTrigger == "SHIPPING_OPTION") {
      paymentDataRequestUpdate.newTransactionInfo = calculateNewTransactionInfo(shippingOptionData.id);
    }

    resolve(paymentDataRequestUpdate);
  });
}

/**
 * Helper function to create a new TransactionInfo object.

 * @param string shippingOptionId respresenting the selected shipping option in the payment sheet.
 *
 * @see {@link https://developers.google.com/pay/api/web/reference/request-objects#TransactionInfo|TransactionInfo}
 * @returns {object} transaction info, suitable for use as transactionInfo property of PaymentDataRequest
 */
function calculateNewTransactionInfo(shippingOptionId) {
        let newTransactionInfo = getGoogleTransactionInfo();

  let shippingCost = getShippingCosts()[shippingOptionId];
  newTransactionInfo.displayItems.push({
    type: "LINE_ITEM",
    label: "Shipping cost",
    price: shippingCost,
    status: "FINAL"
  });

  let totalPrice = 0.00;
  newTransactionInfo.displayItems.forEach(displayItem => totalPrice += parseFloat(displayItem.price));
  newTransactionInfo.totalPrice = totalPrice.toString();

  return newTransactionInfo;
}

/**
 * Initialize Google PaymentsClient after Google-hosted JavaScript has loaded
 *
 * Display a Google Pay payment button after confirmation of the viewer's
 * ability to pay.
 */
function onGooglePayLoaded() {
  const paymentsClient = getGooglePaymentsClient();
  paymentsClient.isReadyToPay(getGoogleIsReadyToPayRequest())
      .then(function(response) {
        if (response.result) {
          addGooglePayButton();
          // @todo prefetch payment data to improve performance after confirming site functionality
          // prefetchGooglePaymentData();
        }
      })
      .catch(function(err) {
        // show error in developer console for debugging
        console.error(err);
      });
}

/**
 * Add a Google Pay purchase button alongside an existing checkout button
 *
 * @see {@link https://developers.google.com/pay/api/web/reference/request-objects#ButtonOptions|Button options}
 * @see {@link https://developers.google.com/pay/api/web/guides/brand-guidelines|Google Pay brand guidelines}
 */
function addGooglePayButton() {
  const paymentsClient = getGooglePaymentsClient();
  const button =
      paymentsClient.createButton({
        onClick: onGooglePaymentButtonClicked,
        allowedPaymentMethods: [baseCardPaymentMethod]
      });
  document.getElementById('container').appendChild(button);
}

/**
 * Provide Google Pay API with a payment amount, currency, and amount status
 *
 * @see {@link https://developers.google.com/pay/api/web/reference/request-objects#TransactionInfo|TransactionInfo}
 * @returns {object} transaction info, suitable for use as transactionInfo property of PaymentDataRequest
 */
function getGoogleTransactionInfo() {
  return {
        displayItems: [
        {
          label: "Subtotal",
          type: "SUBTOTAL",
          price: "11.00",
        },
      {
          label: "Tax",
          type: "TAX",
          price: "1.00",
        }
    ],
    countryCode: 'US',
    currencyCode: "USD",
    totalPriceStatus: "FINAL",
    totalPrice: "12.00",
    totalPriceLabel: "Total"
  };
}

/**
 * Provide a key value store for shippping options.
 */
function getShippingCosts() {
        return {
    "shipping-001": "0.00",
    "shipping-002": "1.99",
    "shipping-003": "10.00"
  }
}

/**
 * Provide Google Pay API with shipping address parameters when using dynamic buy flow.
 *
 * @see {@link https://developers.google.com/pay/api/web/reference/request-objects#ShippingAddressParameters|ShippingAddressParameters}
 * @returns {object} shipping address details, suitable for use as shippingAddressParameters property of PaymentDataRequest
 */
function getGoogleShippingAddressParameters() {
        return  {
        allowedCountryCodes: ['US'],
    phoneNumberRequired: true
  };
}

/**
 * Provide Google Pay API with shipping options and a default selected shipping option.
 *
 * @see {@link https://developers.google.com/pay/api/web/reference/request-objects#ShippingOptionParameters|ShippingOptionParameters}
 * @returns {object} shipping option parameters, suitable for use as shippingOptionParameters property of PaymentDataRequest
 */
function getGoogleDefaultShippingOptions() {
        return {
      defaultSelectedOptionId: "shipping-001",
      shippingOptions: [
        {
          "id": "shipping-001",
          "label": "Free: Standard shipping",
          "description": "Free Shipping delivered in 5 business days."
        },
        {
          "id": "shipping-002",
          "label": "$1.99: Standard shipping",
          "description": "Standard shipping delivered in 3 business days."
        },
        {
          "id": "shipping-003",
          "label": "$10: Express shipping",
          "description": "Express shipping delivered in 1 business day."
        },
      ]
  };
}

/**
 * Provide Google Pay API with a payment data error.
 *
 * @see {@link https://developers.google.com/pay/api/web/reference/response-objects#PaymentDataError|PaymentDataError}
 * @returns {object} payment data error, suitable for use as error property of PaymentDataRequestUpdate
 */
function getGoogleUnserviceableAddressError() {
        return {
    reason: "SHIPPING_ADDRESS_UNSERVICEABLE",
    message: "Cannot ship to the selected address",
    intent: "SHIPPING_ADDRESS"
        };
}

/**
 * Prefetch payment data to improve performance
 *
 * @see {@link https://developers.google.com/pay/api/web/reference/client#prefetchPaymentData|prefetchPaymentData()}
 */
function prefetchGooglePaymentData() {
  const paymentDataRequest = getGooglePaymentDataRequest();
  // transactionInfo must be set but does not affect cache
  paymentDataRequest.transactionInfo = {
    totalPriceStatus: 'NOT_CURRENTLY_KNOWN',
    currencyCode: 'USD'
  };
  const paymentsClient = getGooglePaymentsClient();
  paymentsClient.prefetchPaymentData(paymentDataRequest);
}


/**
 * Show Google Pay payment sheet when Google Pay payment button is clicked
 */
function onGooglePaymentButtonClicked() {
  const paymentDataRequest = getGooglePaymentDataRequest();
  paymentDataRequest.transactionInfo = getGoogleTransactionInfo();

  const paymentsClient = getGooglePaymentsClient();
  paymentsClient.loadPaymentData(paymentDataRequest);
}

/**
 * Process payment data returned by the Google Pay API
 *
 * @param {object} paymentData response from Google Pay API after user approves payment
 * @see {@link https://developers.google.com/pay/api/web/reference/response-objects#PaymentData|PaymentData object reference}
 */
function processPayment(paymentData) {
	return new Promise(function(resolve, reject) {
  	setTimeout(function() {
    	// show returned data in developer console for debugging
   	 console.log(paymentData);
  		// @todo pass payment token to your gateway to process payment
  		paymentToken = paymentData.paymentMethodData.tokenizationData.token;

    	resolve({});
    }, 3000);
  });
}</script>
<script async
  src="https://pay.google.com/gp/p/js/pay.js"
  onload="onGooglePayLoaded()"></script>

Ofertas

<div id="container"></div>

<script>
/**
 * Please note: The Promo Code callback is extremely flexible. This example
 * implementation is only one of many ways to interface with it.
 *
 * In production, your promo codes and payment logic should be securely
 * processed on your server, not client-side as in this example. Use AJAX to
 * pass this information to the payment sheet.
 */

/**
 * Define the version of the Google Pay API referenced when creating your
 * configuration
 *
 * @see {@link https://developers.google.com/pay/api/web/reference/request-objects#PaymentDataRequest|apiVersion in PaymentDataRequest}
 */
const baseRequest = {
  apiVersion: 2,
  apiVersionMinor: 0
};

/**
 * Define valid promo code strings
 *
 * This object paradigm is not necessary to implement Promo Codes, but provides
 * an example of how to implement promo code behavior in a modular way.
 *
 * In production, your promo codes should be securely processed on your server,
 * not client-side as in this example.
 *
 * code: the way the promo code itself is displayed in the payment sheet
 * description: the description provided to the user on the payment sheet
 * function: the function used to calculate the price change
 * value: the value passed into the above function. This value should be
 * negative for a discount.
 */

const validPromoCodes = {
  SOMEPROMOCODE: {
    code: 'SOMEPROMOCODE',
    description: '20% off all products!',
    function: percentageDiscount,
    value: -20 // value should be negative for a discount
  },
  ANOTHERPROMOCODE: {
    code: 'ANOTHERPROMOCODE',
    description: '$5 dollars off!',
    function: staticDiscount,
    value: -5.00 // value should be negative for a discount
  }
}

/**
 * Card networks supported by your site and your gateway
 *
 * @see {@link https://developers.google.com/pay/api/web/reference/request-objects#CardParameters|CardParameters}
 * @todo confirm card networks supported by your site and gateway
 */
const allowedCardNetworks = ['AMEX', 'DISCOVER', 'JCB', 'MASTERCARD', 'VISA'];

/**
 * Card authentication methods supported by your site and your gateway
 *
 * @see {@link https://developers.google.com/pay/api/web/reference/request-objects#CardParameters|CardParameters}
 * @todo confirm your processor supports Android device tokens for your
 * supported card networks
 */
const allowedCardAuthMethods = ['PAN_ONLY', 'CRYPTOGRAM_3DS'];

/**
 * Identify your gateway and your site's gateway merchant identifier
 *
 * The Google Pay API response will return an encrypted payment method capable
 * of being charged by a supported gateway after payer authorization
 *
 * @todo check with your gateway on the parameters to pass
 * @see {@link https://developers.google.com/pay/api/web/reference/request-objects#gateway|PaymentMethodTokenizationSpecification}
 */
const tokenizationSpecification = {
  type: 'PAYMENT_GATEWAY',
  parameters: {
    gateway: 'example',
    gatewayMerchantId: 'exampleGatewayMerchantId'
  }
};

/**
 * Describe your site's support for the CARD payment method and its required
 * fields
 *
 * @see {@link https://developers.google.com/pay/api/web/reference/request-objects#CardParameters|CardParameters}
 */
const baseCardPaymentMethod = {
  type: 'CARD',
  parameters: {
    allowedAuthMethods: allowedCardAuthMethods,
    allowedCardNetworks: allowedCardNetworks
  }
};

/**
 * Describe your site's support for the CARD payment method including optional
 * fields
 *
 * @see {@link https://developers.google.com/pay/api/web/reference/request-objects#CardParameters|CardParameters}
 */
const cardPaymentMethod = Object.assign(
  {},
  baseCardPaymentMethod,
  {
    tokenizationSpecification: tokenizationSpecification
  }
);

/**
 * An initialized google.payments.api.PaymentsClient object or null if not yet set
 *
 * @see {@link getGooglePaymentsClient}
 */
let paymentsClient = null;

/**
 * Configure your site's support for payment methods supported by the Google Pay
 * API.
 *
 * Each member of allowedPaymentMethods should contain only the required fields,
 * allowing reuse of this base request when determining a viewer's ability
 * to pay and later requesting a supported payment method
 *
 * @returns {object} Google Pay API version, payment methods supported by the site
 */
function getGoogleIsReadyToPayRequest() {
  return Object.assign(
      {},
      baseRequest,
      {
        allowedPaymentMethods: [baseCardPaymentMethod]
      }
  );
}

/**
 * Configure support for the Google Pay API
 *
 * @see {@link https://developers.google.com/pay/api/web/reference/request-objects#PaymentDataRequest|PaymentDataRequest}
 * @returns {object} PaymentDataRequest fields
 */
function getGooglePaymentDataRequest() {
  const paymentDataRequest = Object.assign({}, baseRequest);
  paymentDataRequest.allowedPaymentMethods = [cardPaymentMethod];
  paymentDataRequest.transactionInfo = getGoogleTransactionInfo();
  paymentDataRequest.merchantInfo = {
    // @todo a merchant ID is available for a production environment after approval by Google
    // See {@link https://developers.google.com/pay/api/web/guides/test-and-deploy/integration-checklist|Integration checklist}
    // merchantId: '12345678901234567890',
    merchantName: 'Example Merchant'
  };

  paymentDataRequest.callbackIntents = ['OFFER'];
  paymentDataRequest.shippingAddressRequired = false;
  paymentDataRequest.shippingAddressParameters = getGoogleShippingAddressParameters();

  return paymentDataRequest;
}

/**
 * Return an active PaymentsClient or initialize
 *
 * @see {@link https://developers.google.com/pay/api/web/reference/client#PaymentsClient|PaymentsClient constructor}
 * @returns {google.payments.api.PaymentsClient} Google Pay API client
 */
function getGooglePaymentsClient() {
  if ( paymentsClient === null ) {
    paymentsClient = new google.payments.api.PaymentsClient({
      environment: 'TEST',
      merchantInfo: {
        merchantName: 'Example Merchant',
        merchantId: '01234567890123456789'
      },
      paymentDataCallbacks: {
        onPaymentDataChanged: onPaymentDataChanged
      }
    });
  }
  return paymentsClient;
}

/**
 * These functions handle adding valid promo codes to the payment sheet
 * as well as adjusting the display items to match.
 *
 * To add a new promo code, create a new function per this template
 * and define it as valid in the onPaymentDataChanged function.
 *
 * @see {@link https://developers.google.com/pay/api/web/reference/response-objects#PaymentDataRequestUpdate|PaymentDataRequestUpdate}
 * @param {string} redemptionCode string representing the promo code to apply
 * @param {string} description string representing the description to show
 * @param {int} discountPercentage int representing the percentage to discount.
 * Please note the discount value should be negative. Ex: -20 = 20% discount.
 * @param {object} PaymentDataRequestUpdate object representing
 * the current state of the payment data request.
 * @returns {object} PaymentDataRequestUpdate object to update the
 * payment sheet with new transaction info and offer data.
 */

function percentageDiscount(promoParameters, paymentDataRequestUpdate) {
  // set variables
  let originalTransactionInfo = getGoogleTransactionInfo();
  /* because this promo code calculates a % of original prices,
   * we need to get the original transaction info */
  let newTransactionInfo = paymentDataRequestUpdate.newTransactionInfo;
  let discount = 0;

    // update promo code and description
  paymentDataRequestUpdate.newOfferInfo.offers.push({
    redemptionCode: promoParameters['code'],
    description: promoParameters['description']
  });

  // calculate discount (from original transaction items only)
  originalTransactionInfo.displayItems.forEach(function(displayItem) {
    discount += parseFloat(displayItem.price) * promoParameters['value'] * 0.01;
  });

  // add displayItem with new discount
  newTransactionInfo.displayItems.push({
      label: promoParameters['code'],
      price: discount.toFixed(2),
      type: 'LINE_ITEM'
  });

  return paymentDataRequestUpdate;
}

function staticDiscount(promoParameters, paymentDataRequestUpdate) {
  // set variables
  let newTransactionInfo = paymentDataRequestUpdate.newTransactionInfo;

    // update promo code and description
  paymentDataRequestUpdate.newOfferInfo.offers.push({
    redemptionCode: promoParameters['code'],
    description: promoParameters['description']
  });

  // add displayItem with new discount
  newTransactionInfo.displayItems.push({
      label: promoParameters['code'],
      price: promoParameters['value'].toFixed(2),
      type: 'LINE_ITEM'
  });

  return paymentDataRequestUpdate;
}

/**
 * Handles offer callback intents.
 *
 * @param {object} itermediatePaymentData response from Google Pay API when a promo code is entered in the google pay payment sheet.
 * @see {@link https://developers.google.com/pay/api/web/reference/response-objects#IntermediatePaymentData|IntermediatePaymentData object reference}
 *
 * @see {@link https://developers.google.com/pay/api/web/reference/response-objects#PaymentDataRequestUpdate|PaymentDataRequestUpdate}
 * @returns Promise<{object}> Promise of PaymentDataRequestUpdate object to update the payment sheet with new transaction info and offer data.
 */
function onPaymentDataChanged(intermediatePaymentData) {
  return new Promise(function(resolve, reject) {

    let redemptionCodes = new Set();
    let shippingOptionData = intermediatePaymentData.shippingOptionData;
    let paymentDataRequestUpdate = {};
    paymentDataRequestUpdate.newTransactionInfo = getGoogleTransactionInfo();

    // ensure that promo codes set is unique
    if(typeof intermediatePaymentData.offerData != 'undefined') {
      redemptionCodes = new Set(intermediatePaymentData.offerData.redemptionCodes);
    }

    // validate promo codes and add descriptions to payment sheet
    if (intermediatePaymentData.callbackTrigger === 'OFFER') {
      paymentDataRequestUpdate.newOfferInfo = {};
      paymentDataRequestUpdate.newOfferInfo.offers = [];
      for (redemptionCode of redemptionCodes) {
        if (validPromoCodes[redemptionCode]) {
          paymentDataRequestUpdate = validPromoCodes[redemptionCode].function(
            validPromoCodes[redemptionCode],
            paymentDataRequestUpdate
          );
        } else {
          paymentDataRequestUpdate.error = getGoogleOfferInvalidError(redemptionCode);
        }
      }
    }
    /**
     * Update item costs and total.
     *
     * In production, this final calculation should always be calculated
     * server-side to ensure it matches the price that the merchant sends to the
     * processor.
     */
    paymentDataRequestUpdate.newTransactionInfo = calculateNewTransactionInfo(
      paymentDataRequestUpdate.newTransactionInfo
    )

    resolve(paymentDataRequestUpdate);
  });
}

/**
 * Helper function to update the TransactionInfo object.
 *
 * @see {@link https://developers.google.com/pay/api/web/reference/request-objects#TransactionInfo|TransactionInfo}
 * @param {object} transactionInfo respresenting the selected shipping option in the payment sheet.
 *
 * @see {@link https://developers.google.com/pay/api/web/reference/request-objects#TransactionInfo|TransactionInfo}
 * @returns {object} transaction info, suitable for use as transactionInfo property of PaymentDataRequest
 */
function calculateNewTransactionInfo(newTransactionInfo) {
  // calculate the new totalPrice from display items
  let totalPrice = 0.00;
  newTransactionInfo.displayItems.forEach(
    function(displayItem) {
      totalPrice += parseFloat(displayItem.price);
    }
  );
  // Note: newTransactionInfo.totalPrice must be a string
  newTransactionInfo.totalPrice = totalPrice.toFixed(2);

  return newTransactionInfo;
}

/**
 * Initialize Google PaymentsClient after Google-hosted JavaScript has loaded
 *
 * Display a Google Pay payment button after confirmation of the viewer's
 * ability to pay.
 */
function onGooglePayLoaded() {
  const paymentsClient = getGooglePaymentsClient();
  paymentsClient.isReadyToPay(getGoogleIsReadyToPayRequest())
      .then(function(response) {
        if (response.result) {
          addGooglePayButton();
          // @todo prefetch payment data to improve performance after confirming site functionality
          // prefetchGooglePaymentData();
        }
      })
      .catch(function(err) {
        // show error in developer console for debugging
        console.error(err);
      });
}

/**
 * Add a Google Pay purchase button alongside an existing checkout button
 *
 * @see {@link https://developers.google.com/pay/api/web/reference/request-objects#ButtonOptions|Button options}
 * @see {@link https://developers.google.com/pay/api/web/guides/brand-guidelines|Google Pay brand guidelines}
 */
function addGooglePayButton() {
  const paymentsClient = getGooglePaymentsClient();
  const button =
      paymentsClient.createButton({
        onClick: onGooglePaymentButtonClicked,
        allowedPaymentMethods: [baseCardPaymentMethod]
      });
  document.getElementById('container').appendChild(button);
}

/**
 * Provide Google Pay API with a payment amount, currency, and amount status
 *
 * @see {@link https://developers.google.com/pay/api/web/reference/request-objects#TransactionInfo|TransactionInfo}
 * @returns {object} transaction info, suitable for use as transactionInfo property of PaymentDataRequest
 */
function getGoogleTransactionInfo() {
  return {
        displayItems: [
        {
          label: 'Subtotal',
          type: 'SUBTOTAL',
          price: '11.00',
          status: 'FINAL'
        },
        {
          label: 'Tax',
          type: 'TAX',
          price: '1.00'
        }
    ],
    currencyCode: 'USD',
    totalPriceStatus: 'FINAL',
    totalPrice: '12.00',
    totalPriceLabel: 'Total'
  };
}

/**
 * Provide Google Pay API with shipping address parameters.
 *
 * @see {@link https://developers.google.com/pay/api/web/reference/request-objects#ShippingAddressParameters|ShippingAddressParameters}
 * @returns {object} shipping address details, suitable for use as shippingAddressParameters property of PaymentDataRequest
 */
function getGoogleShippingAddressParameters() {
        return  {
        allowedCountryCodes: ['US', 'UK', 'FR', 'CA', 'MX', 'GA'],
    phoneNumberRequired: false
  };
}

/**
 * Provide Google Pay API with an invalid offer error.
 *
 * @see {@link https://developers.google.com/pay/api/web/reference/response-objects#PaymentDataError|PaymentDataError}
 * @returns {object} payment data error, suitable for use as error property of PaymentDataRequestUpdate
 */
function getGoogleOfferInvalidError(redemptionCode) {
        return {
    reason: 'OFFER_INVALID',
    message: redemptionCode + ' is not a valid promo code.',
    intent: 'OFFER'
        };
}

/**
 * Prefetch payment data to improve performance
 *
 * @see {@link https://developers.google.com/pay/api/web/reference/client#prefetchPaymentData|prefetchPaymentData()}
 */
function prefetchGooglePaymentData() {
  const paymentDataRequest = getGooglePaymentDataRequest();
  // transactionInfo must be set but does not affect cache
  paymentDataRequest.transactionInfo = {
    totalPriceStatus: 'NOT_CURRENTLY_KNOWN',
    currencyCode: 'USD'
  };
  const paymentsClient = getGooglePaymentsClient();
  paymentsClient.prefetchPaymentData(paymentDataRequest);
}


/**
 * Show Google Pay payment sheet when Google Pay payment button is clicked
 */
function onGooglePaymentButtonClicked() {
  const paymentDataRequest = getGooglePaymentDataRequest();
  paymentDataRequest.transactionInfo = getGoogleTransactionInfo();

  const paymentsClient = getGooglePaymentsClient();
  paymentsClient.loadPaymentData(paymentDataRequest)
      .then(function(paymentData) {
        // handle the response
        processPayment(paymentData);
      })
      .catch(function(err) {
        // show error in developer console for debugging
        console.error(err);
      });
}

/**
 * Process payment data returned by the Google Pay API
 * In a production environment, this function should always be implemented
 * server-side.
 *
 * @param {object} paymentData response from Google Pay API after user approves payment
 * @see {@link https://developers.google.com/pay/api/web/reference/response-objects#PaymentData|PaymentData object reference}
 */
function processPayment(paymentData) {
  // show returned data in developer console for debugging
    console.log(paymentData);
  // @todo pass payment token to your gateway to process payment
  paymentToken = paymentData.paymentMethodData.tokenizationData.token;
}</script>
<script async
  src="https://pay.google.com/gp/p/js/pay.js"
  onload="onGooglePayLoaded()"></script>
Objetivo: consulta nuestra lista de comprobación de la integración para validar tu integración y solicitar acceso a producción.