Documentación/Referencia de API

API REFERENCE

Google Pay ™

POSThttps://mapi.yabandpay.com/Payments
Live API
API PLAYGROUND · Live API

Google Pay ™

POSThttps://mapi.yabandpay.com/Payments
Automatically signed with your credentials

Request parameters14

Required fields first

Google Pay ™

pay_methodRequiredstringdata.pay_methodonline
sub_pay_methodRequiredstringdata.sub_pay_methodGoogle Pay
operationRequiredstringdata.operation1. Sales; 2.Authorisation
amountRequiredstringdata.amount金额数字。例如 € 24.99 应该写成24.99
currencyRequiredstringdata.currency货币代码,ISO 4217,例如EUR,CHF
descriptionRequiredstringdata.description订单描述
payment_token_objectRequiredstringdata.payment_token_object从Google Pay拿到的“token”的字符串base64
cardinfoRequiredstringdata.cardinfo包括持卡人姓名和email
timeoutRequiredstringdata.timeout过期时间单位分钟(0-1440)
notify_urlRequiredstringdata.notify_url支付完成后异步通知地址
request_idRequiredstringdata.request_id请求id需保持唯一,建议24以上位数字+字母
Optional parameters 2
demoOptionalstringdata.demo自定义字段
redirect_urlOptionalstringdata.redirect_url支付完成后跳转地址

请求参数

3ds_initiateRequiredstringdata.3ds_initiate3ds设置。 01. 开启3ds验证;

Credentials stay on this page. Your secret key is never stored or sent to the documentation server.

Parámetros

ParameterTypeDescripciónObligatorio
data.pay_methodstringonline✓
data.sub_pay_methodstringGoogle Pay✓
data.operationstring1. Sales; 2.Authorisation✓
data.order_idinteger商户的订单ID✓
data.amountstring金额数字。例如 € 24.99 应该写成24.99✓
data.currencystring货币代码,ISO 4217,例如EUR,CHF✓
data.descriptionstring订单描述✓
data.demostring自定义字段—
data.payment_token_objectstring从Google Pay拿到的“token”的字符串base64✓
data.cardinfostring包括持卡人姓名和email✓
data.timeoutstring过期时间单位分钟(0-1440)✓
data.redirect_urlstring支付完成后跳转地址—
data.notify_urlstring支付完成后异步通知地址✓
data.request_idstring请求id需保持唯一,建议24以上位数字+字母✓
data.3ds_initiatestring3ds设置。 01. 开启3ds验证;✓

Para flujos de pago compatibles con Google Pay

Google Pay funciona en navegadores web y aplicaciones de los principales dispositivos de escritorio y móviles. A través de Google Pay, YabandPay admite tarjetas de débito y crédito de las siguientes redes:

  • Visa / VPay

  • Mastercard / Maestro

  • UnionPay

La cuenta de liquidación debe estar en el Espacio Económico Europeo (EEE) o en el Reino Unido.

Consejo

Todos los comercios que utilicen Google Pay deben cumplir las siguientes condiciones:

  • Google Pay APIs Acceptable Use Policy
  • Google Pay API Terms of Service

Al integrar Google Pay mediante la solución alojada de YabandPay, los comercios aceptan y se comprometen a cumplir las condiciones anteriores.

1. Credential types and 3DS requirements

Google Pay admite los dos tipos de credenciales siguientes:

  • PAN_ONLY: Devuelve una envoltura cifrada del número de cuenta principal en texto claro (cardInfo.cardDetails) y de la red de tarjetas (cardInfo.cardNetwork), sin criptograma.

  • CRYPTOGRAM_3DS: Devuelve credenciales cifradas basadas en tokens que contienen un token de red (DPAN) y un criptograma para transacciones que requieren un nivel de seguridad superior.

3DS requirements:

Cuando reciba PAN_ONLY credenciales a través de la API de Google Pay, debe realizar una verificación 3D Secure (establezca 3ds_initiate=01). YabandPay rechaza las transacciones sin verificación 3DS.

Por compatibilidad y seguridad, siga estas recomendaciones de integración:

  • Habilite ambos ["CRYPTOGRAM_3DS", "PAN_ONLY"] en la configuración de frontend de Google Pay.

  • Establezca siempre 3ds_initiate=01 al enviar una solicitud de pago a YabandPay.

  • El backend de YabandPay determina si debe realizarse 3D Secure según el tipo de credencial.

2. App or web integration (self-hosted)

Los comercios pueden integrar la API de Google para iniciar el flujo de pago en su propio sitio web o aplicación. A continuación se describen el proceso y la configuración:

