Google Pay™ API V1

Introduction

There are several implementation options for Google Pay™ that support both CRYPTOGRAM_3DS and PAN_ONLY authentication methods.

Payment optionDescription
From your mobile applicationPayment is made from your mobile application. The application requests encrypted data from Google Pay™ and sends it to the payment gateway. Requires Google Pay™ API integration.
From a Web payment page on your sideThe merchant requests encrypted payment data from Google Pay™ and sends it to the payment gateway. Requires Google Pay™ API integration.
From a Web payment page on the gateway sideThe merchant redirects the customer to the payment page on the gateway side, and must meet Google Pay™ requirements: Acceptable Use Policy, Terms of Service.

How to integrate with Google Pay™ API

Integrate your Android app or website with the Google Pay™ API via Google Pay™ & Wallet Console: Google Pay™ API & Google Pay™ & Wallet Console. For full developer documentation, see the Google Pay™ Web developer documentation. Before publishing your integration, review the Google Pay™ web brand guidelines.

On step 4, when completing the tutorial, specify tokenization type PAYMENT_GATEWAY:

const tokenizationSpecification = {
  type: 'PAYMENT_GATEWAY',
  parameters: {
    'gateway': 'kkbpay',
    'gatewayMerchantId': 'YOUR_GATEWAY_MERCHANT_ID'
  }
};
For direct integration without using Kyrgyzkommertsbank as payment provider, you can generate an individual key pair via the Merchant Portal. See Using individual keys.

After integration you will be assigned a Google Merchant ID displayed in the top-right corner of the Google Pay & Wallet Console.

Integration schemes

Payment from a mobile app

Customer
Application
Google Pay
Payment gateway
1
Select Google Pay™ payment
2
Request masked card data
3
Response to the request
4
Display of the masked card data
5
Payment confirmation
6
Request the encrypted card data
7
Data encryption
8
Return the encrypted payment data
9
Google Pay™ payment request
10
Decrypt & payment
11
Payment result
12
Payment result
  1. A customer selects to pay via Google Pay™.
  2. The application requests masked card data from Google Pay™.
  3. Google Pay™ returns masked card data to the application.
  4. The application displays the masked card data to the customer.
  5. The customer confirms payment.
  6. The application requests encrypted card data from Google Pay™.
  7. Google Pay™ encrypts the data using the merchant's public key.
  8. Google Pay™ returns the encrypted payment data to the application.
  9. The application sends a Google Pay™ payment request to the payment gateway containing the token from Google Pay™.
  10. The payment gateway decrypts the received token and processes the payment.
  11. The payment gateway returns the payment result to the application.
  12. The application displays the payment result to the customer.

Payment page on the online store side

Customer
Merchant
Google Pay
Payment gateway
1
Select payment via Google Pay™
2
Request for Google Pay™ payment
3
Encrypt payment data
4
Return encrypted data
5
Google Pay™ request
6
Data decryption, and payment
7
Payment result
8
Payment result
  1. The customer creates an order and chooses to pay via Google Pay™.
  2. The online store generates a request for Google Pay™.
  3. Google Pay™ generates the encrypted payment data.
  4. The online store receives the encrypted payment data.
  5. The online store sends a Google Pay™ payment request with the encrypted data.
  6. The payment gateway decrypts the data and makes the payment.
  7. The payment gateway returns the payment result to the online store.
  8. The payment result is displayed to the customer.

Payment page on the payment gateway side

In this scenario real (non-test) cards linked to a Google account must be used for testing. There will be no actual charge after requests sent to test servers.
Customer
Merchant
Payment gateway
Google Pay
1
Order placement
2
Order registration
3
Order number and redirection URL
4
Customer redirection
5
Proceed to the URL received
6
Display the payment form
7
Select Google Pay™ as a payment method
8
Data exchange
9
Make payment
10
Redirection to the final page
11
Open of the final page
12
Display payment status to the customer
  1. A customer creates an order on the merchant's website.
  2. The merchant registers the order in the payment gateway: One-phase payment or Two-phase payment.
  3. The payment gateway returns a unique order number and redirect URL.
  4. The store redirects the customer.
  5. The customer's browser opens the URL.
  6. The customer receives the payment form.
  7. The customer selects Google Pay™ and confirms.
  8. Payment data is exchanged between the payment gateway and Google Pay™.
  9. The payment gateway processes the payment.
  10. The customer is redirected to the final page.
  11. The final page is opened.
  12. The payment status is displayed.

Payment via Google Pay™ using 3DS2

This section describes how to make a 3DS2 payment from a merchant's own payment page (not via the hosted payment page).

3DS2 flow description

  1. Register the order in EPG via register.do.
  2. Collect card info at the merchant's payment page.
  3. Call processform.do or paymentorder.do. Either request will send the entered PAN to EPG. If the card is eligible for 3DS2, the call will not finish until the 3DS Server collects cardholder browser information. If the 3DS Server is unable to collect browser information, the call will finish unsuccessfully.
  4. Here starts the magic — this is what the hosted payment page actually does.
  5. In a separate thread (in parallel) — call EPG check API epg/api/v1/3ds2/inner/check. This API checks if the PAN is eligible for 3DS2 (EPG calls the 3DS Server):
    1. If completed = false, repeat the call after some time (e.g. 0.5 seconds).
    2. If is3Ds2Eligible = false, end the parallel process — processform.do or paymentorder.do will proceed.
    3. This step may be omitted but is highly recommended. If threeDSMethodURL is present and not blank, open an iframe on the payment page. In that iframe add a form with a single parameter threeDSMethodData and fill it with the value from threeDSMethodDataPacked. Submit the form to threeDSMethodURL. The form will call the appropriate API of the issuer's ACS — leave the iframe as-is, you do not need to monitor when it finishes.

      If this step is omitted, the 3DS Server will wait ~10 seconds for ThreeDS Method completion notification from the ACS and will send threeDSCompInd = N in AReq.
    4. Collect cardholder browser info and pass it to the 3DS Server. Two options exist:
      1. Preferred: Create a second iframe, add an empty form and submit it to threeDSMethodURLServer (calls the Browser data collection API of the 3DS Server). The 3DS Server will respond with HTML containing JavaScript that collects the required information and submits it automatically. You do not need to monitor when it finishes.
      2. Alternative: Collect cardholder browser information on your own and call the Browser data transfer request directly.
    5. Now the 3DS Server should have received the required cardholder browser information and can proceed with sending AReq to the Directory Server.
  6. The call to processform.do or paymentorder.do should finish and the response should be processed according to the EPG API specification.

Description of the 'check' API

URL: epg/api/v1/3ds2/inner/check
Request parameter: mdOrder (from register.do)

Response (JSON) — some extra fields may be present; the parsing software must ignore them without errors:

