Dokumentation/API-Referenz

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.

Für Zahlungsabläufe mit Google Pay

Google Pay funktioniert in Webbrowsern und Apps auf gängigen Desktop- und Mobilgeräten. YabandPay unterstützt über Google Pay Debit- und Kreditkarten der folgenden Kartennetzwerke:

  • Visa / VPay

  • Mastercard / Maestro

  • UnionPay

Das Abrechnungskonto muss sich im Europäischen Wirtschaftsraum (EWR) oder im Vereinigten Königreich befinden.

Tipp

Alle Händler, die Google Pay verwenden, müssen die folgenden Bedingungen einhalten:

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

Durch die Integration von Google Pay über die gehostete Lösung von YabandPay erklären sich Händler mit den oben genannten Bedingungen einverstanden und verpflichten sich, diese einzuhalten.

1. Credential types and 3DS requirements

Google Pay unterstützt die folgenden zwei Arten von Zahlungsdaten:

  • PAN_ONLY: Gibt eine verschlüsselte Hülle mit der lesbaren primären Kontonummer (cardInfo.cardDetails) und dem Kartennetzwerk (cardInfo.cardNetwork) zurück, jedoch ohne Kryptogramm.

  • CRYPTOGRAM_3DS: Gibt tokenbasierte, verschlüsselte Zahlungsdaten mit einem Netzwerk-Token (DPAN) und einem Kryptogramm für Transaktionen zurück, die ein höheres Sicherheitsniveau erfordern.

3DS requirements:

Wenn Sie PAN_ONLY Zahlungsdaten über die Google-Pay-API erhalten, müssen Sie eine 3D-Secure-Prüfung durchführen (setzen Sie 3ds_initiate=01). YabandPay lehnt Transaktionen ohne 3DS-Prüfung ab.

Beachten Sie aus Gründen der Kompatibilität und Sicherheit diese Integrationsempfehlungen:

  • Aktivieren Sie beide ["CRYPTOGRAM_3DS", "PAN_ONLY"] in Ihrer Google-Pay-Frontend-Konfiguration.

  • Setzen Sie immer 3ds_initiate=01 wenn Sie eine Zahlungsanfrage an YabandPay senden.

  • Das Backend von YabandPay entscheidet anhand der Art der Zahlungsdaten, ob eine 3D-Secure-Prüfung erforderlich ist.

2. App or web integration (self-hosted)

Händler können die Google-API integrieren, um den Zahlungsvorgang auf ihrer eigenen Website oder in ihrer App zu starten. Ablauf und Konfiguration werden im Folgenden beschrieben:

Payment flow:

Google Pay verwendet Zahlungsdaten einer mit dem Gerät verknüpften Karte (DPAN, Netzwerk-Token) anstelle der tatsächlichen Kartennummer (PAN). Der Zahlungsvorgang läuft folgendermaßen ab:

  1. Der Kunde wählt auf der Website oder in der App des Händlers die Google-Pay-Schaltfläche aus.

  2. Der Kunde autorisiert die Zahlung mit Face ID, Touch ID oder einem Passwort.

  3. Google gibt ein verschlüsseltes Token zurück.

  4. Der Händler übermittelt das Token zur Verarbeitung an YabandPay.

