> ## Documentation Index
> Fetch the complete documentation index at: https://docs.malga.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Configuração de certificados

Para conseguir transacionar com Apple Pay é necessário ter uma conta de desenvolvedor do Apple, caso não tenha, acesse o [Apple Developer](https://developer.apple.com/account/resources/) e crie uma conta.

## Criando um Merchant Identifier na Apple

Um Merchant identifica você como um comerciante que pode aceitar pagamentos de Apple Pay. Para criar um Merchant, você precisa de um Apple Developer Account, acessar sua conta e seguir os passos abaixo:

1. Na seção "Certificates, Identifiers & Profiles", selecione "Identifiers" e clique em "Register an App ID":<img src="https://mintcdn.com/malga/irqyGqIoiWFdcZsU/assets/images/payment-methods/apple-pay/merchant-1.png?fit=max&auto=format&n=irqyGqIoiWFdcZsU&q=85&s=bd82f1a8b55e564752ae90cb6e31139e" alt="Apple Developer Account" width="1366" height="465" data-path="assets/images/payment-methods/apple-pay/merchant-1.png" />

2. Selecione a opção "Merchant IDs":<img src="https://mintcdn.com/malga/irqyGqIoiWFdcZsU/assets/images/payment-methods/apple-pay/merchant-2.png?fit=max&auto=format&n=irqyGqIoiWFdcZsU&q=85&s=826e2f17815dd600deb5ac7972061c41" alt="Apple Developer Account" width="1366" height="1133" data-path="assets/images/payment-methods/apple-pay/merchant-2.png" />

3. Preencha os campos "Description" e "Identifier":<img src="https://mintcdn.com/malga/irqyGqIoiWFdcZsU/assets/images/payment-methods/apple-pay/merchant-3.png?fit=max&auto=format&n=irqyGqIoiWFdcZsU&q=85&s=d2e8a5f93c41e9a51a31933ab9e55a0c" alt="Apple Developer Account" width="1366" height="388" data-path="assets/images/payment-methods/apple-pay/merchant-3.png" />

4. Finalize clicando em "Continue" e depois "Register".

## Criando um certificado de processamento de pagamento

Um certificado de processamento de pagamento é associado ao seu identificador e usado para criptografar as informações de pagamento. O certificado expira a cada 25 meses, quando revogado, você poderá gerar um novo certificado.

Para criar um certificado, você precisará de um certificado ".CSR", [que pode ser gerado na sua máquina](https://developer.apple.com/help/account/create-certificates/create-a-certificate-signing-request).

Com o ".CSR" em mãos:

1. Na seção "Certificates, Identifiers & Profiles", selecione "Identifiers";

2. Utilizando o filtro "App IDs", selecione "Merchant IDs":<img src="https://mintcdn.com/malga/irqyGqIoiWFdcZsU/assets/images/payment-methods/apple-pay/payment-1.png?fit=max&auto=format&n=irqyGqIoiWFdcZsU&q=85&s=0933ebad14baba3933e0591e16f2d0dc" alt="Apple Developer Account" width="1366" height="547" data-path="assets/images/payment-methods/apple-pay/payment-1.png" />

3. Selecione o identifier criado anteriormente:<img src="https://mintcdn.com/malga/irqyGqIoiWFdcZsU/assets/images/payment-methods/apple-pay/payment-2.png?fit=max&auto=format&n=irqyGqIoiWFdcZsU&q=85&s=f4531093dafcc304a88c45206d4cb1d7" alt="Apple Developer Account" width="1366" height="395" data-path="assets/images/payment-methods/apple-pay/payment-2.png" />

4. Na seção "Apple Pay Payment Processing Certificate", clique no botão "Create Certificate":<img src="https://mintcdn.com/malga/irqyGqIoiWFdcZsU/assets/images/payment-methods/apple-pay/payment-3.png?fit=max&auto=format&n=irqyGqIoiWFdcZsU&q=85&s=26a7c2901bc0ae6e18b9c1ce627a39cd" alt="Apple Developer Account" width="1366" height="1069" data-path="assets/images/payment-methods/apple-pay/payment-3.png" />

5. Escolha a opção "No" em "Edit or Configure Merchant ID":<img src="https://mintcdn.com/malga/irqyGqIoiWFdcZsU/assets/images/payment-methods/apple-pay/payment-4.png?fit=max&auto=format&n=irqyGqIoiWFdcZsU&q=85&s=30e1c94a0cea908fb1b943754891940f" alt="Apple Developer Account" width="1366" height="456" data-path="assets/images/payment-methods/apple-pay/payment-4.png" />

6. Em "Choose File", faça upload do certificado ".CSR" gerado anteriormente:<img src="https://mintcdn.com/malga/irqyGqIoiWFdcZsU/assets/images/payment-methods/apple-pay/payment-5.png?fit=max&auto=format&n=irqyGqIoiWFdcZsU&q=85&s=f419453d3d0c2180e2ad85fc37522c55" alt="Apple Developer Account" width="1366" height="511" data-path="assets/images/payment-methods/apple-pay/payment-5.png" />

7. Clique em "Continue" e depois em "Download" para baixar o certificado de pagamento:

<img src="https://mintcdn.com/malga/irqyGqIoiWFdcZsU/assets/images/payment-methods/apple-pay/payment-6.png?fit=max&auto=format&n=irqyGqIoiWFdcZsU&q=85&s=e7b2136dfa948bf70338556f4c0c7d63" alt="Apple Developer Account" width="1366" height="427" data-path="assets/images/payment-methods/apple-pay/payment-6.png" />

## Registro de domínio

Caso você ofereça o Apple Pay através do seu site, será necessário registrar o domínio do site na Apple para que possa receber pagamentos.

1. Na seção "Certificates, Identifiers & Profiles", selecione "Identifiers" e filtre no "App IDs" por "Merchant IDs":<img src="https://mintcdn.com/malga/irqyGqIoiWFdcZsU/assets/images/payment-methods/apple-pay/domain-1.png?fit=max&auto=format&n=irqyGqIoiWFdcZsU&q=85&s=0e130543723ab448671d5eb8b0cbc9e1" alt="Apple Developer Account" width="1366" height="547" data-path="assets/images/payment-methods/apple-pay/domain-1.png" />

2. Selecione o identificador do seu merchant:<img src="https://mintcdn.com/malga/irqyGqIoiWFdcZsU/assets/images/payment-methods/apple-pay/domain-2.png?fit=max&auto=format&n=irqyGqIoiWFdcZsU&q=85&s=7af5851a3d1d633fcd354370439743bc" alt="Apple Developer Account" width="1366" height="395" data-path="assets/images/payment-methods/apple-pay/domain-2.png" />

3. Em "Merchant Domains", clique em "Add Domain":<img src="https://mintcdn.com/malga/irqyGqIoiWFdcZsU/assets/images/payment-methods/apple-pay/domain-3.png?fit=max&auto=format&n=irqyGqIoiWFdcZsU&q=85&s=18ad6c2aee8beecec1abce971282558e" alt="Apple Developer Account" width="1366" height="1078" data-path="assets/images/payment-methods/apple-pay/domain-3.png" />

4. Preencha o domínio e clique em "Save":<img src="https://mintcdn.com/malga/irqyGqIoiWFdcZsU/assets/images/payment-methods/apple-pay/domain-4.png?fit=max&auto=format&n=irqyGqIoiWFdcZsU&q=85&s=3a6b615873c43b2cb63c3ccd9fa204ad" alt="Apple Developer Account" width="1366" height="406" data-path="assets/images/payment-methods/apple-pay/domain-4.png" />

5. Clique em "Download" para baixar o arquivo de verificação;

6. Disponibilize o arquivo seguindo as próprias instruções da Apple;

7. Após disponibilizar, clique em "Verify":<img src="https://mintcdn.com/malga/irqyGqIoiWFdcZsU/assets/images/payment-methods/apple-pay/domain-5.png?fit=max&auto=format&n=irqyGqIoiWFdcZsU&q=85&s=cda838bab51a8e81281c6500ad68a504" alt="Apple Developer Account" width="1366" height="406" data-path="assets/images/payment-methods/apple-pay/domain-5.png" />

## Criando um certificado de identidade do Merchant

1. Na seção "Certificates, Identifiers & Profiles", selecione "Identifiers" e filtre no "App IDs" por "Merchant IDs":<img src="https://mintcdn.com/malga/irqyGqIoiWFdcZsU/assets/images/payment-methods/apple-pay/merchant-id-1.png?fit=max&auto=format&n=irqyGqIoiWFdcZsU&q=85&s=00fb65ad8611292a09e0a986a400ff65" alt="Apple Developer Account" width="1366" height="547" data-path="assets/images/payment-methods/apple-pay/merchant-id-1.png" />

2. Selecione o identificador do seu merchant:<img src="https://mintcdn.com/malga/irqyGqIoiWFdcZsU/assets/images/payment-methods/apple-pay/merchant-id-2.png?fit=max&auto=format&n=irqyGqIoiWFdcZsU&q=85&s=298359ada0608c3a17cfd1e12f5502df" alt="Apple Developer Account" width="1366" height="395" data-path="assets/images/payment-methods/apple-pay/merchant-id-2.png" />

3. Em "Apple Pay Merchant Identity Certificate", clique em "Create Certificate":<img src="https://mintcdn.com/malga/irqyGqIoiWFdcZsU/assets/images/payment-methods/apple-pay/merchant-id-3.png?fit=max&auto=format&n=irqyGqIoiWFdcZsU&q=85&s=20c35731dcf3abd383a22172484d2053" alt="Apple Developer Account" width="1366" height="1078" data-path="assets/images/payment-methods/apple-pay/merchant-id-3.png" />

4. Em "Choose File", faça upload do certificado ".CSR" gerado e clique em "Continue":<img src="https://mintcdn.com/malga/irqyGqIoiWFdcZsU/assets/images/payment-methods/apple-pay/merchant-id-4.png?fit=max&auto=format&n=irqyGqIoiWFdcZsU&q=85&s=9952548e98829ec6a36a000878688bfc" alt="Apple Developer Account" width="1366" height="1078" data-path="assets/images/payment-methods/apple-pay/merchant-id-4.png" />

5. Baixe o certificado de identificação do merchant gerado em "Download":<img src="https://mintcdn.com/malga/irqyGqIoiWFdcZsU/assets/images/payment-methods/apple-pay/merchant-id-5.png?fit=max&auto=format&n=irqyGqIoiWFdcZsU&q=85&s=7de8b38b2fcb3bdfdfe56516c8f5cb42" alt="Apple Developer Account" width="1366" height="509" data-path="assets/images/payment-methods/apple-pay/merchant-id-5.png" />