FieldTypeDescription
completedBooleanCompletion indicator. If false, repeat the call after some time.
is3Ds2EligibleBooleanWhether the card is eligible for 3DS2. If false, end the parallel process — processform.do or paymentorder.do will proceed.
threeDSServerTransIDUUIDTransaction identifier in terms of 3DS Server. Must be present if is3Ds2Eligible = true.
threeDSMethodURLStringIf the issuer's ACS supports ThreeDS Method, contains the URL of that method. Otherwise blank or missing.
threeDSMethodDataPackedStringIf the issuer's ACS supports ThreeDS Method, contains the ThreeDS Method Data (Base64-encoded). Otherwise blank or missing.
threeDSMethodURLServerStringURL of the 3DS Server API for collecting cardholder browser information.

Why so difficult

When processform.do or paymentorder.do is called, EPG calls the 3DS Server to check whether the card is eligible for 3DS2 (at this point the 3DS Server generates threeDSServerTransID). If the card is eligible, EPG calls the 3DS Server to perform authentication (make AReq), but to do so the 3DS Server needs cardholder browser information. It waits until it receives this information for the threeDSServerTransID. If it receives it within the configured period, it makes the AReq request and sends it to the Directory Server. If it does not receive the information, it is unable to make the request and responds with an unsuccessful response to EPG.

3DS2 flow diagrams

The workflows described above are shown in the schemes below.

Browser-based frictionless flow

Cardholder Browser
Merchant
EPG
3DS Server
DS
ACS
1
Checkout with purchase info
2.1
Responds with URL for payment page
orderId transmission
Shows payment page to Cardholder
Card info transmission
4
CardCheckRequest
Checks PAN for 3DS2
4.1
CardCheckResponse
5
store cardCheckResponse
opt [Happens in parallel with paymentorder.do]
6
check request
6.1
check Response
3DS2 eligible = true
opt [3DS method handling — Optional iframe if checkResponse contains threeDSMethodURL]
7
opens iframe with threeDSMethodData to be sent to ACS
7.1
submits form with threeDSMethodData to threeDSMethodURL (acsMethodUrl)
7.2
submits threeDSMethodCompletion to threeDSMethodNotificationURL
alt [CardholderBrowser data collection successful if checkResponse contains threeDSMethodURL]
8.1.0
Initiates request for CardholderBrowser data collection
8.1.1
response with HTML page for information collection
8.1.2
opens iframe with HTML page for information collection
stores CardholderBrowser info
8.1.3
responds with result of collected information (OK)
alt [CardholderBrowser data collection unsuccessful]
8.2.0
Initiates request for CardholderBrowser data collection
8.2.1
response with Error
9
sends AReq
alt [CardholderBrowser data not stored]
9.1.1
Internal Error
9.1.2
terminates transaction
3.1
Response with Error
10
AReq
11
AReq
12
RBA examination
13
ARes
14
ARes
alt [Received Error]
13.1.2
Received Error
13.1.3
Transmits response with Error
13.1.4
terminates transaction
13.1.5
Transmits response with Error
alt [transStatus = Y (frictionless)]
13.2.1
Transmits response with transStatus: Y
13.2.2
Shows receipt with transaction result

Browser-based challenge flow

Cardholder Browser
Merchant
EPG
3DS Server
DS
ACS
1–8
Register, paymentorder.do, check, 3DS method, browser data collection — same as frictionless flow
9
sends AReq
10
AReq
11
AReq
12
RBA examination
13
ARes
14
ARes
alt [transStatus = C (challenge)] — loop
13.3.1
create creq
13.3.2
Pass CReq to the ACS URL
13.3.3
Pass CReq to the ACS URL
13.3.4
Validates CReq, Generates OTP
13.3.5
Prepares auth UI for Cardholder
13.3.6
Redirect to ACS URL
13.3.7
Shows ACS UI
13.3.8
Cardholder enters OTP
13.3.9
Submits OTP
13.3.10
Validates OTP
13.3.11
Generates CAVV
13.3.12
Determines challenge outcome
14
RReq
15
RReq
16
RRes
17
RRes
18
CRes completion to the notification URL
19
Conveys response, closes authentication window
20
Shows receipt with transaction result

Requirements for the payment page on merchant's side

The payment page on the merchant's side must meet the following requirements.

paymentsClient.isReadyToPay({allowedPaymentMethods: allowedPaymentMethods})
    .then(function(response) {
      if (response.result) {
        addGooglePayButton();
      }
    })
    .catch(function(err) {
      console.error(err);
    });

function addGooglePayButton() {
  var button = document.createElement('button');
  button.className = 'google-pay';
  button.appendChild(document.createTextNode('Google Pay'));
  button.addEventListener('click', onGooglePaymentButtonClicked);
  document.getElementById('container').appendChild(button);
}
var paymentsClient =
    new google.payments.api.PaymentsClient({environment: 'TEST'});
function getGooglePaymentDataConfiguration() {
  return {
    merchantId: '00000000000000000000', // for environment 'TEST' — not required
    transactionInfo: {
        totalPriceStatus: 'FINAL',
        totalPrice: '123.45',    // amount in major units
        currencyCode: 'EUR'      // ISO 4217
    },
    paymentMethodTokenizationParameters: {
        tokenizationType: 'PAYMENT_GATEWAY',
        parameters: {
            gateway: 'kkbpay',
            gatewayMerchantId: 'YOUR_GATEWAY_MERCHANT_ID'
        }
    },
    allowedPaymentMethods: ['CARD', 'TOKENIZED_CARD'],
    cardRequirements: {
        allowedCardNetworks: ['MASTERCARD', 'VISA']
    }
  };
}
var paymentDataRequest = getGooglePaymentDataConfiguration();
paymentsClient.loadPaymentData(paymentDataRequest).then(function(paymentData){
  processPayment(paymentData);
}).catch(function(err){
  console.error(err);
});

Using individual keys

For direct integration with Google Pay™ without using Kyrgyzkommertsbank as payment provider, generate an individual key pair via the Merchant Portal and upload it to your Google account.

Create key pair

  1. Log in to your personal area and open the Certificates section.
  2. Go to the Google Pay™ tab.
  3. Click Create key pair.
  4. Fill in the Google ID field with your Google Merchant ID (from Google API integration), then click Confirm.
  5. The created key pair will appear in the keys list.

Download public key

  1. Open the Certificates section → Google Pay™ tab.
  2. Click the actions menu next to your certificate and select Download key.
  3. Save the file to your desired location.

Edit Google ID

  1. Open the Certificates section → Google Pay™.
  2. Click the actions menu and select Edit.
  3. Update the Google ID field, then click Confirm.

