Apple Pay™ Payments
This document applies to the following country:
| Brazil |
|---|
Accept payments through Apple Pay™, Apple's digital wallet. The buyer pays on websites and apps with the cards saved on their device. They authenticate with Face ID, Touch ID, or passcode.
Your integration never receives the real card number. Instead, it receives an encrypted payment token that Apple generates.
This guide walks you through a single Web Checkout API integration. You create a payment intent, validate the Apple Pay merchant session, get the token, and submit the payment.
How it works
Use Apple Pay to offer a secure checkout to buyers on Apple devices. Buyers don't have to type in card details. Key characteristics:
- No card entry: the buyer pays with the cards already saved on their Apple device.
- Encrypted token: the app/site gets a payment token from Apple and forwards it to Getnet. The real card number never travels.
- Native authentication: device biometrics/passcode (Face ID / Touch ID). Bypasses the 3DS flow.
- Synchronous processing: submitting the payment returns the result (status / authorization_code) in the same call.
- Merchant session validation: unlike Google Pay, Apple Pay requires an extra merchant session validation step before the frontend can get the token. This step requires a domain registered with Apple.
The end-to-end flow involves the buyer, your frontend, your backend, and the Getnet Web Checkout API:
Before you start
Before you integrate, make sure you have the following in place:
- The seller (x-seller-id) has Apple Pay enabled.
- Domain onboarding is complete for your integration type (see below).
- You have generated your token by following the Authentication document.
Technical onboarding by integration type
Domain registration depends on your integration type:
| Integration type | Domain registration |
|---|---|
| Link & Redirect API | Uses the Getnet domain. No merchant domain registration is required. |
| Iframe & Lightbox | The merchant domain differs from the Getnet domain. You must provide your domain in the Web Checkout configuration so Getnet can register it with Apple. You must also download the Domain verification file and host it on your server. |
Step 1: Create the payment intent
payment_intent_id and a redirect_url.| Endpoint |
|---|
POST /payment-intent |
| Field | Type | Description | Example |
|---|---|---|---|
payment.currency | String | Currency code. | BRL |
payment.amount | Integer | Purchase amount in integer format, where the last 2 digits represent the cents. For countries where cents do not apply, fill in the amount with 2 zeros to the right. | 92500 |
customer.customer_id | String | We recommend using the customer's document number. Use only letters and numbers, without special characters, separators or spaces. | 12345678912 |
customer.first_name | String | Customer's first name. | John |
customer.last_name | String | Customer's last name. | Doe Smith |
customer.name | String | Customer's full name. | John Doe Smith |
customer.email | String | Customer's email address. | customer@email.com.br |
customer.document_type | String | Type of the document used to identify the customer. | CPF |
customer.document_number | String | Document number used to identify the customer. | 12345678912 |
customer.billing_address.street | String | Name of a street. | Av. Brasil |
customer.billing_address.number | String | Number that identifies the position of a building on a street. | 1000 |
customer.billing_address.country | String | Country code. | BR |
customer.billing_address.postal_code | String | Postal or ZIP code. | 90230060 |
| Field | Type | Description | Example |
|---|---|---|---|
configurations.3ds | boolean | Controls 3D Secure authentication. | true or false |
configurations.preauthorization | boolean | Indicates if the payment is a pre-authorization. | true or false |
configurations.card_verification | boolean | Indicates if this is a card verification flow. | true or false |
configurations.success_url | string | Redirect URL in case of successful payment. | https://www.mystore.com/checkout/success |
configurations.error_url | string | Redirect URL in case of an error during payment. | https://www.mystore.com/checkout/error |
product | array | Line items. | --- |
soft_descriptor | string | Payment description that appears on the customer's receipt. | Loja BR |
expires_at | string | Payment intent expiration. | 3d4h15m |
Field filling rules
Follow these rules when you fill in the optional fields:
- The
expires_atfield accepts a duration value (for example: 15m, 2h, 7d, or 1d12h30m). The API applies this duration regardless of your timezone. The expiration timestamp returned by the API is always formatted in GMT+0 (UTC). If you provide no value, the payment intent does not expire. - When you provide
success_urlanderror_urlin the payment intent request, they override the values set in the seller's technical configuration.
Example request
The following example shows a payment intent request with the required and optional fields.
Step 2: Confirm the result
status and authorization_code. Before you release the order, also confirm the result through the webhook sent to notification.url.Webhook status can be Authorized or Denied.
Example approved webhook response
Authorized and an authorization_code.Example denied webhook response
Denied and a return_message with the reason.On this page