ApplePay

The ApplePay Payment Method.

Requests a payment nonce for a payment card stored in an Apple Pay digital wallet.

Methods

JS
JavaScript

// Create a request to pay 1.00 USD

const paymentRequest = payments.paymentRequest({

  total: {

    amount: 100,

    currencyCode: 'USD'

  }

});



// Get a new Apple Pay method

const applePay = await payments.applePay(paymentRequest);



const applePayButtonTarget = document.getElementById('applePay');

applePayButtonTarget.onclick = async () => {

  //Start the Apple Pay flow and await the secure token result

  const tokenResult = await applePay.tokenize();



  // Pass the TokenResult to your server to complete the payment

}