Skip to main content

Deferred charge by Apple Pay

Allows you to exchange an Apple Pay token for a Tranzzo 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. You create an Apple Pay session.
  3. Payer clicks the Apple Pay payment button.
  4. You receive the Apple Pay token and then exchange it for a Tranzzo token.
  5. You charge needed amount from your customer using Tranzzo token.

You can exchange the Apple Pay token in one of the following ways:

  • Direct integration (placing the Apple Pay payment button on your website or inside your mobile app).
  • Integration using a tokenization widget (placing the Apple Pay payment button within our widget).

Direct integration

Features of using direct integration:

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

Example request to create an Apple Pay session:

curl -X 'POST' \
'https://cpay.tranzzo.com/api/v1/applepay/session' \
-H "Content-Type: application/json" \
-H "X-API-AUTH: CPAY ${API_KEY}:${API_SECRET}" \
-H "X-API-KEY: ${ENDPOINTS_KEY}" \
-d '{
"pos_id": "'$POS_ID'",
"validation_url": "https://apple-pay-gateway.apple.com/paymentservices/startSession"
}'

After creating the session and receiving the Apple Pay token, you need to exchange it for a Tranzzo token.

Request parameters

ParameterTypeRequiredDescription
pos_idUUIDMerchant's identifier (POS_ID)
tokenStringToken Apple Pay

Example request to exchange an Apple Pay token for a Tranzzo token:

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

Response parameters:

ParameterTypeDescription
cc_tokenStringTranzzo token

Response example:

{
"cc_token": "ODJkZjBhNmY2OTMyNDJlN2wjMjFjfTQzOXU3ZDFhYzI6cWJmWHFmMHlzM3hYaXJMWEZv"
}
info

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

Using the tokenization widget

Integration details and usage of the tokenization widget.

info

Contact Tranzzo support to activate Apple Pay for tokenization widget

Next steps:

Testing the token exchange and payment process:

Find more details in the integration checklist.

After completing the testing to go live, you need:

  • Create a live project in the merchant portal.
  • 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: