# MD for: https://www.mercadopago.com.ar/developers/es/docs/apple-pay/obtain-apple-developer-certificates.md \# Obtain Apple Developer certificates To start offering fast and secure payments with Apple Pay, some configurations are required to validate the identity of the site and the seller, and thus allow transactions while ensuring the security of payment data. Select the platform type below and follow the instructions according to your integration type. :::::TabsComponent ::::TabComponent{title="Integration for websites"} :::AccordionComponent{title="Verify the domain" pill="1"} To be able to use Apple Pay as a payment method, you must register and verify your domain in the \[Apple Developer Portal\](https://developer.apple.com/account/). To do so, follow the steps below. 1\. In the \[Apple Developer Portal\](https://developer.apple.com/account/), go to \*\*"Certificates > Identifiers & Profiles"\*\*, add your domain, and save. 2\. Download the generated \`.txt\` file. Note that each time you click the download button in the panel, a new file is downloaded and the previous one is invalidated. 3\. Upload this file to your server in a hidden folder called \`.well-known\`. 4\. In the Portal, click the \*\*Verify\*\* button to verify the file. 5\. Confirm that when accessing "https://your-domain/.well-known/apple-developer-merchantid-domain-association.txt", the content of the verification file is displayed. ::: :::AccordionComponent{title="Configure Merchant Identity Certificate" pill="2"} To be able to use Apple Pay as a payment method, you must include the certificate that will be used to prove you are an authorized seller, ensuring that your application is a \_merchant\_ with authorization to request payments via Apple Pay. To do so, follow the steps below. 1\. Send a \*\*POST\*\* with your :toolTipComponent\[test Access Token\]{content="Private key of the application created in Mercado Pago, used in the backend. You can access it in \*Your integrations > Application details > Test > Test credentials\*."} to the Mercado Pago :TagComponent{tag="API" text="certificates/csr/generate" href="https://api.mercadopago.com/certificates/csr/generate"} endpoint to generate the certificate. \`\`\`curl curl --location 'https://api.mercadopago.com/certificates/csr/generate' \\ --header 'Content-Type: application/json' \\ --header 'Authorization: Bearer YOUR\_ACCESS\_TOKEN' \\ --data '{ "type": "merchant", "flow": "apple\_pay", "merchantIdentifier": \[value\], "organization": "MyOrg", "country": "BR" }' \`\`\` | Parameter | Description | | --- | --- | | \`type\` | Certificate type. For this step, it must be \`"merchant"\`. Save the \`certificate\_id\` for the following steps. | | \`flow\` | Fixed value \`apple\_pay\`. | | \`merchantIdentifier\` | Unique identifier of your business in Apple Pay. Must match the Merchant ID configured in Apple. | | \`organization\` | Your organization name. | | \`country\` | Country code, for example \`BR\`. | 2\. The API will return a response with the values \`certificate\_id\` and \`certificate\`. Decode the \`certificate\` field (in \_Base64\_ format) and save it in a \`.pem\` file. 3\. In the \[Apple Developer Portal\](https://developer.apple.com/account/), go to \*\*Certificates, Identifiers & Profiles > Identifiers\*\*, select your Merchant ID, and in the \*\*Apple Pay Merchant Identity Certificate\*\* section, click \*\*Create Certificate\*\* and upload the generated \`.pem\` file. 4\. Then, download the signed certificate. 5\. Finally, send a \*\*POST\*\* with your :toolTipComponent\[test Access Token\]{content="Private key of the application created in Mercado Pago, used in the backend. You can access it in \*Your integrations > Application details > Test > Test credentials\*."} to the Mercado Pago :TagComponent{tag="API" text="certificates/certificate/upload" href="https://api.mercadopago.com/certificates/certificate/upload"} endpoint to add the signed certificate. \`\`\`curl curl --location 'https://api.mercadopago.com/certificates/certificate/upload' \\ --header 'Authorization: Bearer YOUR\_ACCESS\_TOKEN' \\ --form 'certificate=@"/User/Downloads/apple\_pay.cer"' \`\`\` | Element | Description | | --- | --- | | \`Authorization\` | \_Header\_ with your :toolTipComponent\[test Access Token\]{content="Private key of the application created in Mercado Pago, used in the backend. You can access it in \*Your integrations > Application details > Test > Test credentials\*."}. | | \`certificate\` | Certificate file generated and signed in Apple. | 6\. Once the process is complete, you will need to perform the \[domain verification in Apple\](https://www.mercadopago.com.ar/developers/en/docs/apple-pay/obtain-apple-developer-certificates#bookmark\_verify\_the\_domain) again. ::: :::AccordionComponent{title="Configure Payment Processing Certificate" pill="3"} To be able to use Apple Pay as a payment method, you must include the certificate that will be used to decrypt payment data, securely interpreting the \_payload\_ used in the payment. To do so, follow the steps below. 1\. Make a request to the Mercado Pago :TagComponent{tag="API" text="certificates/csr/generate" href="https://api.mercadopago.com/certificates/csr/generate"} endpoint to generate the certificate. \`\`\`curl curl --location 'https://api.mercadopago.com/certificates/csr/generate' \\ --header 'Content-Type: application/json' \\ --header 'Authorization: Bearer YOUR\_ACCESS\_TOKEN' \\ --data '{ "type": "payment", "flow": "apple\_pay", "merchantIdentifier": \[value\], "organization": "MyOrg", "country": "BR" }' \`\`\` | Parameter | Description | | --- | --- | | \`type\` | Certificate type. For this step, it must be \`"payment"\`. Save the \`certificate\_id\` for the following steps. | | \`flow\` | Fixed value \`apple\_pay\`. | | \`merchantIdentifier\` | Unique identifier of your business in Apple Pay. Must match the Merchant ID configured in Apple. | | \`organization\` | Your organization name. | | \`country\` | Country code, for example \`BR\`. | 2\. The API will return a response with the values \`certificate\_id\` and \`certificate\`. Decode the \`certificate\` field (in \_Base64\_ format) and save it in a \`.pem\` file. 3\. In the \[Apple Developer Portal\](https://developer.apple.com/account/), go to \*\*Certificates, Identifiers & Profiles > Identifiers\*\*, select your Merchant ID, and in the \*\*Apple Pay Payment Processing Certificate\*\* section, click \*\*Create Certificate\*\* and upload the generated \`.pem\` file. 4\. Then, download the signed certificate. 5\. Finally, send a \*\*POST\*\* with your :toolTipComponent\[test Access Token\]{content="Private key of the application created in Mercado Pago, used in the backend. You can access it in \*Your integrations > Application details > Test > Test credentials\*."} to the Mercado Pago :TagComponent{tag="API" text="certificates/certificate/upload" href="https://api.mercadopago.com/certificates/certificate/upload"} endpoint to add the signed certificate. \`\`\`curl curl --location 'https://api.mercadopago.com/certificates/certificate/upload' \\ --header 'Authorization: Bearer YOUR\_ACCESS\_TOKEN' \\ --form 'certificate=@"/User/Downloads/apple\_pay.cer"' \`\`\` | Element | Description | | --- | --- | | \`Authorization\` | \_Header\_ with your :toolTipComponent\[test Access Token\]{content="Private key of the application created in Mercado Pago, used in the backend. You can access it in \*Your integrations > Application details > Test > Test credentials\*."}. | | \`certificate\` | Certificate file generated and signed in Apple. | 6\. Once the process is complete, you will need to perform the \[domain verification in Apple\](https://www.mercadopago.com.ar/developers/en/docs/apple-pay/obtain-apple-developer-certificates#bookmark\_verify\_the\_domain) again. With this, your development environment is ready to continue with the specific configurations to offer Apple Pay. ::: :::: ::::TabComponent{title="Integration for mobile apps"} To be able to use Apple Pay as a payment method, you must include the certificate that will be used to decrypt payment data, securely interpreting the \_payload\_ used in the payment. To do so, follow the steps below. 1\. Make a request to the Mercado Pago :TagComponent{tag="API" text="certificates/csr/generate" href="https://api.mercadopago.com/certificates/csr/generate"} endpoint to generate the certificate. \`\`\`curl curl --location 'https://api.mercadopago.com/certificates/csr/generate' \\ --header 'Content-Type: application/json' \\ --header 'Authorization: Bearer YOUR\_ACCESS\_TOKEN' \\ --data '{ "type": "payment", "flow": "apple\_pay", "merchantIdentifier": \[value\], "organization": "MyOrg", "country": "BR" }' \`\`\` | Parameter | Description | | --- | --- | | \`type\` | Certificate type. For this step, it must be \`"payment"\`. Save the \`certificate\_id\` for the following steps. | | \`flow\` | Fixed value \`apple\_pay\`. | | \`merchantIdentifier\` | Unique identifier of your business in Apple Pay. Must match the Merchant ID configured in Apple. | | \`organization\` | Your organization name. | | \`country\` | Country code, for example \`BR\`. | 2\. The API will return a response with the values \`certificate\_id\` and \`certificate\`. Decode the \`certificate\` field (in \_Base64\_ format) and save it in a \`.pem\` file. 3\. In the \[Apple Developer Portal\](https://developer.apple.com/account/), go to \*\*Certificates, Identifiers & Profiles > Identifiers\*\*, select your Merchant ID, and in the \*\*Apple Pay Payment Processing Certificate\*\* section, click \*\*Create Certificate\*\* and upload the generated \`.pem\` file. 4\. Then, download the signed certificate. 5\. Finally, send a \*\*POST\*\* with your :toolTipComponent\[test Access Token\]{content="Private key of the application created in Mercado Pago, used in the backend. You can access it in \*Your integrations > Application details > Test > Test credentials\*."} to the Mercado Pago :TagComponent{tag="API" text="certificates/certificate/upload" href="https://api.mercadopago.com/certificates/certificate/upload"} endpoint to add the signed certificate. \`\`\`curl curl --location 'https://api.mercadopago.com/certificates/certificate/upload' \\ --header 'Authorization: Bearer YOUR\_ACCESS\_TOKEN' \\ --form 'certificate=@"/User/Downloads/apple\_pay.cer"' \`\`\` | Element | Description | | --- | --- | | \`Authorization\` | \_Header\_ with your :toolTipComponent\[test Access Token\]{content="Private key of the application created in Mercado Pago, used in the backend. You can access it in \*Your integrations > Application details > Test > Test credentials\*."}. | | \`certificate\` | Certificate file generated and signed in Apple. | With this, your development environment is ready to continue with the specific configurations to offer Apple Pay. :::: :::::