Payment flow:

Google Pay utiliza credenciales de una tarjeta vinculada al dispositivo (DPAN, token de red) en lugar del número real de tarjeta (PAN). El flujo de pago es el siguiente:

  1. El cliente selecciona el botón de Google Pay en el sitio web o la aplicación del comercio.

  2. El cliente autoriza el pago con Face ID, Touch ID o una contraseña.

  3. Google devuelve un token cifrado.

  4. El comercio envía el token a YabandPay para su procesamiento.

Nota: en el modo alojado por el comercio, este debe registrar su propia cuenta de Google Pay en Google Pay & Wallet Console y obtener un Merchant ID. Este Merchant ID se vincula al canal de pago de YabandPay.

API configuration example:

"tokenizationSpecification": {
  "type": "PAYMENT_GATEWAY",
  "parameters": {
    "gateway": "yabandpay",
    "gatewayMerchantId": "<Merchant ID assigned by YabandPay>"
  }
}
  • Base64-encode the received token and submit it to the YabandPay payment API in payment_token_object.

  • gateway: a fixed value that must be "yabandpay".

  • Disabling address verification is recommended, as configured below:

billingAddressRequired: false

3. Hosted integration

YabandPay provides a hosted Google Pay solution. Merchants do not need to integrate a Google Pay button or SDK. Submit an order through the standard API and direct the customer to YabandPay’s hosted page at https://pay.yabandpay.com to complete the Google Pay payment.

In hosted mode, Google Pay runs on YabandPay’s page, so merchants do not need to configure CSP, load Google scripts, or set an SDK version.

Integration flow:

  1. The merchant submits an order using YabandPay’s Solución de pago alojada (HPP). YabandPay returns pay_url.

  2. The customer is redirected to the hosted page at pay_url.

  3. The customer completes Google Pay payment on that page.

  4. After payment, the customer is redirected to the configured redirect_url, and an asynchronous notification is sent to notify_url.

Notes:

  • Merchants do not need to load Google Pay JavaScript or construct Google Pay requests themselves.

  • YabandPay handles all backend decryption and transaction verification for Google Pay.

  • Merchants must enable Google Pay in the YabandPay merchant portal.

  • The hosted payment page automatically displays the merchant name, order amount, and other information so the customer can identify the payment.

  • All transactions are processed using YabandPay’s shared Google Merchant ID.

4. Authorization methods

YabandPay supports the following Google Pay authorization modes:

  • One-time transaction authorizations (DPAN + cryptogram) are supported.

  • Card-on-File (COF) is not supported.

  • FIDO biometric authentication is not supported.

5. Data submission requirements

  • Submit the encrypted payment_token_object to YabandPay through HTTPS POST.

  • All data is encrypted in transit using TLS 1.2 or later.

  • YabandPay uses PCI DSS-compliant HSMs for backend decryption.

6. Official Google integration references

General resources:

App integration guides:

Web integration guides:


ParámetroTipoDescripciónObligatorio
userStringCashier account UIDObligatorio
signStringSignatureObligatorio
methodStringv3.GooglePayObligatorio
timeLongTimestampObligatorio
  • Parameters
ParámetroTipoDescripciónObligatorio
pay_methodStringonlineObligatorio
sub_pay_methodStringGoogle PayObligatorio
operationString1. Sales; 2.AuthorisationObligatorio
order_idStringMerchant order IDObligatorio
amountStringAmount as a numeric string. For example, enter 24.99 for € 24.99.Obligatorio
currencyStringISO 4217 currency code, for example EUR or CHFObligatorio
descriptionStringOrder descriptionObligatorio
demoStringCustom fieldOpcional
3ds_initiateString3DS configuration. 01. Enable 3DS verification.Obligatorio
payment_token_objectStringBase64-encoded "token" string obtained from Google PayObligatorio
cardinfoStringIncludes the cardholder name and emailObligatorio
cardinfo.card_holderstringCardholder nameObligatorio
cardinfo.emailstringCardholder emailObligatorio
timeoutStringExpiration time in minutes (0-1440)Obligatorio
redirect_urlStringRedirect URL after paymentOpcional
notify_urlStringAsynchronous notification URL after paymentObligatorio
request_idStringUnique request ID; a combination of digits and letters at least 24 characters is recommendedObligatorio

Obtaining payment_token_object:

Example token returned by Google Pay:

