---
title: "Create Certificate"
method: POST
path: "/apple-pay/certificates"
tags: ["Apple Pay Certificate"]
---

# Create Certificate

`POST /apple-pay/certificates`

Creates a new Apple Pay certificate by generating a Certificate Signing Request (CSR).

Use this endpoint to start the certificate creation process for accepting Apple Pay in your iOS app.

## Setup workflow

1. **Call this endpoint** to generate a CSR. The response includes the `csr` field in base64 format.

2. **Decode the CSR** and save it as a `.certSigningRequest` file:

   ```bash
   echo "CSR_VALUE" | base64 -d > apple_pay.certSigningRequest
   ```

3. **Go to [Apple Developer Portal](https://developer.apple.com/account/resources/certificates/list)**:
   - Navigate to Certificates, Identifiers & Profiles
   - Select your Merchant ID under Identifiers
   - In the "Apple Pay Payment Processing Certificate" section, click "Create Certificate"
   - Upload the `.certSigningRequest` file from step 2
   - Download the signed certificate (`.cer` file)

4. **Convert the certificate to base64**:

   ```bash
   base64 -i apple_pay.cer
   ```

5. **Activate the certificate** using the [Activate Certificate](https://docs.monei.com/apis/rest/apple-pay-certificates-activate/) endpoint with the base64 value.

## Important notes

- **CSRs expire after 24 hours.** Complete the certificate creation in Apple Developer Portal within this window, or generate a new CSR.
- Each CSR can only be used once. If you need a new certificate, create a new CSR.
- The private key is securely generated and stored by MONEI. You never need to handle private keys directly.
- You must be enrolled in the [Apple Developer Program](https://developer.apple.com/programs/) to create certificates.
- The CSR is cleared from the response after the certificate is activated.

## Response `200`

A certificate object

- ApplePayCertificate — An Apple Pay certificate for iOS app integration.
  - `id` string, required — Unique identifier of the certificate.
  - `accountId` string, required — The account ID this certificate belongs to.
  - `csr` string — The Certificate Signing Request in base64 format. Only present before activation. Use this to create a certificate in Apple Developer Portal.
  - `cert` string — The certificate body in base64 format. Only present after activation.
  - `active` boolean, required — Whether the certificate is active for payment processing.
  - `expireAt` string, date-time — The certificate expiration date in ISO 8601 format. Only present after activation.
  - `createdAt` string, date-time, required — The certificate creation date in ISO 8601 format.

## Other responses

- `400` — The request is incorrect or could not be processed
- `401` — Unauthorized error. Please check your auth credentials
- `500` — Unexpected server error
- `503` — The service is temporarily unavailable

---

[API](https://skmtc.net/monei/apis/monei-api-v1.md) · [All operations](https://skmtc.net/monei/apis/monei-api-v1/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/monei/monei-api-v1/revisions/23554d4fb9e5/schema)
