---
title: "Start transaction"
description: "You can use this call to start an existing Apple Pay transaction using the CM.com Online Payments API. This step generates a valid payment session by interacting with Apple Pay servers."
canonical: "https://docs.cm.com/payments/online-payments/guides/apple-pay/start-transaction"
---

# Start transaction

> You can use this call to start an existing Apple Pay transaction using the CM.com Online Payments API. This step generates a valid payment session by interacting with Apple Pay servers.

Source: https://docs.cm.com/payments/online-payments/guides/apple-pay/start-transaction

You can use this call to start an existing Apple Pay transaction using the CM.com Online Payments API. This step generates a valid payment session by interacting with Apple Pay servers.

## Prerequisite

Get an `access_token` and use it as 'Bearer' token in your request. Find more details [here](https://docs.cm.com/payments/online-payments/guides/authorization).

## Request

```text
POST https://api.pay.cm.com/api/v1/paymentmethods/apple-pay/v1/transactions/{transactionId}/start
```

```json
{
  "validationUrl": "https://apple-pay-gateway-cert.apple.com/paymentservices/startSession",
  "displayName": "My merchant commercial name",
  "domainName": "https://app-domain.tld"
}
```

## Parameters

| Parameter | Type | Description | Constraints |
| :- | :- | :- | :- |
| validationUrl | String | The validation URL that is generated by the Apple device. | |
| displayName | String | The name to display on the the payment sheet. You get this information from the initialize transaction endpoint. | |
| domainName | String | The domain of the website on which the payment will occur. The value must match the domain from which the request is started. If there is a mismatch between this field and the domain that the Apple device determined, then the Apple Pay session will be terminated by the Apple device (with a generic error message or nothing happens). | |

## Response

The response is an opaque merchant session object. You pass the merchant session object to your Apple Pay session’s completeMerchantValidation method (`session.completeMerchantValidation(merchantSession);`). You can use the merchant session object a single time. It expires five minutes after it is created.

```text
{
 "..." : "...",
}
```

## Response codes

| HTTP status | Description |
| :- | :- |
| 201 | Apple Pay merchant session successfully retrieved. |
| 4XX | Client error response (See message for details). This response is given when the User input was incorrect or something illegal was attempted (eg. using a service without having that service configured for the user, or not being authorized). |
| 5XX | Server error response (See message for details). |