Disable certificate

  1. Open the Certificates section.
  2. Select the required payment service (Apple Pay, Google Pay™, or Samsung Pay).
  3. Click the actions menu and select Disable key, then click Confirm.
SettingDescription
Only allowedDisabled certificates are not displayed in the keys list.
All positionsDisabled certificates are shown; Allowed column shows No.
API Payment Provider API

Payment Provider API

This section describes the REST API methods for processing Google Pay™ payments. Merchants can submit payments directly to the EPG from their own checkout page, or integrate via the EPG hosted payment page.

Order registration request

Depending on whether one-phase or two-phase payments are used, one of the following methods is used to register an order:

These requests are designed to register orders in the SmartVista E-Commerce Payment Gateway and have the same set of parameters.

Request parameters

NameTypeMandatoryDescription
userNameAN 1..100YesLogin of the API user on whose behalf requests are processed for a specific merchant.
passwordStringYesUser's password.
orderNumberAN 1..32NoNumber (identifier) of the order in the merchant's online store system. Unique for every store. If the Require system to generate order numbers permission is enabled, the order number is generated automatically.
amountN 1..12YesOrder amount in the minor denomination (for example, cents).
currencyN3NoPayment currency code in the ISO 4217 format. If not specified, the default currency code is used.
returnUrlANS 1..2000NoURL to which the customer is redirected after a successful payment.
descriptionANS 1..600NoFree form description of the order.
languageA2NoLanguage code in the ISO 639-1 format. If unspecified, the default language from the merchant settings is used. Error messages are also returned in this language.
clientIdANS 1..255NoCustomer identifier in the merchant system. Mandatory for bindings.
sendPaymentLinkA3..10NoChannel to send the payment link: SMS, EMAIL, or both (comma-separated). Requires corresponding merchant permissions.
emailANS..*ConditionalCustomer's email address. Required if sendPaymentLink = EMAIL.
phoneAN..255ConditionalCustomer's phone number. Required if sendPaymentLink = SMS.
nameAN 1..30NoCustomer's full name.
jsonParams[]AN..1024NoFields used to store additional information: {"param":"value","param2":"value2"}. Parameter name ≤ 255 chars, value ≤ 1024 chars.
sessionTimeoutSecsN..9NoLifespan of the order in seconds. Overrides merchant and system defaults. Ignored if expirationDate is set. Cannot exceed the session.timeout.milliseconds.max system setting. Default is 1200 seconds.
expirationDateANSNoDate and time when the order is terminated, format: yyyy-MM-ddTHH:mm:ss. If not specified, sessionTimeoutSecs is used.
bindingIdAN..255NoIdentifier of a previously created binding. If sent, the order can only be paid by that binding, and the payer is redirected to a page requiring CVC entry.
featuresStringNo3-D Secure mode: FORCE_SSL — processed as SSL; FORCE_TDS — processed as 3DS2. Requires corresponding merchant permissions.
paymentWayAN..32NoPayment method: CARD, CARD_BINDING, CARD_MOTO, UPOP_MOTO, UPOP, FILE_BINDING, P2P, APPLE_PAY, MASTERPASS, OTHER, GOOGLE_PAY, SAMSUNG_PAY, NSPK_E_CERT, FASTPAYMENT_QR, MPU, WAVE. Custom methods can be defined via jsonParams[].
recurrenceTypeStringYes (recurring)Recurring payment handling: AUTO — scheduled by EPG; MANUAL — scheduled by merchant. Not used in registerPreAuth.do.
recurrenceFrequencyStringConditionalMandatory for AUTO installments and recurring payments; ignored for MANUAL. Not used in registerPreAuth.do.
recurrenceStartDateN8Yes (recurring)Start date in YYYYMMDD format. Minimum value is tomorrow for AUTO payments. Not used in registerPreAuth.do.
recurrenceEndDateN8Yes (installment)End date in YYYYMMDD format. Used for installment and AUTO recurring payments; ignored for MANUAL. Not used in registerPreAuth.do.
externalFeeConditionalFee amount in minor denomination. Used only if the EXTERNAL_FEE_ALLOWED option is enabled. If provided, the fee is not calculated in SVFE.
amountECertN 1..19ConditionalTransaction amount paid using the NSPK electronic certificate. Present if NSPK E-Certificate is allowed for the acquirer and merchant.
orderBundleJSON arrayConditionalList of ordered items. Available if Include Cart Items is enabled in payment page settings. See example below.
pageViewANS..20NoCustomer's payment interface format: DESKTOP (default) or MOBILE. Custom prefix can be specified (e.g. iphone).
installmentTotalAmountN 1..12ConditionalTotal order amount. Mandatory if any other installment parameter is present.
installmentSingleAmountN 1..12ConditionalAmount of a single installment payment (excluding the first). Mandatory if any other installment parameter is present.
installmentNumberN 1..2ConditionalNumber of installments planned (including the first). Mandatory if any other installment parameter is present.
airlineData[]NoAirline data object. Can be transferred if the Airline data allowed permission is enabled.
tipAmountN 1..12NoAmount of the tip. Added to the main order amount and transferred to SVFE separately in the DE54 field. Supported only for register.do.
tipRecipientCardNumberN13..19ConditionalCard number of the tip recipient. Required if tipAmount is present. Supported only for register.do.
bindingManagedByMerchantNotrue — bindings managed by merchant; false — managed by acquirer or EPG (default).
bindingUsageConditionalCard-on-File transaction type: saveCard or paymentBySavedCard. Only if bindingManagedByMerchant = true.
transactionInitiatorNoTransaction originator: CIT — cardholder-initiated; MIT — merchant-initiated.
recurringPaymentManagedByMerchantNotrue — recurring payments managed by merchant; false — managed by acquirer or EPG (default).
recurringPaymentFormNoType of recurring payment: recurring or installment. Mandatory if recurringPaymentManagedByMerchant = true.
recurringExpiryN8NoRecurring payment expiration date in YYYYMMDD format. Default is 99991231 if empty.
originalTransactionDataJWSNoTransaction Data block. Present if recurringPaymentManagedByMerchant = true.
originalDsTransIdJWSNoDirectory Server Transaction ID, UUID (3DS2 only). Present if recurringPaymentManagedByMerchant = true.
originalAcsTransIdJWSNoOriginal transaction identifier in ACS (3DS2 only). Present if recurringPaymentManagedByMerchant = true.
originalInitTransactionDateN8NoInitiating transaction date (3DS2 only). Present if recurringPaymentManagedByMerchant = true.
originalInstallmentNumberN1..99NoInitiating installment payment number. Present if recurringPaymentManagedByMerchant = true and recurringPaymentForm = installment.
Either all three installment parameters are required or none: installmentTotalAmount, installmentSingleAmount, and installmentNumber. The recurrenceEndDate and recurrenceFrequency parameters are required for installments.

