# Apple Pay

**Allow customers to securely make payments using Apple Pay on their iPhone, iPad, or Mac**

Wooshpay users can accept Apple Pay on the web in Safari starting with iOS 10 and later, and macOS 10.12 and later.

Apple Pay is available to cardholders at participating banks in supported countries. Refer to Apple’s participating banks documentation to learn which banks and countries are supported.

## Payment Flow

**Desktop:**

![Group 5089.png](https://api.apifox.cn/api/v1/projects/1296482/resources/408465/image-preview)

**Mobile:**

![Group 5086.png](https://api.apifox.cn/api/v1/projects/1296482/resources/408466/image-preview)

## **How to integration**

For now, you can accept Apple Pay payments on the Web using Checkout. No additional passing parameter is required to use Apple Pay in Checkout. You can contact our supporters（support@wooshpay.com） to configure Apple Pay as a payment method.

After enabling Apple Pay, the checkout will automatically display the Apple Pay option based on the user's device compatibility. 
### [Create a Session](api-42654181)

***Request*** 

```JSON
{
    "mode": "payment",
    "success_url": "https://wooshpay.com/",
    "line_items": [
        {
            "price_data": {
                "currency": "USD",
                "unit_amount": 1,
                "nickname": "apple",
                "product_data": {
                    "name": "apple",
                    "description": "yummy yummy"
                },
                "billing_scheme": "testscheme",
                "lookup_key": "test_lookup_key"
            },
            "quantity": 1
        }
    ]
}
```

***Response***

```JSON
{
    "id": "cs_1724722806920314880",
    "object": "checkout.session",
    "created": 1700040936000,
    "livemode": false,
    "currency": "USD",
    "customer": "",
    "mode": "payment",
    "status": "open",
    "url": "https://checkouttest.wooshpay.com/pay/cs_test_1724722806920314880?key=cGtfdGVzdF9OVEUxT0RRME5EUTBNelEzTURZeU1EWTNNakF4T2tWc1JGSlBUbWxQUm1KNmNWTkxWemhTUzFsM1RVVmtZVEUyTmpZMU9UVTVOekF3TmpFPQ==",
    "line_items": {
        "object": "list",
        "data": [
            {
                "id": "li_1724722806941286400",
                "object": "item",
                "currency": "USD",
                "description": "apple",
                "price": {
                    "id": "price_1724722806949675008",
                    "object": "price",
                    "created": 1700040936000,
                    "livemode": false,
                    "active": false,
                    "currency": "USD",
                    "nickname": "apple",
                    "product": "prod_1724722806962257920",
                    "type": "one_time",
                    "unit_amount": 1,
                    "billing_scheme": "testscheme",
                    "lookup_key": "test_lookup_key"
                },
                "quantity": 1,
                "amount_subtotal": 1,
                "amount_total": 1
            }
        ]
    },
    "payment_intent": "pi_1724722813983522816",
    "payment_method_types": [
        "card",
        "applepay"
    ],
    "payment_status": "unpaid",
    "success_url": "https://wooshpay.com/",
    "amount_subtotal": 1,
    "amount_total": 1,
    "billing_address_collection": "auto",
    "expires_at": 1700127335630,
    "payment_link": "",
    "client_secret": "pi_1724722813983522816_secret_YunR45Qw03vOohWtJr26Twfh"
}
```

## **Next step**

You can add more features to your integration as needed

### [Create a Webhook](doc-2517709)

Listen to events on your WooshPay account so your integration can automatically trigger reactions. Create a webhook that mainly focuses on enabled_events and url.

### [Create a Refund](api-51369554)

Create a refund to repay funds to your customer. You can also perform partial refunds, but not every payment method supports them. A partial refund is when you refund only part of the original transaction amount.
