You are here:
Add Apple Pay to a Messaging Channel
To allow service reps to request payments during messaging sessions, add Apple Pay to your enhanced Apple Messages for Business channel.
Required Editions
| View supported editions. | |
This article applies to:
|
Enhanced Apple Messages for Business channels |
This article doesn’t apply to:
|
Enhanced In-App Chat, Enhanced Web Chat v1, Enhanced Web Chat v2, Enhanced WhatsApp, Standard and Enhanced Facebook Messenger, Standard and Enhanced SMS, Enhanced LINE, and Bring Your Own Channel |
| User Permissions Needed | |
|---|---|
| To set up and edit Messaging channels: | Configure Messaging |
| To view channels: | View Setup and Configuration |
- Set Up Apple Pay
To get started, set up Apple Pay in your Apple settings. - Import Your Merchant Identity Certificate
Import your merchant identity certificate into Salesforce. This certificate is generated when you set up Apple Pay. - Update Your Messaging Channel Settings
After you import your certificate, add Apple Pay to your enhanced Apple Messages for Business channel. - Create an Apex Class to Process Payments
On the Apex Classes page in Setup, create an Apex class to facilitate payment processing. - Create a Payment Messaging Component, Apex Classes, and Flow
Now that the preparation is complete, create a payment messaging component and accompanying flow.
Set Up Apple Pay
To get started, set up Apple Pay in your Apple settings.
- If you haven’t done so yet, enroll in Apple Pay. For help, see the Apple documentation: Setting Up Apple Pay.
-
Add your merchant information to your Messages for Business account.
- Go to register.apple.com and sign in with the Apple ID of the administrator or technical contact for the Messages for Business account.
- Navigate to your company's Messages for Business accounts and find the business account.
- Under Optional Integrations, find the Apple Pay section.
- Next to Apple Pay Merchant ID, click Edit.
- Enter the Apple Pay Merchant ID, which you created when you set up Apple Pay.
- Click Done.
Import Your Merchant Identity Certificate
Import your merchant identity certificate into Salesforce. This certificate is generated when you set up Apple Pay.
-
Download your certificate in Apple Pay.
- Go to developer.apple.com/account.
- Select Certificates under Certificates, Identifiers & Profiles.
- Click on the relevant merchant certificate, or click the + to create a new certificate.
- Click Download.
-
Convert the certificate from .cer to Java Keystore (.jks) format.
- Convert the .cer file to a .p12 file. Mac users can do this by importing the file into Keychain and exporting it as a .p12 file.
- Convert the .p12 file to a .jks file.
- In Setup, go to the Certificate and Key Management page.
- Click Import from a Keystore.
- Select your .jks certificate file and enter the keystore password.
- Click Save.
Update Your Messaging Channel Settings
After you import your certificate, add Apple Pay to your enhanced Apple Messages for Business channel.
If you’re using one Apple Messages for Business channel to handle transactions for multiple brands, keep in mind that you can add only one Apple Pay configuration per channel. This means that all payment requests that occur in the channel will show the merchant name listed in your Apple Pay account.
- In Setup, go to the Messaging Settings page.
- Click the name of your enhanced Apple Messages for Business channel.
- In the Apple Pay section, click Add.
- Select the Merchant Identity Certificate that you imported in Setup.
- Enter your Apple Merchant ID. Find this ID on the Certificates, Identifiers & Profiles page in your Apple (not Salesforce) settings.
- Enter your merchant name, which appears on your payment requests.
-
Click Save.
A new entry is now visible in the Apple Pay section of your channel settings.
-
Verify your merchant domain with Apple.
- In the Apple Pay section of your channel settings, click the down arrow to show the action menu and click Verify Domain.
- In the window that appears, copy the domain provided and save it to your notes. You will need this domain later in the setup process, when you create a payment messaging component.
- In a new browser tab, go to developer.apple.com.
- Click Identifiers.
- Click App IDs in the top right, and select Merchant IDs.
- Click your merchant ID.
- Under Merchant Domains, click Add Domain.
- Paste the domain name that you copied earlier from Salesforce.
- Click Save, and then click Download to download the .txt verification file. Leave your browser tab open.
- Back in your Salesforce browser tab, click Upload Files and upload the file from Apple. Then, click Done.
- Return to your Apple browser tab, and click Verify.
- Click View Identifier at the top of the page to return to your merchant ID page. Under Merchant Domains, you can now see the newly added domain, as well as its expiration date.
Create an Apex Class to Process Payments
On the Apex Classes page in Setup, create an Apex class to facilitate payment processing.
When a customer makes a requested payment, this Apex class sends a payment token to the payment provider (Apple Pay) so the payment can be processed.
For details and an example, see ProcessPaymentHandler Interface.
Create a Payment Messaging Component, Apex Classes, and Flow
Now that the preparation is complete, create a payment messaging component and accompanying flow.
Service reps run the flow in the Service Console to send the component to customers. Customers click the component to view the request details and make their payment. Add a series of Apex classes to control the information that appears in the component.
- Create a payment messaging component that service reps can send in messaging sessions. See Create and Send Payment Requests in Messaging Sessions.
- Add a series of payment-related Apex classes, create a flow, and use it to request payments from customers. See Set Up a Flow to Send Payment Requests in Messaging Sessions.



