Apple Pay
  • 11 Jun 2024
  • 2 Minutes to read
  • Contributors
  • Dark
    Light
  • PDF

Apple Pay

  • Dark
    Light
  • PDF

Article summary

Overview

With Apple Pay, clients can pay for your goods and services without having to go to any external sites or fill in the card data.

Apple pay

Apple Pay_2

For more information on Apple Pay, go to the official documentation of Apple Messages for Business: Apple Pay Message.

Example

Below, you can see the applePay task reference in the Attachments State Diagram.

{
   "abc": {
       "type": "apple_pay_request",
       "apple_pay_request": {
           "receivedMessage": {
               "title": "{{title}}",
               "subtitle": "{{subtitle}}",
               "style": "icon"
           },
           "payment": {
               "paymentRequest": {
                   "lineItems": [
                       {
                           "label": "Item 1",
                           "amount": "0.01",
                           "type": "final"
                       },
                       {
                           "label": "Item 2",
                           "amount": "0.01",
                           "type": "final"
                       }
                   ],
                   "total": {
                       "label": "Your Total",
                       "amount": "0.02",
                       "type": "final"
                   },
                   "applePay": {
                       "merchantIdentifier": "{{merchantIdentifier}}",
                       "supportedNetworks": [
                           "amex",
                           "visa",
                           "discover",
                           "masterCard",
                           "chinaUnionPay",
                           "interac",
                           "privateLabel"
                       ],
                       "merchantCapabilities": [
                           "supportsDebit",
                           "supportsCredit", 
                           "supportsEMV", 
                           "supports3DS"            
                       ]
                   },
                   "merchantName": "{{merchantName}}",
                   "countryCode": "US", 
                   "currencyCode": "USD", 
                   "requiredBillingContactFields": [
                       "postalAddress"
                   ],
                   "requiredShippingContactFields": [
                       "postalAddress",
                       "name",
                       "phoneticName",
                       "phone",
                       "email"
                    ]
               },
               "endpoints": {
                   "paymentGatewayUrl": "https://botplatform.corezoid.com/paymentGateway" 
               }
           }
       }  
   }
}

Parameters

ParameterTypeRequiredDescription
typestring+A type of an object to send.
apple_pay_requestobject+An object in which request parameters are described.
apple_pay_request.paymentobject+An object in which invoice parameters are described.
apple_pay_request.payment.paymentRequestobject+An object in which invoice parameters are described.
apple_pay_request.paymentRequest.lineItemsarray+A list of goods or services, from where an invoice is formed.
apple_pay_request.paymentRequest.lineItems[].labelstring+A brief product or service description.
apple_pay_request.paymentRequest.lineItems[].amountstring+Product or service amount.
apple_pay_request.paymentRequest.lineItems[].typestringIndicates whether an order is final or if funds need to be frozen. Available values: "final" / "pending".
apple_pay_request.paymentRequest.totalobject+An object that contains total payment amount.
apple_pay_request.paymentRequest.total.typestringA value that indicates whether the item is final or pending.
apple_pay_request.paymentRequest.total.amountstring+Total payment amount.
apple_pay_request.paymentRequest.total.labelstring+A brief invoice description.
apple_pay_request.paymentRequest.applePayobject+An object in where an Apple Pay configuration is described.
apple_pay_request.paymentRequest.applePay.merchantIdentifierstring+A merchant ID that has been indicated during the registration in Apple Messages for Business.
apple_pay_request.paymentRequest.applePay.supportedNetworksarray+A list of supported payment Networks through which payment will occur. Available values: "amex", "visa", "discover", "masterCard", "chinaUnionPay", "interac", and "privateLabel".
apple_pay_request.paymentRequest.applePay.merchantCapabilitiesarray+Possible payment methods. Available values: "supportsDebit", "supportsCredit", "supportsEMV", "supports3DS".
apple_pay_request.paymentRequest.merchantNamestring+Your merchant name.
apple_pay_request.paymentRequest.countryCodestring+A merchant country code in the ISO 3166 format.
apple_pay_request.paymentRequest.currencyCodestring+An invoice currency code in the ISO 4217 format.
apple_pay_request.paymentRequest.requiredBillingContactFieldsarrayA client’s payment data list required for the invoice payment. An available value is "postalAddress". If the value is empty, the information isn’t requested.
apple_pay_request.paymentRequest.requiredShippingContactFieldsarrayA client’s contact details list required for the invoice payment. Available values: "postalAddress", "name", "phoneticName", "phone", "email".
apple_pay_request.payment.endpointsobject+An object in where payment processing information is described.
apple_pay_request.payment.endpoints.paymentGatewayUrlstring+A URL for processing payment through a payment provider. It should always be indicated: "https://botplatform.corezoid.com/paymentGateway".

Communications Orchestrator supports a dynamic invoice formation for Apple Pay. To manage it, use a task with the Reference: invoice from the Attachments State Diagram as an instance and customize it according to your needs. Example:


"items": [
   {
       "title": "...",
       "quantity": "...",
       "total": "..."
   },
   {
       "title": "...",
       "quantity": "...",
       "total": "..."
   }
]

Was this article helpful?