{
	"signature": "MEUCIC+XtiYdlmjL2/1wEn33qnya8G4POk5jYkRNY5+MkdBlAiEAwoRYQu26ZopwpcOWlwUe/E+i4FKzpunCFZf44mS0cxQ\u003d",
	"intermediateSigningKey": {
		"signedKey": "{\"keyValue\":\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUJW8LjUtTV7esDMJLtCe8hYjlcQih8g7HP5bgO4ysma4/CwGq0CnZ5G0t0o44D92d9L3SfXS2GyK2PJMtE/NBg\\u003d\\u003d\",\"keyExpiration\":\"1724120515000\"}",
		"signatures": ["MEYCIQC1ZWgFEaSR1pNbwTW6liQL7WXZQZExx1Idj7oQzHvoPQIhAOx1b+9CamfDeZUcHXpU01xTfa6EaaH3TgKaTBnrsuuG"]
	},
	"protocolVersion": "ECv2",
	"signedMessage": "{\"encryptedMessage\":\"y+XA1ltwldTcmVSZwfVayP7b0hPNLODGyi2UgCCJcSSs0iBj73HML5eWcYBiT+T+ZP8SmV54U9E2AmuRwVeVYHai8Z/ajrxE7fM+Fv/e9IXt36WjC4SWhAHM8T/DkOlE6BcuoKAMz6iLkJJ40g0zAkUKijln5YEbhLXHRoh/5l/8wGNDxErI7JdNZ4cA9vh8go/gR2YXKxVngFH4PFHcGyKa4MKnYDATMBDdx/F+MI4vVtPLXruTPpG0HBgLlJct95LZl9T686sOWuwg4pWLLSqcbuqd+MAZZihy2FW+9cdKNXsebL91rRbq7dahtET1K90YzyWzM9CfntcjHf5YqhnssApnE+Jb7OZ+mn5hO27Z93by7G3Fgi7YxJqcW4o/4D+NIANe0BqwbFyhw5Un8rIKkXg//WD9TlFHl2oIgyOKnZLO8NrnfEffoxstvRft1enafD0DadUk2IL5+Q\\u003d\\u003d\",\"ephemeralPublicKey\":\"BFzys/8Oy4iBu0ZYlLcy5SNZUOKFQhTx/985qiMFKGssVm4Fk9hweWlemyClMbI216lbsPS4Sy15ab/75gW1v08\\u003d\",\"tag\":\"jpHUeHrZuI1y77wRisFznOadAzlP2je8RFpT9PFpmHs\\u003d\"}"
}

The payment_token_object field is the base64_encode string of the token data obtained from the Google Pay integration.

Signature example:

Sorted parameters concatenated into a URL-style query string

"3ds_initiate=01&amount=0.1&cardinfo={"card_holder":"John Smith","email":"JohnSmith@gmail.com"}&currency=EUR&description=test&method=v3.GooglePayment&notify_url=https://www.yabandpay.com/notify&operation=1&order_id=1723517503&pay_method=online&payment_token_object=eyJzaWduYXR1cmUiOiJNRVVDSUMrWHRpWWRsbWpMMi8xd0VuMzNxbnlhOEc0UE9rNWpZa1JOWTUrTWtkQmxBaUVBd29SWVF1MjZab3B3cGNPV2x3VWUvRStpNEZLenB1bkNGWmY0NG1TMGN4UVx1MDAzZCIsImludGVybWVkaWF0ZVNpZ25pbmdLZXkiOnsic2lnbmVkS2V5Ijoie1wia2V5VmFsdWVcIjpcIk1Ga3dFd1lIS29aSXpqMENBUVlJS29aSXpqMERBUWNEUWdBRVVKVzhMalV0VFY3ZXNETUpMdENlOGhZamxjUWloOGc3SFA1YmdPNHlzbWE0L0N3R3EwQ25aNUcwdDBvNDREOT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pVT0tGUWhUeC85ODVxaU1GS0dzc1ZtNEZrOWh3ZVdsZW15Q2xNYkkyMTZsYnNQUzRTeTE1YWIvNzVnVzF2MDhcdTAwM2RcIixcInRhZ1wiOlwianBIVWVIclp1STF5Nzd3UmlzRnpuT2FkQXpsUDJqZThSRnBUOVBGcG1Ic1x1MDAzZFwifSJ9&redirect_url=https://www.yabandpay.com/redirect_url&request_id=g77ur3oqhkqd348iljrb04pbj412rka3&sub_pay_method=Google Pay&time=1723517503&timeout=0&user=YOUR_CASHIER_UID"

Sign stringA using secret_key

The resulting signature is:

"YOUR_SIGNATURE"

Request example (operation=1 Sales):