Hinweis: Im selbst gehosteten Modus müssen Händler in der Google Pay & Wallet Console ein eigenes Google-Pay-Händlerkonto registrieren und eine Händler-ID beantragen. Diese Händler-ID wird mit dem Zahlungskanal von YabandPay verknüpft.

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 Gehostete Zahlungslösung (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 Autorisierung modes:

  • One-time transaction Autorisierungs (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:


ParameterTypBeschreibungErforderlich
userStringKassiererkonto UIDErforderlich
signStringSignatureErforderlich
methodStringv3.GooglePayErforderlich
timeLongTimestampErforderlich
  • Parameter
ParameterTypBeschreibungErforderlich
pay_methodStringonlineErforderlich
sub_pay_methodStringGoogle PayErforderlich
operationString1. Sales; 2.AuthorisationErforderlich
order_idStringHändlerbestellnummerErforderlich
amountStringBetrag als numerische Zeichenfolge. Geben Sie beispielsweise 24.99 for € 24.99.Erforderlich
currencyStringISO 4217 Währungscode, zum Beispiel EUR oder CHFErforderlich
descriptionStringBestellbeschreibungErforderlich
demoStringBenutzerdefiniertes FeldOptional
3ds_initiateString3DS configuration. 01. Enable 3DS verification.Erforderlich
payment_token_objectStringBase64-encoded "token" string obtained from Google PayErforderlich
cardinfoStringIncludes the cardholder name and emailErforderlich
cardinfo.card_holderstringName des KarteninhabersErforderlich
cardinfo.emailstringE-Mail-Adresse des KarteninhabersErforderlich
timeoutStringAblaufzeit in Minuten (0-1440)Erforderlich
redirect_urlStringWeiterleitungs-URL nach der ZahlungOptional
notify_urlStringURL für asynchrone Benachrichtigung nach der ZahlungErforderlich
request_idStringEindeutige Einfrage-ID; empfohlen wird eine Kombination aus Ziffern und Buchstaben mit mindestens 24 ZeichenErforderlich

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.

Signaturbeispiel:

Nach Parametern sortierte Werte, verkettet zu einer URL-ähnlichen Abfragezeichenfolge

"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=eyJzaWduYXR1cmUiOiJNRVVDSUMrWHRpWWRsbWpMMi8xd0VuMzNxbnlhOEc0UE9rNWpZa1JOWTUrTWtkQmxBaUVBd29SWVF1MjZab3B3cGNPV2x3VWUvRStpNEZLenB1bkNGWmY0NG1TMGN4UVx1MDAzZCIsImludGVybWVkaWF0ZVNpZ25pbmdLZXkiOnsic2lnbmVkS2V5Ijoie1wia2V5VmFsdWVcIjpcIk1Ga3dFd1lIS29aSXpqMENBUVlJS29aSXpqMERBUWNEUWdBRVVKVzhMalV0VFY3ZXNETUpMdENl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ZW1lcmFsUHVibGljS2V5XCI6XCJCRnp5cy84T3k0aUJ1MFpZbExjeTVTTlpVT0tGUWhUeC85ODVxaU1GS0dzc1ZtNEZrOWh3ZVdsZW15Q2xNYkkyMTZsYnNQUzRTeTE1YWIvNzVnVzF2MDhcdTAwM2RcIixcInRhZ1wiOlwianBIVWVIclp1STF5Nzd3UmlzRnpuT2FkQXpsUDJqZThSRnBUOVBGcG1Ic1x1MDAzZFwifSJ9&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"

Einfragebeispiel (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": "eyJzaWduYXR1cmUiOiJNRVVDSVFDOEJmbDJrSkttUjVvOUxNc3RCYnA0MGtBRW9FQnh4SlQ4VTl2UVgyc1JMd0lnTUJTOWpidDFxR0NoVmxmeElDUTdYOHBKM3VYN1lkY0M5UFd1eEVubmo5b1x1MDAzZCIsImludGVybWVkaWF0ZVNpZ25pbmdLZXkiOnsic2lnbmVkS2V5Ijoie1wia2V5VmFsdWVcIjpcIk1Ga3dFd1lIS29aSXpqMENBUVlJS29aSXpqMERBUWNEUWdBRVdabXZVODU3SnlOV2ZEbFFuVzBaRG1MUEpoSG91dlpsT09aZk5ORm9nWElJVlRVTnNYNGJ0MEZFakdpVEs4QTNGb094a0d5NStrQ0ZCWDUyL0hhcS93XHUwMDNkXHUwMDNkXCIsX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WhBc2NsR0Z5ZFhFXHUwMDNkXCIsXCJ0YWdcIjpcImtoT1dIRUlSSzBuWVBiWU1OdnhkZVNUTzlsYWJRdlBYZWQrQ1NLZTFyZ1FcdTAwM2RcIn0ifQ==",
        "cardinfo": "{\"card_holder\":\"John Smith\",\"email\":\"JohnSmith@gmail.com\"}",
        "request_id": "2cwmm7wubqkgtzbtzjhvhkaubev81a0r"
    }
}


Eintwortbeispiel (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"
}

Eintwortbeispiel (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"
}

Zusätzliche Informationen:

Eintwortergebnis:
  1. Eine erfolgreiche Einfrage gibt "status": true.

  2. Eine fehlgeschlagene Einfrage gibt "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. Wir empfehlen dringend, sowohl Bestellabfrage and Asynchrone Benachrichtigungen zu verwenden, um den Zahlungsstatus zu synchronisieren und Zahlungsinformationen in Echtzeit aktuell zu halten. a) If the order status state is paid, payment succeeded; b) if the order status state is authorized, Autorisierung succeeded. To capture funds after successful Autorisierung, call the Autorisierung capture API.

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