Connect Apple Pay to a Messages purchase
Define the merchant, payment processor and order integration needed to complete an Apple Pay purchase in a Messages conversation.
Prerequisites
You need the merchant’s Apple Pay configuration, supported payment processing integration, order system and authorized test environment. Use test payment facilities for evaluation.
1. Connect the merchant configuration
Prepare the merchant identity, certificates, supported networks, payment capabilities and required endpoints for the integration. Keep secrets in the normal credential mechanism and configure only supported callbacks. Apple’s Apple Pay integration instructions define the merchant-session and payment flow. Use the provider setup explanation to check certificate, session and gateway responsibilities.
2. Prepare the customer’s order
Retrieve the actual item, quantity, tax, shipping and payable amount from the commerce system. Use the published currency and amount. Explain what the customer is purchasing before opening the payment interaction.
3. Handle customer authorization
Use the supported Apple Pay experience and process the resulting payment information through the merchant gateway. Customer authorization and successful processing are distinct stages.
4. Confirm the actual outcome
Read the payment and order result. Send a confirmation that reflects the recorded transaction, order reference and next step. If payment fails or remains uncertain, explain how the customer can continue.
5. Test recovery and alternatives
Exercise refusal, cancellation, unavailable device support and a lost processor response. Reconcile the original payment before retrying. Use a supported checkout alternative when needed.
Verify the order and payment together
Use your payment processor’s approved test environment and an authorized Apple Messages test experience. Prepare an order using the commerce system’s amount and currency, complete the native review and inspect the processor result. Confirm that the recorded order and the customer reply refer to the same purchase.
| Test case | Action | Expected result |
|---|---|---|
| The customer cancels payment authorization | Leave the order in its appropriate unpaid state and offer a continuation. | No purchase confirmation is sent. |
| The processor result is pending or the response is lost | Look up the existing payment attempt using your processor’s supported recovery path. | The application resolves the original attempt before another charge is considered. |
| A paid order needs a refund | Use the payment system’s refund operation and record its result against the order. | The service reply explains the recorded refund status. |
Troubleshooting
If the payment sheet fails, inspect merchant configuration and optional callback setup. If the customer authorized but no order is confirmed, inspect the gateway and order records before charging again. The message channel does not settle the transaction.
Next steps
- Explore the related Apple Messages capability.
- Find Apple Messages guides and answers.
- Prepare your first complete conversation.
Related resources
Continue with the documentation, guides and examples for this topic. Resources are in English.
Understand the conceptWhat is Apple Messages for Business?Explore the capabilityApple Messages for BusinessImplementation guideIntegrate an Apple Messages customer journey
Get an implementation brief