{
    "user": "YOUR_CASHIER_UID",
    "sign": "YOUR_SIGNATURE",
    "method": "v3.GooglePay",
    "time": 1721979693,
    "data": {
        "description": "test",
        "timeout": "0",
        "pay_method": "online",
        "sub_pay_method": "Google Pay",
        "order_id": 1721979693,
        "amount": "0.1",
        "currency": "EUR",
        "operation": "1",
        "redirect_url": "https://www.yabandpay.com/redirect_url",
        "notify_url": "https://www.yabandpay.com/notify",
        "3ds_initiate": "01",
        "payment_token_object": "eyJzaWduYXR1cmUiOiJNRVVDSVFDOEJmbDJrSkttUjVvOUxNc3RCYnA0MGtBRW9FQnh4SlQ4VTl2UVgyc1JMd0lnTUJTOWpidDFxR0NoVmxmeElDUTdYOHBKM3VYN1lkY0M5UFd1eEVubmo5b1x1MDAzZCIsImludGVybWVkaWF0ZVNpZ25pbmdLZXkiOnsic2lnbmVkS2V5Ijoie1wia2V5VmFsdWVcIjpcIk1Ga3dFd1lIS29aSXpqMENBUVlJS29aSXpqMERBUWNEUWdBRVdabXZVODU3SnlOV2ZEbFFuVzBaRG1MUEpoSG91dlpsT09aZk5ORm9nWElJVlRVTnNYNGJ0MEZFakdpVEs4QTNGb094a0d5NStrQ0ZCWDUyL0hhcS93XHUwMDNkXHUwMDNkXCIsXCJrZXlFeHBpcmF0aW9uXCI6XCIxNzIwNTg5NjI3MTk5XCJ9Iiwic2lnbmF0d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WU1OdnhkZVNUTzlsYWJRdlBYZWQrQ1NLZTFyZ1FcdTAwM2RcIn0ifQ==",
        "cardinfo": "{\"card_holder\":\"John Smith\",\"email\":\"JohnSmith@gmail.com\"}",
        "request_id": "2cwmm7wubqkgtzbtzjhvhkaubev81a0r"
    }
}


Response example (PAN_ONLY):

Note: for PAN_ONLY, redirect to the returned url to complete 3DS verification. After 3DS, the customer is redirected to redirect_url:

{
    "status": true,
    "code": "200",
    "data": {
        "order_id": "YOUR_ORDER_ID",
        "trade_id": "e684679e-658b-ac70-fd9e-e4959e147e00",
        "amount": "0.10",
        "currency": "EUR",
        "sub_pay_method": "Google Pay",
        "state": "processing",
        "url": "https://pay.yabandpay.com/dispose_shift4_googlepay_3ds?data=eyJwc3QiOiJlNjg0Njc5ZS02NThiLWFjNzAtZmQ5ZS1lNDk1OWUxNDdlMDAiLCJzaWduX3RyYWRlX2lkIjoiNWZkNzc5Zjg0MmY1ZTc2ZjVmNGQzNGQyNGQ5MGZkMzYyZWMyZGY5ZjU0ODk5ZjBlZDgxYTRkYWUxODM2MmEwNCIsInVzZXIiOiIwMTY2ODMifQ=="
    },
    "message": "",
    "response_id": "202408131051432400124088"
}

Response example (CRYPTOGRAM_3DS):

Note: for CRYPTOGRAM_3DS, no further 3DS verification is required, and state is returned directly:

{
    "status": true,
    "code": "200",
    "data": {
        "order_id": "YOUR_ORDER_ID",
        "trade_id": "e684679e-658b-ac70-fd9e-e4959e147e00",
        "amount": "0.10",
        "currency": "EUR",
        "sub_pay_method": "Google Pay",
        "state": "paid"
    },
    "message": "",
    "response_id": "202408131051432400124088"
}

Additional information:

Response result:
  1. A successful request returns "status": true.

  2. A failed request returns "status": false.

Evaluate the returned information: if it contains url, redirect to it; if it does not contain url, read state directly.

For PAN_ONLY, after the user completes 3DS verification at url, they are redirected back to redirect_url synchronously. We strongly recommend using both Order Query como Notificaciones asíncronas to synchronize and update the payment status and keep payment information accurate in real time. a) If the order status state is paid, payment succeeded; b) if the order status state is authorized, authorization succeeded. To capture funds after successful authorization, call the authorization capture API.

Response codes:
StatusCodeMessage
true200
false-1000Internal error
false-403The signature Error
false-2001The user not exist
false-3001Required field is missing
false-4118Incorrect request ID