REST API services for Apple Pay on the Web
Mod Pack 4 contains updates to the backend payment system and WebSphere Commerce REST API to ensure that Apple Pay on the Web works correctly.
REST service name | Description | REST service |
---|---|---|
Create Apple Pay order | If a shopper clicks the apple pay button from product display page, the create apple pay
order creates a new pending order for this shopper. The apple pay order can be created by using the
existing order service and by passing the parameter as orderId=** . |
POST store/{storeId}/cart/@self |
Prepare Apple Pay order | The prepare Apple Pay order service is called before rendering the payment sheet. | PUT store/{storeId}/cart/@self/precheckout |
Add unbound payment instruction | This service is called if payment type promotion is supported. | POST store/{storeId}/cart/@self/payment_instruction |
Get Order information | Get order service is called after ApplePayPrepare . It retrieves the data
that is provided to payment sheet, including the order and order items details, such as the order
total, discount, shipping, tax,. Get order service retrieves the available shipping addresses and
shipping methods. For each shipping method, it gets the shipping charge for each shipping
method. |
|
Get merchant information | Get the merchant configuration information, such as the merchant identifier, country code, display name, supported networks and merchant capabilities. | GET store/{storeId}/merchant |
Merchant validation | Merchant validation is required for every Apple Pay on the Web session. It is used to ensure that your site is secure and available for Apple Pay. It first gets the merchant validation URL from Safari, then gets the merchant session from Apple Pay's server in the backend, and passes the merchant session object to ApplePayJS. | POST store/{storeId}/merchant/validate |
Update Apple Pay Order | Apple Pay order update service is called by onshippingcontactselected event
or onshippingmethodselected event, which is when shopper update the shipping
address, contact or shipping method. The apple pay order item's addressId or
shimodeId is updated in the service. This service is implemented by the
ApplePayOrderUpdateCmd command. |
PUT: store/{storeId}/cart/@self/applepay_update |
Process Apple Pay Order | The Apple Pay order process service is called by onpaymentauthorized
callback function. This service is implemented by the ApplePayOrderProcessCmd
command, which includes the following logic:
|
POST: store/{storeId}/cart/@self/applepay_process |
Cancel Apple Pay order | The Cancel Apple Pay order service is called by the oncancel callback
function. This service is implemented by the ApplePayOrderCancelCmd command, which
includes the following logic:If the Apple Pay request is sent from the product details page:
If the Apple Pay request is sent from the shopping cart or mini shop cart page:
|
POST: store/{storeId}/cart/@self/applepay_cancel |