Transaction Data block

A single signed data block used to transfer all original transaction data fields to and from a PCI DSS merchant, instead of multiple separate fields. An RSA key pair with CertificateType.TRANSACTION_DATA_SIGNATURE must be generated for the merchant.

FieldDescription
Header
algAlgorithm (RS256).
kidID of the corresponding record in the key_mgmt_certificate table.
typHeader type (JOSE).
merchantLoginLogin of the merchant.
Payload
mdOrderReserved for future use.
transDateReserved for future use.
networkReferenceDataNetwork reference data returned from the authorization host.
transactionDataElementsData elements of the authorization request.
isSslSpecifies whether 3DS2 authentication was not performed for the transaction.
dsTransIdDirectory Server Transaction ID, UUID (3DS2 only).
acsTransIdTransaction ID in ACS (3DS2 only).
initTransactionDateInitiating transaction date (3DS2 only).
versionConstant value of 1. Reserved for future use.
panSaltBase64-encoded 16-byte random salt.
panHashBase64 SHA-256 hash of byte[] = PAN.getBytes + salt.bytes.
Block validation fails if: the field is missing for MIT requests with recurringPaymentManagedByMerchant=true or bindingManagedByMerchant=true; a different merchantLogin is used; the key in the JWS header cannot be found; or signature validation fails.

Response parameters

NameTypeMandatoryDescription
orderIdANS36NoUnique order number generated by EPG. Absent if registration failed.
formUrlAN..512NoURL of the payment page to which the customer should be redirected. Absent if registration failed.
errorCodeN 1..3NoResponse code: 0 — successful; any other number — error.
errorMessageAN 1..512NoDescription of the error in the language sent in the language parameter.
recurrenceIdN6Yes (recurring)Identifier for the series of all subsequent payments until the recurrence period ends.

Error codes

CodeMessageDescription
0No system error.No errors.
1Order with given order number has already been processed or the childId is incorrect.The order number is already associated with a completed order, or childId is invalid. Typically caused by duplicate order numbers or incorrect data.
1Order with this number was registered, but was not paid.A payment processing issue has occurred.
1Submerchant is blocked or deleted.The submerchant's account is blocked or has been deleted.
3Unknown currency.The specified currency is not registered in the system.
4Order number / Merchant user name / Amount / Return URL / Password is not specified or cannot be empty.A required parameter value was not specified in the request.
5Incorrect value of a request parameter.A parameter value was specified incorrectly.
5Access is denied.The user does not have the necessary permissions.
5Merchant must change the password.A merchant needs to update their password for security reasons.
5Invalid jsonParams[].A parameter in jsonParams has an incorrect value or the JSON syntax is invalid.
7System error.Software or hardware issue or malfunction.
14PaymentWay is invalid.The specified payment method is not accepted by the system or the merchant.

Request example

http://<host:port>/payment/rest/register.do?userName=apiuser&password=apiuserpassword&orderNumber=26122017090900&amount=888¤cy=978&returnUrl=http://www.return.url.com

Example of the orderBundle parameter

"orderBundle": {
  "cartItems": {
    "items": [
      {
        "name": "item1",
        "positionId": 1,
        "quantity": { "value": 2.0, "measure": "quantity" },
        "itemAmount": 3025,
        "itemCode": "code1"
      },
      {
        "name": "item2",
        "positionId": 2,
        "quantity": { "value": 2.0, "measure": "quantity" },
        "itemAmount": 3025,
        "itemCode": "code2"
      }
    ]
  }
}

Response example

{"orderId":"5f9adf5a-4796-4668-9285-07adf3c9a1aa","formUrl":"http://10.7.32.60/payment/merchants/Merchant/payment_en.html?mdOrder=5f9adf5a-4796-4668-9285-07adf3c9a1aa"}

Merchant-side Google Pay™ implementation: payment APIs

Merchants can use Google Pay™ directly on their own checkout page and submit the payment to EPG. The following requests are supported:

Payment request

The paymentorder.do method is used for a payment request. The payment card data is validated in accordance with the table below. Only POST requests are supported.

