Onerway
POST

Check Google Pay PAN_ONLY token

Use this endpoint to check whether a Google Pay token is PAN_ONLY before creating the direct transaction when you collect the CVC yourself. The standard path, where the Onerway-hosted page collects the CVC, does not call this endpoint; choosing between the two paths is covered in Google Pay.

Request

merchantNo
Merchant number assigned by Onerway. See Setup for how to obtain it.
Example:
appId
Application or site identifier assigned by Onerway. It identifies the merchant application that shows the Google Pay button.
Example:
merchantTxnId
Merchant transaction ID of the order that this Google Pay token will pay for.
Example:
Constraints
Consistency
Use the same value as merchantTxnId in the Create direct transaction request that follows this check.
gatewayName
Google Pay gateway identifier. Use the gatewayName returned for the GooglePay record by List available payment methods.
Example:
Google Pay token to check, in the same structure as tokenInfo of Create direct transaction.
Constraints
Consistency
Submit the same encrypted token in tokenInfo of the Create direct transaction request that follows; do not request a new token from Google Pay between the check and the payment.
sign
Request signature string. See Request signing for how to generate it.

Request example

curl -X POST 'https://sandbox-acq.onerway.com/txn/apiCheckGooglePay' \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "merchantNo": "replace_with_merchant_no",
  "appId": "replace_with_app_id",
  "merchantTxnId": "txn_demo_google_pay_202609090001",
  "gatewayName": "replace_with_gateway_name",
  "tokenInfoJson": "{\"provider\":\"GooglePay\",\"tokenId\":\"{{GOOGLE-PAY-TOKEN}}\"}",
  "sign": "{{SIGN}}"
}'

Response

respCode
Response code returned by Onerway. 20000 means the token was checked; other values indicate failure. See Response codes.
respMsg
Human-readable message for the response code.
Check result for the submitted Google Pay token.

Response example

{
  "respCode": "20000",
  "respMsg": "Success",
  "data": {
    "cardNum": "411111******1111",
    "checkResult": false
  }
}
No error responses are documented for this endpoint.