# MD for: https://www.mercadopago.com.mx/developers/pt/docs/checkout-api-orders/payment-integration/websites/cards.md \# Cards The integration of payments with credit and/or debit cards in Checkout API can be done in two ways. The \*\*recommended integration\*\* is through the \*\*Card Payment Brick\*\*, where the Brick takes care of retrieving the necessary information to process the payment. However, if you prefer to be responsible for determining how this information will be retrieved, you can perform your integration using \*\*Core Methods\*\*, available for websites. :::::TabsComponent ::::TabComponent{title="Card Payment"} In the integration through the Card Payment for websites, the \`MercadoPago.js\` library, included in your project during the \[configuration of the development environment\](https://www.mercadopago.com.mx/developers/en/docs/checkout-api-orders/development-environment), is responsible for obtaining the information required for processing a payment. This means it searches for the types of documents available for the corresponding country, and as the card data is entered, it also retrieves information related to the issuer and the available installments. All information involved in processing the transaction is stored in the backend, in compliance with \[PCI security\](https://www.mercadopago.com.mx/developers/en/docs/security/pci) standards. In addition, the component provides the ability to guide the user with alerts for incomplete fields or possible errors when filling out the data, optimizing the purchasing process. With this, the implementation of the flow is transparent for those who are performing the integration, as shown in the diagram below. sequenceDiagram participant Buyer's Browser participant Integrator Frontend participant MercadoPago.js participant Integrator Backend participant Mercado Pago API Buyer's Browser->>Integrator Frontend: 1. The buyer accesses the payment screen. Integrator Frontend->>MercadoPago.js: 2. The integrator's frontend downloads and initializes Mercado Pago's JS SDK. Integrator Frontend->>Buyer's Browser: 3. The integrator's frontend displays the payment form. Buyer's Browser->>Integrator Frontend: 4. The buyer completes the form and submits the payment. Integrator Frontend->>MercadoPago.js: 5. The integrator's frontend uses the JS SDK to create a token containing the card data securely. Integrator Frontend->>Integrator Backend: 6. The integrator's frontend sends the card token and payment data to its backend. Integrator Backend->>Mercado Pago API: 7. The backend calls Mercado Pago services to create the payment. Mercado Pago API->>Buyer's Browser: 8. The integrator's frontend shows the buyer the result of the transaction. Mercado Pago API->>Integrator Backend: 9. Mercado Pago may send notifications via Webhook with payment status updates. Integrator Backend->>Buyer's Browser: 10. If applicable, the buyer is notified about the payment update. To proceed with the setup of debit and/or credit card payments via Card Payment, follow the steps below. > NOTE > > Remember: before setting up the payment methods, choose the way you will process your transactions. The processing mode, whether \*\*manual or automatic\*\*, will be defined at the time of order creation, using the \`processing\_mode\` parameter. For more information, visit the section \[Integration model\](https://www.mercadopago.com.mx/developers/en/docs/checkout-api-orders/integration-model). :::AccordionComponent{title="Add payment form" pill="client-side"} To receive payments, you need to add a form in the frontend that allows for securely capturing the payer's information and enables card encryption. This inclusion should be done through the Card Payment, which offers an optimized form with various themes and includes the necessary fields for card payments. To add the Card Payment, first \*\*configure and initialize\*\* it from the frontend, as shown in the examples below. javascript javascript ``` const renderCardPaymentBrick = async (bricksBuilder) => { const settings = { initialization: { amount: 100.99, // total amount to be paid }, callbacks: { onReady: () => { /* Callback called when Brick is ready. Here you can hide loadings from your site, for example. */ }, onSubmit: (formData, additionalData) => { // callback called when clicking on the submit data button return new Promise((resolve, reject) => { const submitData = { type: "online", total_amount: String(formData.transaction_amount), // should be a string in the format 00.00 external_reference: "ext_ref_1234", // identifier of the transaction source processing_mode: "automatic", transactions: { payments: [ { amount: String(formData.transaction_amount), // should be a string in the format 00.00 payment_method: { id: formData.payment_method_id, type: additionalData.paymentTypeId, token: formData.token, installments: formData.installments, }, }, ], }, payer: { email: formData.payer.email, identification: formData.payer.identification, }, }; fetch("/process_order", { method: "POST", headers: { "Content-Type": "application/json", }, body: JSON.stringify(submitData), }) .then((response) => response.json()) .then((response) => { // receive payment result resolve(); }) .catch((error) => { // handle error response when trying to create payment reject(); }); }); }, onError: (error) => { // callback called for all Brick error cases console.error(error); }, }, }; window.cardPaymentBrickController = await bricksBuilder.create( "cardPayment", "cardPaymentBrick_container", settings ); }; renderCardPaymentBrick(bricksBuilder); ``` The \`onSubmit\` callback of the Brick will obtain the minimum necessary data for creating a payment. Among those minimal data, there is the \`CardToken\`, that safely represents the card data. This token can only be used once, and will expire within 7 days. In addition to the minimum data, we recommend collecting additional details or those that can facilitate the recognition of the purchase by the buyer, thus increasing the payment approval rate. Consult our :TagComponent{tag="API" text="API Reference" href="/developers/en/reference/online-payments/checkout-api/overview" color="accent"} for detailed information on all the parameters to be sent when creating a payment, including those that could improve your approval rate, and check which ones you want to include at this stage. Then, add the relevant fields to the object being sent, which are returned in the callback response. > WARNING > > Whenever the user leaves the screen where some Brick is displayed, it is necessary to destroy the current instance with the command \`window.cardPaymentBrickController.unmount()\`. When entering again, a new instance must be generated. Finally, \*\*render\*\* the Brick using one of the examples below. html html ```
// The ID must match the value sent in the create() method in the previous step ``` As a result, the rendering of the Brick will look similar to the image below. !\[cardform\](api-orders/card-form-mlm-en.png) To move on to the payment submission stage, your backend must be able to receive the information from the created form, along with the token resulting from the card encryption. For this, we recommend providing an endpoint /Process\_order that accommodates the data collected by the Brick after performing the submit action. > NOTE > > To configure the installments displayed on the frontend, see the \[Configure installments\](https://www.mercadopago.com.mx/developers/en/docs/checkout-api-orders/additional-settings/websites/behavior-customizations) section of the Card Payment. If you want to configure interest-free installments, please refer to the \[Support Center documentation\](https://www.mercadopago.com.mx/developers/es/support/mensualidades-sin-intereses\_2255). ::: :::AccordionComponent{title="Submit payment" pill="server-side"} The payment submission must be made by creating an order that contains associated payment transactions. To do this, send a request with your :toolTipComponent\[test Access Token\]{content="Private key of the application created in Mercado Pago, that must be used in the backend. You can access it through Your integrations > Integration data > Tests > Test credentials. The test Access Token starts with the prefix \`APP\_USR\`."} and the required parameters listed below to the endpoint :TagComponent{tag="POST" text="/v1/orders" href="/developers/en/reference/online-payments/checkout-api/create-order/post" color="green"}. \`\`\`curl curl -X POST \\ 'https://api.mercadopago.com/v1/orders'\\ -H 'Content-Type: application/json' \\ -H 'X-Idempotency-Key: {{SOME\_UNIQUE\_VALUE}}' \\ -H 'Authorization: Bearer {{YOUR\_ACCESS\_TOKEN}}' \\ -d '{ "type": "online", "processing\_mode": "automatic", "total\_amount": "50.00", "external\_reference": "ext\_ref\_1234", "payer": { "email": "test@testuser.com" }, "transactions": { "payments": \[ { "amount": "50.00", "payment\_method": { "id": "master", "type": "credit\_card", "token": "1223123", "installments": 1 } } \] } }' \`\`\` > NOTE > > Order creation is subject to request limits per client. If you receive a \`429 Too Many Requests\` error, wait the time indicated in the \`Retry-After\` response header before retrying. See \[Possible errors\](https://www.mercadopago.com.mx/developers/en/docs/checkout-api-orders/payment-management/integration-errors) for more details. See the table below for descriptions of the parameters that have some important particularity that should be highlighted. | Parameter | Type | Description | Requirement | |---------------------------------------------------|-----------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------| | \`Authorization\` | Header | Refers to your private key, the :toolTipComponent\[test Access Token\]{content="Private key of the application created in Mercado Pago, that must be used in the backend. You can access it through Your integrations > Integration data > Tests > Test credentials. The test Access Token starts with the prefix \`APP\_USR\`."}. | Required | | \`X-Idempotency-Key\` | Header | Idempotency key. It is used to ensure that each request is processed only once, avoiding duplications. Use a unique value in the header of your request, such as a UUID V4 or random strings. | Required | | \`processing\_mode\` | Body. String | Processing mode of the order. The possible values are: \- \`automatic\`: to create and process the order in automatic mode. \- \`manual\`: to create the order and process it later. For more information, visit the section \[Integration model\](https://www.mercadopago.com.mx/developers/en/docs/checkout-api-orders/integration-model). | Required | | \`total\_amount\` | Body. String | Total amount for the transaction. | Required | | \`transaction.payments.payment\_method.id\` | Body. String | Payment method identifier. \*\*In this case, it is the brand of each card\*\*. You can check the complete list of available identifiers by sending a request to the :TagComponent{tag="GET" text="Get payment methods" href="/developers/en/reference/online-payments/checkout-api/payment-methods/get" color="accent"} endpoint. | Required | | \`transaction.payments.payment\_method.type\` | Body. String | Payment method type. For credit card payments, it should be \`credit\_card\`, and for debit card payments, it should be \`debit\_card\`. | Required | | \`transaction.payments.payment\_method.token\` | Body. String | Card token. Required for credit and debit card payments. | Required | > SUCCESS\_MESSAGE > > To learn in detail about all the parameters sent and returned in this request, please refer to our :TagComponent{tag="API" text="API Reference" href="/developers/en/reference/online-payments/checkout-api/overview" color="accent"}. Additionally, if you receive an error when submitting the payment, you can consult our \[list of errors\](https://www.mercadopago.com.mx/developers/en/docs/checkout-api-orders/payment-management/integration-errors). In case of success, the response will look like the example below. \`\`\`json { "id": "ORD01JS2V6CM8KJ0EC4H502TGK1WP", "type": "online", "processing\_mode": "automatic", "external\_reference": "ext\_ref\_1234", "total\_amount": "50.00", "total\_paid\_amount": "50.00", "country\_code": "BRA", "user\_id": "2021490138", "status": "processed", "status\_detail": "accredited", "capture\_mode": "automatic", "created\_date": "2025-04-17T21:41:33.96Z", "last\_updated\_date": "2025-04-17T21:41:35.144Z", "integration\_data": { "application\_id": "874202490252970" }, "transactions": { "payments": \[ { "id": "PAY01JS2V6CM8KJ0EC4H504R7YE34", "amount": "50.00", "paid\_amount": "50.00", "reference\_id": "0002yjis6j", "status": "processed", "status\_detail": "accredited", "payment\_method": { "id": "elo", "type": "credit\_card", "token": "519ada5ac7431ef6ce24ac19c38f6768", "installments": 1 } } \] } } \`\`\` Among the returned parameters, the ones indicated in the table below stand out. | Parameter | Type | Description | |---|---|---| | \`transactions.payments.status\` | String | Transaction status. For example, \`processed\` indicates the payment was approved. See the \[Transaction status\](https://www.mercadopago.com.mx/developers/en/docs/checkout-api-orders/payment-management/status/transaction-status) section for all possible values. | | \`transactions.payments.status\_detail\` | String | Transaction status detail. For example, \`accredited\` indicates the payment was approved and credited. | | \`transactions.payments.paid\_amount\` | String | Amount actually paid in the transaction. | > WARNING > > If you created the order manually, remember that processing the payment requires an additional step, which is sending a request to the :TagComponent{tag="POST" text="Process order" href="/developers/en/reference/online-payments/checkout-api/process-order/post" color="green"} endpoint. Additionally, this mode will allow you to reserve and capture funds. Refer to the \[Reserve, capture, and cancel funds\](https://www.mercadopago.com.mx/developers/en/docs/checkout-api-orders/payment-management/reserve-capture-cancel) section for more information. Once the order and payment are created, you can check the possible statuses by going to the \[Order status\](https://www.mercadopago.com.mx/developers/en/docs/checkout-api-orders/payment-management/status/order-status) and \[Transaction status\](https://www.mercadopago.com.mx/developers/en/docs/checkout-api-orders/payment-management/status/transaction-status) sections, respectively. ::: :::: ::::TabComponent{title="Core Methods"} In the integration via Core Methods for websites, the developer is responsible for defining how the necessary information to complete the payment will be retrieved, including information about the type of document and about the card (issuer and installments). This allows for complete flexibility in building the checkout flow experience, unlike the integration via Card Payment, where the information retrieval is done automatically and the interface is pre-established. Check out the diagram below that illustrates the payment process using a card with Core Methods. sequenceDiagram participant Client as Client's Browser participant Frontend as Seller's Frontend participant MPjs as MercadoPago.js participant Backend as Seller's Backend participant API as Mercado Pago API Client->>Frontend: 1.1 Accesses the site to make a payment Frontend->>MPjs: 1.2 new MercadoPago(PUBLIC_KEY) Frontend->>MPjs: 1.3 getIdentificationTypes() MPjs-->>Frontend: 1.4 identificationTypes Frontend->>Client: 1.5 Displays payment form Client->>Frontend: 2.1 Enters the first 6 card numbers Frontend->>MPjs: 2.2 getPaymentMethods(OPTIONS) MPjs-->>Frontend: 2.3 paymentMethods Frontend->>MPjs: 2.4 getIssuers(OPTIONS) MPjs-->>Frontend: 2.5 issuers Frontend->>Client: 2.6 Show available issuers Frontend->>MPjs: 2.6 getInstallments(OPTIONS) MPjs-->>Frontend: 2.7 installments Frontend->>Client: 2.8 Show payment method and available installments Client->>Frontend: 3.1 Submits the completed form Frontend->>MPjs: 3.2 createCardToken(OPTIONS) MPjs-->>Frontend: 3.3 cardToken Frontend->>Backend: 3.4 POST /process_order Backend->>API: 3.5 POST /v1/orders API-->>Backend: 3.6 Payment status Backend-->>Frontend: 3.7 Payment status Frontend->>Client: 3.8 Show result To proceed with the setup of debit and/or credit card payments via Core Methods, follow the steps below. > NOTE > > Remember: before setting up the payment methods, choose the way you will process your transactions. The processing mode, whether \*\*manual or automatic\*\*, will be defined at the time of order creation, using the \`processing\_mode\` parameter. For more information, visit the section \[Integration model\](https://www.mercadopago.com.mx/developers/en/docs/checkout-api-orders/integration-model). :::AccordionComponent{title="Add payment form" pill="client-side"} The capture of card data (card number, security code and expiration date) is done through a payment form that allows obtaining and validating the information necessary to process the payment. To obtain this data and process payments, insert the \`HTML\` below directly into the project. html html ```
``` ::: :::AccordionComponent{title="Initialize card fields" pill="client-side"} After adding the payment form, it is necessary to initialize the card fields (card number, expiration date and security code) that must be filled in when starting the payment flow. When finalizing the initialization of the fields, the
will contain the iframes with the inputs where the PCI data will be inserted. javascript javascript ``` const cardNumberElement = mp.fields.create('cardNumber', { placeholder: "Número do cartão" }).mount('form-checkout__cardNumber'); const expirationDateElement = mp.fields.create('expirationDate', { placeholder: "MM/YY", }).mount('form-checkout__expirationDate'); const securityCodeElement = mp.fields.create('securityCode', { placeholder: "Código de segurança" }).mount('form-checkout__securityCode'); ``` ::: :::AccordionComponent{title="Get document types" pill="client-side"} After configuring the credential, adding the payment form and initializing the card fields, it is necessary to obtain the types of documents that will be part of filling out the payment form. By including the element of type \`select\` with the id: \`form-checkout\_\_identificationType\` that is in the form, it will be possible to automatically fill in the available options when calling the function below. javascript javascript ``` function createSelectOptions(elem, options, labelsAndKeys = { label: "name", value: "id" }) { const { label, value } = labelsAndKeys; elem.options.length = 0; const tempOptions = document.createDocumentFragment(); options.forEach(option => { const optValue = option[value]; const optLabel = option[label]; const opt = document.createElement('option'); opt.value = optValue; opt.textContent = optLabel; tempOptions.appendChild(opt); }); elem.appendChild(tempOptions); } ``` ::: :::AccordionComponent{title="Get card payment methods" pill="client-side"} In this step, the buyers' data is validated when they fill in the necessary fields to make the payment. In order to identify the payment method used by the buyer, insert the code below directly into the project. javascript javascript ``` const paymentMethodElement = document.getElementById('paymentMethodId'); const issuerElement = document.getElementById('form-checkout__issuer'); const installmentsElement = document.getElementById('form-checkout__installments'); const issuerPlaceholder = "Banco emissor"; const installmentsPlaceholder = "Parcelas"; let currentBin; cardNumberElement.on('binChange', async (data) => { const { bin } = data; try { if (!bin && paymentMethodElement.value) { clearSelectsAndSetPlaceholders(); paymentMethodElement.value = ""; } if (bin && bin !== currentBin) { const { results } = await mp.getPaymentMethods({ bin }); const paymentMethod = results[0]; paymentMethodElement.value = paymentMethod.id; updatePCIFieldsSettings(paymentMethod); updateIssuer(paymentMethod, bin); updateInstallments(paymentMethod, bin); } currentBin = bin; } catch (e) { console.error('error getting payment methods: ', e) } }); function clearSelectsAndSetPlaceholders() { clearHTMLSelectChildrenFrom(issuerElement); createSelectElementPlaceholder(issuerElement, issuerPlaceholder); clearHTMLSelectChildrenFrom(installmentsElement); createSelectElementPlaceholder(installmentsElement, installmentsPlaceholder); } function clearHTMLSelectChildrenFrom(element) { const currOptions = [...element.children]; currOptions.forEach(child => child.remove()); } function createSelectElementPlaceholder(element, placeholder) { const optionElement = document.createElement('option'); optionElement.textContent = placeholder; optionElement.setAttribute('selected', ""); optionElement.setAttribute('disabled', ""); element.appendChild(optionElement); } // This step improves cardNumber and securityCode validations function updatePCIFieldsSettings(paymentMethod) { const { settings } = paymentMethod; const cardNumberSettings = settings[0].card_number; cardNumberElement.update({ settings: cardNumberSettings }); const securityCodeSettings = settings[0].security_code; securityCodeElement.update({ settings: securityCodeSettings }); } ``` ::: :::AccordionComponent{title="Get issuing bank" pill="client-side"} When filling out the payment form, it is possible to identify the card issuing bank, avoiding data processing conflicts between different issuers. In addition, it is from this identification that the installment options are displayed. The issuing bank is obtained through the \`issuer\_id\` parameter. To get it, use the Javascript below. javascript javascript ``` async function updateIssuer(paymentMethod, bin) { const { additional_info_needed, issuer } = paymentMethod; let issuerOptions = [issuer]; if (additional_info_needed.includes('issuer_id')) { issuerOptions = await getIssuers(paymentMethod, bin); } createSelectOptions(issuerElement, issuerOptions); } async function getIssuers(paymentMethod, bin) { try { const { id: paymentMethodId } = paymentMethod; return await mp.getIssuers({ paymentMethodId, bin }); } catch (e) { console.error('error getting issuers: ', e) } }; ``` ::: :::AccordionComponent{title="Get number of installments" pill="client-side"} One of the mandatory fields that make up the payment form is the \*\*number of installments\*\*. To activate it and display the available installments at the time of payment, use the function below. javascript javascript ``` async function updateInstallments(paymentMethod, bin) { try { const installments = await mp.getInstallments({ amount: document.getElementById('transactionAmount').value, bin, paymentTypeId: 'credit_card' }); const installmentOptions = installments[0].payer_costs; const installmentOptionsKeys = { label: 'recommended_message', value: 'installments' }; createSelectOptions(installmentsElement, installmentOptions, installmentOptionsKeys); } catch (error) { console.error('error getting installments: ', e) } } ``` \> NOTE > > If you want to configure interest-free installments, please refer to the \[Support Center documentation\](https://www.mercadopago.com.mx/developers/es/support/mensualidades-sin-intereses\_2255). ::: :::AccordionComponent{title="Create card token" pill="client-side"} The card token is created from the card information itself, increasing security during the payment flow. In addition, once the token is used in a given purchase, it is discarded, requiring the creation of a new one for future purchases. To create the card token, use the function below. > NOTE > > Importante > > The \`createCardToken\` method returns a token with the secure representation of the card data. We will take the ID token from the response and save it in a hidden input called \`token\` and then send the form to the servers. In addition, remember that \*\*the token is valid for 7 days\*\* and can be \*\*used only once\*\*. javascript javascript ``` const formElement = document.getElementById('form-checkout'); formElement.addEventListener('submit', createCardToken); async function createCardToken(event) { try { const tokenElement = document.getElementById('token'); if (!tokenElement.value) { event.preventDefault(); const token = await mp.fields.createCardToken({ cardholderName: document.getElementById('form-checkout__cardholderName').value, identificationType: document.getElementById('form-checkout__identificationType').value, identificationNumber: document.getElementById('form-checkout__identificationNumber').value, }); tokenElement.value = token.id; formElement.requestSubmit(); } } catch (e) { console.error('error creating card token: ', e) } } ``` ::: :::AccordionComponent{title="Submit payment" pill="server-side"} The payment submission must be made by creating an order that contains associated payment transactions. > NOTE > > The creation of a payment can occur asynchronously in an order. In this scenario, the order remains in a processing state and without information. We recommend setting up \[Order topic notifications\](https://www.mercadopago.com.mx/developers/en/docs/checkout-api-orders/notifications) to receive updates on the status change, including the updated order data. Alternatively, you can choose to send a request to the :TagComponent{tag="GET" text="/v1/orders/{id}" href="/developers/en/reference/online-payments/checkout-api/get-order/get" color="accent"}endpoint to retrieve that updated information. To do this, send a request with your :toolTipComponent\[test Access Token\]{content="Private key of the application created in Mercado Pago, that must be used in the backend. You can access it through Your integrations > Integration data > Tests > Test credentials. The test Access Token starts with the prefix \`APP\_USR\`."} and the required parameters listed below to the endpoint :TagComponent{tag="POST" text="/v1/orders" href="/developers/en/reference/online-payments/checkout-api/create-order/post" color="green"}. \`\`\`curl curl -X POST \\ 'https://api.mercadopago.com/v1/orders'\\ -H 'Content-Type: application/json' \\ -H 'X-Idempotency-Key: {{SOME\_UNIQUE\_VALUE}}' \\ -H 'Authorization: Bearer {{YOUR\_ACCESS\_TOKEN}}' \\ -d '{ "type": "online", "processing\_mode": "automatic", "total\_amount": "50.00", "external\_reference": "ext\_ref\_1234", "payer": { "email": "{{EMAIL}}" }, "transactions": { "payments": \[ { "amount": "50.00", "payment\_method": { "id": "master", "type": "credit\_card", "token": "1223123", "installments": 1 } } \] } }' \`\`\` > NOTE > > Order creation is subject to request limits per client. If you receive a \`429 Too Many Requests\` error, wait the time indicated in the \`Retry-After\` response header before retrying. See \[Possible errors\](https://www.mercadopago.com.mx/developers/en/docs/checkout-api-orders/payment-management/integration-errors) for more details. See the table below for descriptions of the parameters that are mandatory in the request and those that, although optional, have some important particularity that should be highlighted. | Parameter | Type | Description | Requirement | |---------------------------------------------------|-----------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------| | \`Authorization\` | Header | Refers to your private key, the :toolTipComponent\[test Access Token\]{content="Private key of the application created in Mercado Pago, that must be used in the backend. You can access it through Your integrations > Integration data > Tests > Test credentials. The test Access Token starts with the prefix \`APP\_USR\`."}. | Required | | \`X-Idempotency-Key\` | Header | Idempotency key. It is used to ensure that each request is processed only once, avoiding duplications. Use a unique value in the header of your request, such as a UUID V4 or random strings. | Required | | \`processing\_mode\` | Body. String | Processing mode of the order. The possible values are: \- \`automatic\`: to create and process the order in automatic mode. \- \`manual\`: to create the order and process it later. For more information, visit the section \[Integration model\](https://www.mercadopago.com.mx/developers/en/docs/checkout-api-orders/integration-model). | Required | | \`total\_amount\` | Body. String | Total amount for the transaction. | Optional | | \`transaction.payments.payment\_method.id\` | Body. String | Payment method identifier. \*\*In this case, it is the brand of each card\*\*. You can check the complete list of available identifiers by sending a request to the :TagComponent{tag="GET" text="Get payment methods" href="/developers/en/reference/online-payments/checkout-api/payment-methods/get" color="accent"} endpoint. | Required | | \`transaction.payments.payment\_method.type\` | Body. String | Payment method type. For credit card payments, it should be \`credit\_card\`, and for debit card payments, it should be \`debit\_card\`. | Required | | \`transaction.payments.payment\_method.token\` | Body. String | Card token. Required for credit and debit card payments. | Required | > SUCCESS\_MESSAGE > > To learn in detail about all the parameters sent and returned in this request, please refer to our :TagComponent{tag="API" text="API Reference" href="/developers/en/reference/online-payments/checkout-api/overview" color="accent"}. Additionally, if you receive an error when submitting the payment, you can consult our \[list of errors\](https://www.mercadopago.com.mx/developers/en/docs/checkout-api-orders/payment-management/integration-errors). In case of success, the response will look like the example below. \`\`\`json { "id": "ORD01JS2V6CM8KJ0EC4H502TGK1WP", "type": "online", "processing\_mode": "automatic", "external\_reference": "ext\_ref\_1234", "total\_amount": "50.00", "total\_paid\_amount": "50.00", "country\_code": "BRA", "user\_id": "2021490138", "status": "processed", "status\_detail": "accredited", "capture\_mode": "automatic", "created\_date": "2025-04-17T21:41:33.96Z", "last\_updated\_date": "2025-04-17T21:41:35.144Z", "integration\_data": { "application\_id": "874202490252970" }, "transactions": { "payments": \[ { "id": "PAY01JS2V6CM8KJ0EC4H504R7YE34", "amount": "50.00", "paid\_amount": "50.00", "reference\_id": "0002yjis6j", "status": "processed", "status\_detail": "accredited", "payment\_method": { "id": "master", "type": "credit\_card", "token": "519ada5ac7431ef6ce24ac19c38f6768", "installments": 1 } } \] } } \`\`\` Among the returned parameters, the ones indicated in the table below stand out. | Parameter | Type | Description | |---|---|---| | \`transactions.payments.status\` | String | Transaction status. For example, \`processed\` indicates the payment was approved. See the \[Transaction status\](https://www.mercadopago.com.mx/developers/en/docs/checkout-api-orders/payment-management/status/transaction-status) section for all possible values. | | \`transactions.payments.status\_detail\` | String | Transaction status detail. For example, \`accredited\` indicates the payment was approved and credited. | | \`transactions.payments.paid\_amount\` | String | Amount actually paid in the transaction. | > WARNING > > If you created the order manually, remember that processing the payment requires an additional step, which is sending a request to the :TagComponent{tag="POST" text="Process order" href="/developers/en/reference/online-payments/checkout-api/process-order/post" color="green"} endpoint. Additionally, this mode will allow you to reserve and capture funds. Refer to the \[Reserve, capture, and cancel funds\](https://www.mercadopago.com.mx/developers/en/docs/checkout-api-orders/payment-management/reserve-capture-cancel) section for more information. Once the order and payment are created, you can check the possible statuses by going to the \[Order status\](https://www.mercadopago.com.mx/developers/en/docs/checkout-api-orders/payment-management/status/order-status) and \[Transaction status\](https://www.mercadopago.com.mx/developers/en/docs/checkout-api-orders/payment-management/status/transaction-status) sections, respectively. ::: :::: :::::