NameDescriptionValidation
PANFull card numberLuhn validation — number of digits ranges from 13 to 19.
CVCCard Verification CodeThree or four digits.
YYYY, MMYear, month of card expirationCurrent or future date. If the card expires in the current month, payment is possible until end of the month.
TEXTCardholder nameAcceptable characters: Latin letters, 0–9, $, ), (, -, ., space. Must start with a letter. Min 1 / max 26 characters. Null is valid.

Request parameters

NameTypeMandatoryDescription
userNameAN 1..100YesLogin of the API user on whose behalf requests are processed for a specific merchant.
passwordStringYesUser's password.
MDORDERANS36YesOrder number generated by EPG after the registration of the order.
$PANN 13..19YesCard number.
$CVCN3..4ConditionalCard security code (CVV2/CVC2). Mandatory unless the merchant has the Can pay without CVV2/CVC2 option enabled.
YYYYN..4ConditionalYear when the card expires.
MMN..2ConditionalMonth when the card expires.
$EXPIRYN..6ConditionalCard expiry date in YYYYMM format. Either $EXPIRY or both MM and YYYY must be specified.
TEXTA..512NoCardholder name.
languageA..2ConditionalLanguage of the information or error message returned in the response.
ipAN..19NoIP address of the customer.
emailANS..*NoCustomer's email address for notifications.
bindingNotNeededBooleanNotrue — disables binding creation after successful payment. false — a successful payment may result in binding creation (default).
jsonParams[]AN..1024NoAdditional information fields: {"param":"value"}. Parameter name ≤ 255 chars, value ≤ 1024 chars.
threeDS2Params[]Conditional3-D Secure 2 protocol authentication parameters (JSON structure). Optional for browser-based, mandatory for application-based authentication.
clientBrowserInfoNoJSON structure containing client browser information for 3DS2.
threeDSCompIndStringNoWhether the 3DS Method Completion notification was received: Y — received; N — not received.
clientIdANS 1..255NoCustomer identifier in the merchant system. Mandatory for bindings.
bindingIdAN..255NoIdentifier of a previously created binding. If sent, order can only be paid by that binding.
dccStateAN..32NoDynamic Currency Conversion state: USED — initiated with updated currency amount; DECLINED — initiated with original amount.
dccUuidANS36NoUUID of dynamic currency conversion data.
threeDs2ReturnUrlANS 1..512NoReturn URL for user redirect from issuer ACS after 3DS2 authentication. If not specified, user is redirected to EPG URL.
aReqFieldsOverrideNoJSON structure containing AReq override data for the specific transaction.
originalDsTransIdJWSNoDirectory Server Transaction ID, UUID (3DS2 only). Present if recurringPaymentManagedByMerchant = true.
originalAcsTransIdJWSNoOriginal transaction identifier in ACS (3DS2 only).
originalInitTransactionDateN8NoInitiating transaction date (3DS2 only).
originalInstallmentNumberN1..99NoInitiating installment payment number.

Response parameters

NameTypeMandatoryDescription
errorCodeN 1..3YesCode of the error that occurred during the payment process.
errorMessageAN 1..512NoDescription of the error in the language sent in the language parameter.
infoAN..512YesResult of the payment attempt: Your order is proceeded, redirecting...; Operation declined...; Sorry, payment cannot be completed...; Payment declined. Please, contact the merchant / your bank...; Cannot connect to your bank...; Processing timeout...
redirectAN..512NoURL to which the customer is redirected after payment, depending on the result.
termUrlAN..512NoReturn address from ACS for the customer to complete payment. Used in payments requiring additional ACS authentication.
acsUrlAN..512NoURL of the ACS server. Used in payments requiring additional ACS authentication.
paReqAN..512ConditionalPayer Authentication Request (3-D Secure 1). Message sent from MPI to ACS via cardholder device to authenticate the cardholder.
cReqAN..512ConditionalChallenge Request message (3-D Secure 2). Must be present if a cardholder challenge is required.
cardholderInfoANS..128NoOptional information displayed to the cardholder on a Frictionless transaction. Received from ACS or the issuer (3DS2 only).
additionalResponseCodesAN..1024NoResult of cardholder billing address check (AVS). See additionalResponseCodes block below.
orderStatusCodeN2NoNumeric code specifying order status in EPG. See orderStatusCode values table below.
orderStatusNameAN 1..100NoOrder processing status: started, payment_approved, payment_declined, payment_void, payment_deposited, refunded, card_added, card_modified, card_verified, recurring_template_added.
transactionDataJWSNoSee Transaction Data block description below.

Parameters of the additionalResponseCodes block

NameTypeMandatoryDescription
typeAN..3NoType of additional response code. Only available value: AVS.
responseCodeA1NoAVS response code.
responseMessageAN..512NoAVS response message.

Transaction Data block

A single signed data block used to transfer all original transaction data fields to and from a PCI DSS merchant. An RSA key pair with CertificateType.TRANSACTION_DATA_SIGNATURE must be generated for the merchant.

FieldDescription
Header
algAlgorithm (RS256).
kidID of the corresponding record in the key_mgmt_certificate table.
typHeader type (JOSE).
merchantLoginLogin of the merchant.
Payload
mdOrderReserved for future use.
transDateReserved for future use.
networkReferenceDataNetwork reference data returned from the authorization host.
transactionDataElementsData elements of the authorization request.
isSslSpecifies whether 3DS2 authentication was not performed.
dsTransIdDirectory Server Transaction ID, UUID (3DS2 only).
acsTransIdTransaction ID in ACS (3DS2 only).
initTransactionDateInitiating transaction date (3DS2 only).
versionConstant value of 1. Reserved for future use.
panSaltBase64-encoded 16-byte random salt.
panHashBase64 SHA-256 hash of byte[] = PAN.getBytes + salt.bytes.
Block validation fails if: the field is missing for MIT requests with recurringPaymentManagedByMerchant=true or bindingManagedByMerchant=true; a different merchantLogin is used; the key in the JWS header cannot be found; or signature validation fails.

Error codes

CodeMessageDescription
0No system error.No errors.
5There are no more payment attempts.
5System or internal error.

orderStatusCode values

CodeDescription
0Order registered, but not paid. Not the final status — the order can be paid again. Intermediary statuses observable via getOrderStatusExtended.do.
-1Replaces the decline status when none of the specified statuses is suitable.
1Transaction approved (one-phase payment) / Preauthorization amount put on hold (two-phase payment).
2Amount deposited successfully.
3Transaction reversed. Final status.
4Transaction refunded.
6Transaction declined. Final status.
7Card added.
8Card updated.
9Card verified.
10Recurring template added.

Request example

http://<host:port>/payment/rest/paymentorder.do?userName=apiuser&password=apiuserpassword&MDORDER=aca0f48d-9e99-4437-9335-a50a42c363da&$PAN=4000010000000050&$CVC=123&YYYY=2020&MM=06&TEXT=Card Holder&language=EN

Response example — no additional ACS authentication required

{"redirect":"https://example.com/epg/merchants/root/finish.html?orderId=ffd85ad3-1851-430f-99da-a78ecd228d4d&lang=en&status=payment_deposited","info":"Your order is proceeded, redirecting...","errorCode":0,"orderStatusCode":2,"orderStatusName":"payment_deposited"}

Response example — 3DS payment requiring ACS authentication

{"info":"Your order is proceeded, redirecting...","acsUrl":"http://10.7.32.60:6001/acs/pareq","paReq":"eJxVUdFy...","termUrl":"http://10.7.32.60/payment/rest/finish3ds.do","errorCode":0}
If 3-D Secure is required, after receiving the payment response the merchant must redirect the customer to the ACS URL (specified in acsUrl) via a POST request.

Return to the payment gateway from ACS: In the classic scheme, ACS authenticates the cardholder and redirects them to EPG sending PARes. If successful, EPG authorizes the order.

Return to the merchant from ACS using Finish 3DS: ACS authenticates the cardholder and redirects them to the merchant. The merchant transfers PARes to EPG via finish3dsPayment.do.

Request for Google Pay™ payment with decrypted data

The /api/v1/googlepay/payment/decrypted method is used to process Google Pay™ payments using decrypted payment data (cleartext PAN) so that EPG could pass this data to SVFE as is (without decryption).

This request is authenticated with the userName and password parameters that must be transferred.

Request parameters

The request includes common digital wallet request parameters and the parameters described below.

NameTypeMandatoryDescription
userNameAN 1..100YesLogin of the API user on whose behalf requests are processed for a specific merchant.
passwordStringYesUser's password.
paymentData[]Not applicableYesDecrypted payment data (see the paymentData block description). For the format of Payment Data Keys, see Non-tokenized card and Tokenized card in Google documentation.
amountN 1..12NoOrder amount in the minor denomination (for example, cents).
currencyCodeN3NoPayment currency code in the ISO 4217 format.
clientBrowserInfoNot applicableNoJSON structure containing the client browser information for 3DS2.

Parameters of the paymentData block

NameTypeMandatoryDescription
gatewayMerchantIdStringYesPayment gateway merchant identifier.
paymentMethodStringYesType of the payment credential.
paymentMethodDetails[]ObjectPayment method data is specified in the paymentMethodDetails block.
messageIdStringYesUnique ID that identifies the message in case it must be revoked or located at a later time.
messageExpirationStringYesDate and time at which the message expires as UTC milliseconds since epoch. Integrators should reject any message that is expired.

Response parameters

NameTypeMandatoryDescription
errorAN 1..512NoDescription of the error in the language sent in the language parameter.
errorCodeN 1..3NoResponse code: 0 — successful transaction; any other number — an error occurred.
lookupBooleanNoSpecifies whether LookUp checks are used: true — enabled; false — disabled. Displayed if the Lookup feature is configured in EPG.
orderStatus[]NoStatus of the order after processing the request as it is passed in the getOrderStatusExtended method.
successBooleanYesResult of the request: true — successfully processed; false — processing failed.
data[]Not applicableNoBlock with the order details (see data block below).

Format of the data block

NameTypeMandatoryDescription
orderIdANS36YesUnique order number generated by EPG after the registration of the order.

Request example (PAN only)

http://<host:port>/epg/api/v1/googlepay/payment/decrypted?userName={user}&password={password}
{
  "merchant": "5010000",
  "mdOrder": "f903e52a-54ca-4c9f-aa57-732333710bdf",
  "additionalParameters": {
    "paramName": "paramValue"
  },
  "description": "desc",
  "paymentData": {
    "gatewayMerchantId": "510000",
    "paymentMethod": "CARD",
    "paymentMethodDetails": {
      "authMethod": "PAN_ONLY",
      "pan": "4000010000000001",
      "expirationMonth": 7,
      "expirationYear": 2029
    },
    "messageId": "some-message-id",
    "messageExpiration": "1577862"
  },
  "language": "en",
  "preAuth": true,
  "currencyCode": "840",
  "amount": 70,
  "ip": "127.0.0.1",
  "customerBillingAddress": {
    "billAddrCity": "billAddrCity value"
  }
}

Request example (Cryptogram 3DS)

http://<host:port>/epg/api/v1/googlepay/payment/decrypted?userName=api&password=1
{
  "orderNumber": "2020122adaddw31666340992",
  "merchant": "testapi",
  "additionalParameters": { "DE22": "100" },
  "description": "uuu",
  "paymentData": {
    "gatewayMerchantId": "192543",
    "messageExpiration": "1671193200719",
    "messageId": "some-message-id",
    "paymentMethod": "CARD",
    "paymentMethodDetails": {
      "expirationYear": 2049,
      "expirationMonth": 12,
      "pan": "4000010000000001",
      "authMethod": "CRYPTOGRAM_3DS",
      "eciIndicator": "07",
      "cryptogram": "/wABCDEFLc6CgzairNjvQVcABCD="
    },
    "language": "ru",
    "preAuth": false,
    "currencyCode": "840",
    "amount": 6050,
    "ip": "127.0.0.1",
    "returnUrl": "https://example.com/"
  }
}

Response example (success)

{
  "orderStatus": {
    "errorCode": "0",
    "errorMessage": "Success",
    "orderNumber": "2020122adaddw31666340992",
    "amount": 6050,
    "currency": "840",
    "date": 1610359322132,
    "ip": "127.0.0.1",
    "merchantOrderParams": [{ "name": "DE22", "value": "100" }],
    "attributes": [{ "name": "mdOrder", "value": "fee466e1-03d3-400f-9a0e-93f607495f73" }],
    "cardAuthInfo": {
      "expiration": "202107",
      "secureAuthInfo": { "eci": 7 },
      "pan": "400001**0050"
    }
  }
}

Response example (error)

{
  "errorCode": 1,
  "errorMessage": "Order number is duplicated, order with given order number is processed already",
  "success": false,
  "error": {
    "code": "1",
    "description": "Order number is duplicated, order with given order number is processed already",
    "message": "Order number is duplicated, order with given order number is processed already"
  }
}

Request for Google Pay™ payment with an encrypted token as JSON

A Google Pay™ transaction that uses encrypted payment data (DPAN) transfers a token (paymentToken) to EPG. The payment token is a JSON structure that contains Google Pay™ keys (intermediateSigningKey[], signedMessage) and an encrypted token (PAN/DPAN, and other). Once EPG receives the /api/v1/googlepay/payment/encrypted request, it decrypts the token using private keys.

The request is authenticated — userName and password parameters are required.

An anonymous version of this request can be sent from the hosted payment page without username and password. See Request for Google Pay™ payment with encrypted token as JSON via hosted payment page.

Request parameters

The request includes common digital wallet request parameters and the parameters described below.

NameTypeMandatoryDescription
userNameAN 1..100YesLogin of the API user on whose behalf requests are processed for a specific merchant.
passwordStringYesUser's password.
paymentToken[]JSONYesPayment data (see the paymentToken block description). For the format, see Payment method token structure in Google documentation.
amountN 1..12NoOrder amount in the minor denomination (for example, cents).
currencyCodeN3NoPayment currency code in the ISO 4217 format.
clientBrowserInfoNot applicableNoJSON structure containing the client browser information for 3DS2.

Response parameters

NameTypeMandatoryDescription
redirectAN..512NoURL to which the customer is redirected after executing the payment.
infoAN..512YesResult of the payment attempt (e.g. Your order is proceeded, redirecting... or Operation declined...).
errorCodeN 1..3NoResponse code: 0 — successful; any other number — error.
lookupBooleanNoWhether LookUp checks are used. Displayed if the Lookup feature is configured in EPG.
orderStatus[]NoOrder status after processing, as returned by getOrderStatusExtended.
successBooleanYestrue — successfully processed; false — failed.
data[]Not applicableNoBlock with the order details. orderId (ANS36, Yes) — unique order number generated by EPG.

Request example

{
  "merchant": "test_merchant",
  "paymentToken": {
    "signature": "MEUCIAbnHry...",
    "intermediateSigningKey": {
      "signedKey": "{"keyValue":"MFkwEwYH...","keyExpiration":"1622102613707"}",
      "signatures": ["MEUCIFXynvg4S+Qc7Obb..."]
    },
    "protocolVersion": "ECv2",
    "signedMessage": "{"encryptedMessage":"e0GX3ccb...","ephemeralPublicKey":"BBYkGq...","tag":"3cChnP..."}"
  }
}

Response example (success)

{
  "redirect": "http://localhost:7013/epg/merchants/testapi/finish.html?orderId=da2b2991-c2f3-43f1-966f-c674a9a75b73&lang=en&status=payment_deposited",
  "info": "Your order is proceeded, redirecting...",
  "errorCode": 0,
  "lookup": false,
  "orderStatus": {
    "errorCode": "0",
    "errorMessage": "Success",
    "orderNumber": "adawdawdawd2adawd5428834",
    "orderStatus": 2,
    "actionCode": 0,
    "actionCodeDescription": "No error",
    "amount": 6050,
    "currency": "840",
    "date": 1609940764499,
    "cardAuthInfo": {
      "expiration": "202812",
      "authorizationResponseId": "123456",
      "secureAuthInfo": { "eci": 7 },
      "pan": "521424**0000"
    }
  },
  "success": true,
  "data": { "orderId": "da2b2991-c2f3-43f1-966f-c674a9a75b73" }
}

Response example (error)

{
  "errorCode": 10,
  "errorMessage": "Signature verification offline failed: signing key is missing.",
  "success": false,
  "error": {
    "code": "10",
    "description": "Signature verification offline failed: signing key is missing.",
    "message": "Signature verification offline failed: signing key is missing."
  }
}

Request for Google Pay™ Payment with Base64-encoded encrypted token

The /api/v1/googlepay/encodedtoken/encrypted request is used to process payments using a Google-signed and encrypted payment method token in Base-64 encoding. EPG verifies and decrypts the token.

An anonymous version of this request can be sent from the hosted payment page without username and password. See Request for Google Pay™ payment with Base64-encoded encrypted token via hosted payment page.

Request parameters

The request includes common digital wallet request parameters and the parameters described below.

NameTypeMandatoryDescription
userNameAN 1..100YesLogin of the API user on whose behalf requests are processed for a specific merchant.
passwordStringYesUser's password.
paymentTokenStringYesPayment data. For technical details on token structure and encryption, see Google documentation.
amountN 1..12NoOrder amount in the minor denomination (for example, cents).
currencyCodeN3NoPayment currency code in the ISO 4217 format.
clientBrowserInfoNot applicableNoJSON structure containing the client browser information for 3DS2.

Response parameters

NameTypeMandatoryDescription
redirectAN..512NoURL to which the customer is redirected after executing the payment.
infoAN..512YesResult of the payment attempt.
errorCodeN 1..3NoResponse code: 0 — successful; any other number — error.
lookupBooleanNoWhether LookUp checks are used. Displayed if the Lookup feature is configured in EPG.
orderStatus[]NoOrder status after processing, as returned by getOrderStatusExtended.
successBooleanYestrue — successfully processed; false — failed.
data[]Not applicableNoorderId (ANS36, Yes) — unique order number generated by EPG.

Request example

/api/v1/googlepay/payment/encodedtoken/encrypted?userName={user}&password={password}
{
  "merchant": "m01",
  "mdOrder": "6d68883a-df01-42ec-b4ef-245e21287547",
  "description": "desc",
  "paymentToken": "ew0KICAgICJzaWduYXR1cmUiOiAiTUVZQ0...",
  "language": "EN",
  "preAuth": true,
  "currencyCode": "840",
  "amount": 190,
  "ip": "127.0.0.1"
}

Response example (success)

{
  "redirect": "http://localhost:7013/epg/merchants/testapi/finish.html?orderId=da2b2991-c2f3-43f1-966f-c674a9a75b73&lang=en&status=payment_deposited",
  "info": "Your order is proceeded, redirecting...",
  "errorCode": 0,
  "success": true,
  "data": { "orderId": "da2b2991-c2f3-43f1-966f-c674a9a75b73" }
}

EPG-side Google Pay™ integration: payment APIs

Merchants can be integrated with Google Pay™ via EPG using the hosted payment page. The following requests are supported:

Request for Google Pay™ payment with encrypted token as JSON via hosted payment page

The /api/v1/googlepay/payment/encrypted-anonymous request is used to process payments using a Google-signed and encrypted payment method token. The paymentToken is passed as a JSON containing Google Pay™ keys (intermediateSigningKey[], signedMessage) and an encrypted token (PAN/DPAN). EPG decrypts it using private keys.

To enable anonymous data processing, the Anonymous access allowed setting must be enabled on the Digital wallets > GooglePay tab of the merchant settings.

Request parameters

The request includes common digital wallet request parameters and the parameters described below.

NameTypeMandatoryDescription
paymentToken[]JSONYesEncrypted payment data. For the format, see Payment method token structure in Google documentation.
amountN 1..12NoOrder amount in the minor denomination (for example, cents).
currencyCodeN3NoPayment currency code in the ISO 4217 format.
clientBrowserInfoNot applicableNoJSON structure containing the client browser information for 3DS2.

Response parameters

NameTypeMandatoryDescription
redirectAN..512NoURL to which the customer is redirected after executing the payment.
infoAN..512YesResult of the payment attempt.
errorCodeN 1..3NoResponse code: 0 — successful; any other number — error.
lookupBooleanNoWhether LookUp checks are used. Displayed if configured in EPG.
orderStatus[]N3NoOrder status, as returned by getOrderStatusExtended.
successBooleanYestrue — successfully processed; false — failed.
data[]Not applicableNoorderId (ANS36, Yes) — unique order number generated by EPG.
clientBrowserInfoNot applicableNoJSON structure containing the client browser information for 3DS2.

Request example

/api/v1/googlepay/payment/encrypted-anonymous
{
  "merchant": "m01",
  "mdOrder": "6d68883a-df01-42ec-b4ef-245e21287547",
  "paymentToken": {
    "signature": "MEUCIAbnHry...",
    "intermediateSigningKey": {
      "signedKey": "{"keyValue":"MFkwEwYH...","keyExpiration":"1622102613707"}",
      "signatures": ["MEUCIFXynvg4S+Qc7Obb..."]
    },
    "protocolVersion": "ECv2",
    "signedMessage": "{"encryptedMessage":"e0GX3ccb...","ephemeralPublicKey":"BBYkGq...","tag":"3cChnP..."}"
  }
}

Response example (success)

{
  "redirect": "http://localhost:7013/epg/merchants/testapi/finish.html?orderId=da2b2991-c2f3-43f1-966f-c674a9a75b73&lang=en&status=payment_deposited",
  "info": "Your order is proceeded, redirecting...",
  "errorCode": 0,
  "lookup": false,
  "orderStatus": {
    "errorCode": "0",
    "errorMessage": "Success",
    "orderNumber": "adawdawdawd2adawd5428834",
    "orderStatus": 2,
    "actionCode": 0,
    "amount": 6050,
    "currency": "840",
    "cardAuthInfo": {
      "expiration": "202812",
      "secureAuthInfo": { "eci": 7 },
      "pan": "521424**0000"
    }
  },
  "success": true,
  "data": { "orderId": "da2b2991-c2f3-43f1-966f-c674a9a75b73" }
}

Response example (error)

{
  "errorCode": 10,
  "errorMessage": "Signature verification offline failed: signing key is missing.",
  "success": false,
  "error": {
    "code": "10",
    "description": "Signature verification offline failed: signing key is missing.",
    "message": "Signature verification offline failed: signing key is missing."
  }
}

Request for Google Pay™ payment with Base64-encoded encrypted token via hosted payment page

The api/v1/googlepay/payment/encodedtoken/encrypted-anonymous request is used to process payments using a Google-signed and encrypted payment method token in Base-64 encoding via the EPG hosted payment page.

To enable anonymous data processing, the Anonymous access allowed setting must be enabled on the Digital wallets > GooglePay tab of the merchant settings.

Request parameters

The request includes common digital wallet request parameters and the parameters described below.

NameTypeMandatoryDescription
paymentTokenStringYesPayment data.
amountN 1..12NoOrder amount in the minor denomination (for example, cents).
currencyCodeN3NoPayment currency code in the ISO 4217 format.
clientBrowserInfoNot applicableNoJSON structure containing the client browser information for 3DS2.

Response parameters

NameTypeMandatoryDescription
redirectAN..512NoURL to which the customer is redirected after executing the payment.
infoAN..512YesResult of the payment attempt.
errorCodeN 1..3NoResponse code: 0 — successful; any other number — error.
lookupBooleanNoWhether LookUp checks are used. Displayed if configured in EPG.
orderStatus[]NoOrder status, as returned by getOrderStatusExtended.
successBooleanYestrue — successfully processed; false — failed.
data[]Not applicableNoorderId (ANS36, Yes) — unique order number generated by EPG.

Request example

http://<host:port>/epg/api/v1/googlepay/payment/encodedtoken/encrypted-anonymous
{
  "merchant": "m01",
  "mdOrder": "6d68883a-df01-42ec-b4ef-245e21287547",
  "description": "desc",
  "paymentToken": "ew0KICAgICJzaWduYXR1cmUiOiAiTUVZQ0...",
  "language": "EN",
  "preAuth": true,
  "currencyCode": "840",
  "amount": 190,
  "ip": "127.0.0.1"
}

Response example (success)

{
  "redirect": "http://localhost:7013/epg/merchants/testapi/finish.html?orderId=da2b2991-c2f3-43f1-966f-c674a9a75b73&lang=en&status=payment_deposited",
  "info": "Your order is proceeded, redirecting...",
  "errorCode": 0,
  "success": true,
  "data": { "orderId": "da2b2991-c2f3-43f1-966f-c674a9a75b73" }
}

Response example (error)

{
  "errorCode": 10,
  "errorMessage": "Signature verification offline failed: signing key is missing.",
  "success": false
}

Merchant-side Google Pay™ implementation: non-payment APIs

The following APIs are provided to decrypt payment token data without initiating a payment request for authorization to SVFE:

Request for Google Pay™ data decryption from encrypted token as JSON

This request contains the Google-signed and encrypted payment method token. This API endpoint is designed to decrypt the payment token to retrieve the underlying payment data. To initiate the request, the /api/v1/googlepay/token/decrypt method is used.

Request parameters

NameTypeMandatoryDescription
merchantAN 1..100YesMerchant login to access EPG.
paymentToken[]JSONYesEncrypted payment data. For the format, see Payment method token structure in Google documentation.

Response parameters

NameTypeMandatoryDescription
errorCodeN 1..3Yes0 — decryption completed without errors. Other codes indicate an error.
successBooleanNotrue — successfully processed; false — failed.
paymentData[]ObjectNoParameters from the paymentData block (see below).

Format of the paymentData block

NameTypeMandatoryDescription
gatewayMerchantIdStringYesPayment gateway merchant identifier.
paymentMethodStringYesType of the payment credential.
paymentMethodDetails[]ObjectYesPayment method data specified in the paymentMethodDetails block.
messageIdStringYesUnique ID that identifies the message.
messageExpirationStringYesExpiry time as UTC milliseconds since epoch. Integrators should reject expired messages.

Request example

http://<host:port>/epg/api/v1/googlepay/token/decrypt
{
  "merchant": "testapi",
  "paymentToken": "ew0KICAgICJzaWduYXR1cmUiOiAiTUVZQ0..."
}

Response example (success)

{
  "errorCode": 0,
  "paymentData": {
    "gatewayMerchantId": "500000",
    "paymentMethod": "CARD",
    "paymentMethodDetails": {
      "authMethod": "PAN_ONLY",
      "pan": "4000010000000050",
      "expirationMonth": 7,
      "expirationYear": 2021
    },
    "messageId": "some-message-id",
    "messageExpiration": "1577862000000"
  }
}

Response example (error)

{
  "errorCode": 10,
  "errorMessage": "Signature verification offline failed: signing key is missing.",
  "success": false,
  "error": {
    "code": "10",
    "description": "Signature verification offline failed: signing key is missing.",
    "message": "Signature verification offline failed: signing key is missing."
  }
}

Request for Google Pay™ data decryption from Base64 encoded encrypted token

The /api/v1/googlepay/encodedtoken/decrypt method is used to decrypt Google Pay™ payment data passed to EPG as a Base64 encoded string which contains the payment token object. EPG does not transfer the transaction for authorization to SVFE. The request contains a payment token object (a Base64-encoded serialized JSON object). EPG decodes the payment data and returns a response with the decrypted payment data (see Non-tokenized card in Google documentation).

The request is not authenticated. The merchant login (merchant) is used to perform all the checks.

Request parameters

NameTypeMandatoryDescription
merchantAN 1..100YesMerchant login to access EPG.
paymentTokenStringYesBase64 encrypted payment data.

Response parameters

NameTypeMandatoryDescription
errorCodeN 1..3Yes0 — decryption completed without errors. Other codes indicate an error.
errorMessageAN 1..512NoDescription of the error.
successBooleanNotrue — successfully processed; false — failed.
paymentData[]ObjectNoParameters from the paymentData block (same structure as above: gatewayMerchantId, paymentMethod, paymentMethodDetails[], messageId, messageExpiration).

Request example

{"merchant": "m01",
"paymentToken": "ew0KICAgICJzaWduYXR1cmUiOiAiTUVZQ0..."
}

Response example (success)

{
  "errorCode": 0,
  "paymentData": {
    "gatewayMerchantId": "500000",
    "paymentMethod": "CARD",
    "paymentMethodDetails": {
      "authMethod": "PAN_ONLY",
      "pan": "4000010000000050",
      "expirationMonth": 7,
      "expirationYear": 2021
    },
    "messageId": "some-message-id",
    "messageExpiration": "1577862000000"
  }
}

Response example (error)

{
  "errorCode": 10,
  "errorMessage": "Signature verification offline failed: signing key is missing.",
  "success": false,
  "error": {
    "code": "10",
    "description": "Signature verification offline failed: signing key is missing.",
    "message": "Signature verification offline failed: signing key is missing."
  }
}