Skip to main content

Deferred charge by Google Pay™

Allows you to exchange a Google Pay™ token for a Pay-center token for further deferred charging.

How does it work?

  1. The payer places an order on your website or mobile app and confirms it.
  2. Payer clicks the Google Pay™ payment button.
  3. You receive the Google Pay™ token and then exchange it for a Pay-center token.
  4. You charge needed amount from your customer using Pay-center token.

You can exchange the Google Pay™ token using of the following ways:

  • Direct integration (placing the Google Pay™ payment button on your website or inside your mobile app).

Direct integration

Features of using direct integration:

  • The payment page must use the HTTPS protocol.
  • Customer details must be persistent and unique.
  • Use the HTTP POST method.

Request parameters:

ParameterTypeRequiredDescription
pos_idUUIDMerchant's identifier (POS_ID)
tokenStringToken Google Pay™

Example request to exchange a Google Pay™ token for a Pay-center token:

curl -X 'POST' \
'https://api.pay-center.com.ua/api/v1/tokenization/tokenize' \
-H "Content-Type: application/json" \
-H "X-API-AUTH: CPAY ${API_KEY}:${API_SECRET}" \
-d '{
"pos_id": "${POS_ID}",
"token": "gpay:eyJwYXltZW50RGF0YSI6eyJ2ZXJzaW9uIjoiRUNfdjEiLC..."
}'

Response parameters:

ParameterTypeDescription
cc_tokenStringPay-center token

Response example:

{
"cc_token": "ODJkZjBhNmY2OTMyNDJlN2wjMjFjfTQzOXU3ZDFhYzI6cWJmWHFmMHlzM3hYaXJMWEZv"
}
info

Use cc_token with One-step payment (purchase) request to charge the payer.

Next steps

Testing the token exchange and payment process:

  1. Create an account in the merchant portal.
  2. Use the authentication data of the test project.
  3. Configure webhooks.
  4. Use the test data to obtain different operation result codes.
  5. Handle received errors.

After completing the testing to go live, you need:

  1. Create a live project in the merchant portal.
  2. After receiving information from our Compliance team about the completion of the settings for the project, make changes to the authentication data using the data of the live project.

You are ready to accept payments from your customers.

See also: