SEBES Technology Payment Gateway Implementation Guide
Google Pay™
Google Pay is a method of tokenizing payer card data that allows instant card payments without entering card data. This document describes the integration process and usage options for SEBES Technology payment gateway.
Integration Types
- Integration using Google Pay through SEBES payment form (Redirect payment flow).
- Integration using Google Pay through API (Custom server to server payment flow).
Setup Instructions
To enable payment processing via API, please follow these steps:
Configuration
When configuring the Google Pay SDK, use the following parameters:
const allowedCardAuthMethods = ['PAN_ONLY', 'CRYPTOGRAM_3DS'];
const tokenizationSpecification = {
type: "PAYMENT_GATEWAY",
parameters: {
'gateway': "sebes",
'gatewayMerchantId': "{{MID}}"
}
};
Redirect Payment Flow
Purchase
To accept payments, use a POST request to create a purchase:
POST https://{api_domain}/api/v1/purchases/
Example JSON Request
{
"client": {
"email": "[email protected]",
"full_name": "Sergio Berlucchi",
"personal_code": "555",
"country": "BR",
"street_address": "Rua Olveira Vieira, 134",
"city": "São Paulo",
"phone": "966548220713",
"state": "SP",
"zip_code": "09876-098"
},
"purchase": {
"currency": "EUR",
"products": [{"name": "test", "price": 599}],
"skip_capture": false,
"brand_id": "8716450e-ad1b-4f86-b1d9-9a5e425e9016"
}
}
After sending, you’ll receive a JSON with a redirect URL for the buyer.
https://{api_domain}/p/{payment_id}
Callback
For callback, use the following endpoint:
POST https://{api_domain}/pm/google_pay/callback/
Custom Payment Flow - Server to Server
Use server-to-server integration to handle payments without client interaction:
curl --location 'https://api_domain/api/v1/purchases/' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer ' \
--data-raw '{
"client": {
"email": "[email protected]",
"full_name": "Client Name",
"country": "IN",
"city": "Mumbai",
"zip_code": "2345678",
"state": "IN"
},
"purchase": {
"currency": "EUR",
"products": [{"name": "test", "price": 777}]
},
"brand_id": ""
}'
Then you have to send POST to https://api_domain/p/transaction_id/
.
And provide Google Pay token.
After it, you'll receive a callback with the payment status.
curl --location 'https://api_domain/p/transaction_id/?s2s=true' \
--form 'pm="google_pay"' \
--form 'google_token="{\"signature\":\"MEYCIQC9hLg6voTbcGySwjwIr4cR5v343RayV2KpzhISE9XbQQIhAMxAeOrbqwkaBYVj8wvoolRLvU6XF30SYxrb7DrpAtPF\",\"intermediateSigningKey\":{\"signedKey\":\"{\\\"keyValue\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEtn/2SnY5+A2G6fm4b/9NmHwIf4xCsntikQv56ZOcdmuBgsyzvIM5wA0MqnI+E5FaPOgO99cT4ub5fnu70lrnCA\\\\u003d\\\\u003d\\\",\\\"keyExpiration\\\":\\\"1727766045000\\\"}\",\"signatures\":[\"MEYCIQDN+S08qpVu6mHy4Z4UzrcQmtkp4Q8mUPZYrvMhNsSpdgIhAIHYRf/GYbXq4aw9j7zt9ghSB6fStWVqgon1glyce30B\"]},\"protocolVersion\":\"ECv2\",\"signedMessage\":\"{\\\"encryptedMessage\\\":\\\"SZD6aFL7nXtfLmKlJgpwKLibF38IH2UAMDPwqOpcDV2LNL1SSPuAmQvVAjAfNliSgRYwzN2HziC93KRcpXQCezzozTD4MSbRJxxOMHsqImAHsZyi9BZaCUqwsgBON3TA65Su+vYOXYEXy6JBHhyM+mgNPxi1CDrHpk7mZfsYhDdsIMGfuL5uuiBy8R6oHs0upJFEe7WeF+OxCwBlxf4wKsYkmdHYa/UYuQA/6CeB2KAAVhhqWl/wBD6r/6EPdnST90L+C/J1rNJt97UeGUlfhP7SybQ39QqCLpLWToRXTNf1XLlMNNW3FPBvCYSaHyCsIPtJjOMza/VBpsz7D0bCG/ChbA9fzhkxq9hcH6tSHvsggpacnm8uGHb9UQdVPiPbUEA9hCewu7N5AcLByRi7X/F6yEud57xFpgzijs8ABkz+9/KMwHwKgaKEwqePh0wOFnSezptxr16OIXVraryTJOdC7wz7v4Vx+V4gsfpCRDIbzAod2Exphtn11VZzyTCTw1nn1oK1Wpi4B2IR+S2LWA80R8mmQPugP8GSmC7Uikfv01mAkyqMu8lKXOsKPFOv8itxMcIEE1RgCJsD8CWY5mBsQlvHhMGEFaz/2K7j25PW84KKmnqoQwiEbvMu+nYhlfvGgbDskFXH\\\",\\\"ephemeralPublicKey\\\":\\\"BLr4FxyDwvzCnl54z6hads+YKOE3Tu3+ci2N2gIUPgPFAN4NcbdgwNk+lM6z4yNjM9TJkU+8jsu6RAVcLkx6s3k\\\\u003d\\\",\\\"tag\\\":\\\"WM0Ix8OBjQgEEitLMiWETcrXv0MmBNf+BPkI3wvhPEA\\\\u003d\\\"}\"}"' \