Apple Pay
Render a native Apple Pay button that handles the complete Apple Pay session, including the payment sheet, Touch ID/Face ID, and confirmation.
How it works
Before getting started
1. Get merchant credentials
As a partner you take payments on behalf of the merchants you serve. Each merchant's Client ID and Client Secret are delivered to your registrationWebhook when the merchant connects Teya to your platform, along with the store_id and payment_webhook_public_key.
client_credentials grant to obtain access tokens2. API URLs
| Service | Staging | Production |
|---|---|---|
| Online Payments API | https://api.teya.xyz | https://api.teya.com |
| OAuth | https://id.teya.xyz/oauth/v2/oauth-token | https://id.teya.com/oauth/v2/oauth-token |
| Business Portal | https://business.teya.xyz | https://business.teya.com |
3. Required scopes
Request these scopes when obtaining your access token:
| Scope | Description |
|---|---|
transactions/online/create | Process an online transaction |
transactions/online/id/get | Get online transaction details |
checkout/sessions/create | Create a session for the SDK |
Domain Verification
Apple Pay requires that your domain is verified before payments can be processed. Follow these steps:
https://yourdomain.com/.well-known/apple-developer-merchantid-domain-associationInstall the SDK
npm install @teyaproduct/teya-blocks-js
For React applications:
npm install @teyaproduct/teya-blocks-js @teyaproduct/teya-blocks-react
See SDK Initialization for initTeyaBlocks() options, including developmentMode for staging.
Related
- Customize - Button styles, types, and locale options
- Card Element - Single unified card input
- Split Card - Separate card fields
- Webhooks - Receive payment confirmation notifications
- Testing - Test cards and integration checklist
Try it - Apple Pay
Follow the interactive quickstart below to build a working integration with the Apple Pay.