# MD for: https://www.mercadopago.com.ar/developers/pt/docs/checkout-api-orders/additional-settings/mobile/payment-behavior-customizations.md \# Payment behavior and support Configure purchase rules in your backend when creating the order. This page covers exclusions, installments, retry authorization, tests and troubleshooting. Review, Status Screen and cancellation are covered in \[platform integration\](https://www.mercadopago.com.ar/developers/en/docs/checkout-api-orders/payment-integration/mobile/payment). :::AccordionComponent{title="Exclude methods and configure installments" pill="server-side"} Set \`config.payment\_method\` when creating the order. These fields control exclusions and installments. | Field | Type | Description | Example | Required | | --- | --- | --- | --- | --- | | \`config.payment\_method.not\_allowed\_ids\` | \`string\[\]\` | Excluded payment method or brand IDs. | \`\["amex"\]\` | No | | \`config.payment\_method.not\_allowed\_types\` | \`string\[\]\` | Excluded payment method types. | \`\["debit\_card", "prepaid\_card"\]\` | No | | \`config.payment\_method.max\_installments\` | \`integer\` | Maximum installment count. | \`6\` | No | | \`config.payment\_method.default\_installments\` | \`integer\` | Initial preference among available options. | \`1\` | No | json json ``` { "config": { "payment_method": { "not_allowed_ids": [ "amex" ], "not_allowed_types": [ "debit_card", "prepaid_card" ], "max_installments": 6, "default_installments": 1 } } } ``` Include the \`config\` object in the order creation body; this fragment is neither a standalone request nor an update. The example intentionally excludes debit and prepaid cards. Adjust purchase rules and preserve other required settings. The backend applies exclusions before returning the selector. Excluding every method in a group may remove that group from the experience. The default installment count is selectable only if it is among the offered options. The Payment Builder exposes neither \`setPaymentMethodConfiguration\` nor a \`minInstallments\` setter. ::: :::AccordionComponent{title="Authorize retries in your backend" pill="server-side"} Include this authorization in the order creation \`config\` object alongside the other purchase data. json json ``` { "config": { "online": { "retries": { "allowed": true } } } } ``` To check eligibility, query the order in your backend: the documented combination is \`status: action\_required\` and \`status\_detail: waiting\_retry\`. \`waiting\_retry\` is not a \`status\` value. Authorize attempts with \`config.online.retries.allowed: true\`. Changing the method on Status Screen depends on the server returning the \`change\_payment\_method\` action; the flag and order state alone do not guarantee that the button appears. \`can\_retry\` belongs to the Status Screen response, not the order creation body. When the action is offered, the buyer returns to the selector for another attempt with the same order. Reconcile all results by \`orderId\`. The pending presentation does not offer retry. ::: :::AccordionComponent{title="Test the integration" pill="client-side"} Run the following tests on Android and iOS before using production credentials. ### Prepare the test environment 1\. Initialize the SDK with the test Public Key and \`ARG\`. Create the order in your backend with the test Access Token from the same application, following \[Payment integration\](https://www.mercadopago.com.ar/developers/en/docs/checkout-api-orders/payment-integration/mobile/payment). Credentials define the environment; the SDK has no sandbox flag. 2\. See \[Test cards\](https://www.mercadopago.com.ar/developers/en/docs/checkout-api-orders/resources/test-cards) for Argentina's card numbers, CVV, expiration dates and cardholder data. The cardholder name determines the scenario: \`APRO\` for approval, \`OTHE\` for rejection and \`CONT\` for a pending payment. Also use the identity document specified in the table for each case. 3\. See \[Test accounts\](https://www.mercadopago.com.ar/developers/en/docs/checkout-api-orders/resources/test-accounts) if the scenario requires representing a buyer or seller. You do not need to create an account or log in for standard tests with your application's credentials. 4\. Register the result callbacks. Enable \`withStatusScreen\` and implement \`onExit\` to validate the result screen. Repeat the scenarios without \`withStatusScreen\` to validate result handling in your application. Create an order for each independent scenario. Keep the same order when testing retry. To check each result, query the :TagComponent{tag="GET" text="/v1/orders/{id}" href="/developers/en/reference/online-payments/checkout-api/get-order/get" color="accent"} endpoint from your backend with the identifier received at creation. Compare the order and transaction states with the SDK result; do not use the success callback alone as payment confirmation. ### Prepare a saved card The Payment selector uses cards associated with a customer of your integration. Logging in with a test buyer or paying with a new card does not create this association automatically. 1\. Create a test customer in your backend through :TagComponent{tag="POST" text="/v1/customers" href="/developers/en/reference/online-payments/checkout-api/customers/create-customer/post" color="green"}. Use a test email in the format \`test\_payer\_\[0-9\]{1,10}@testuser.com\` and keep the returned \`id\`. 2\. Tokenize a test card with the \[tokenization without payment\](https://www.mercadopago.com.ar/developers/en/docs/checkout-api-orders/additional-settings/mobile/behavior-customizations) flow. In your backend, associate the token with the customer through :TagComponent{tag="POST" text="/v1/customers/{customer\_id}/cards" href="/developers/en/reference/online-payments/checkout-api/cards/save-card/post" color="green"}. Keep credentials and data in the test environment. 3\. Confirm the association through :TagComponent{tag="GET" text="/v1/customers/{customer\_id}/cards" href="/developers/en/reference/online-payments/checkout-api/cards/get-customer-cards/get" color="accent"}. Create the manual order with that identifier in \`payer.customer\_id\` and the corresponding email in \`payer.email\`, without sending a payment transaction. 4\. Open Payment with that order's \`orderId\` and \`clientToken\`. The card should appear in the selector if the order rules do not exclude it. Select it, enter the CVV when requested and complete the offered steps. The SDK may skip CVV or installments when they do not apply; confirm the result in your backend. ### Run the scenarios and check the results In the table, the Status Screen is expected only when \`withStatusScreen\` is enabled and the flow reaches the result step. Errors before processing and cancellations may close checkout without that screen. \`onExit\` reports its closure, not purchase approval. | Scenario | How to run | Expected result | | --- | --- | --- | | Approved card | Select a new card and enter test data with cardholder \`APRO\`. Repeat with a saved card prepared with those details. | The SDK returns success with \`MPPaymentData.Payment\` and the purchase's \`orderId\`. The backend confirms \`processed\` / \`accredited\`. The Status Screen shows approval. | | Rejected card | Use a new card with cardholder \`OTHE\`. Check the returned state before closing the experience. | The backend confirms rejection. The Status Screen shows rejection or failure. Handle the SDK result and check the order even if an error callback occurs; do not fulfill the order. | | Pending card | Use a new card with cardholder \`CONT\`. | The state remains pending or processing, without confirmation of credit. Check \`orderStatus\` and \`orderStatusDetail\` when the result includes payment data. The Status Screen shows the pending state and does not offer retry; do not fulfill the order. | | Rapipago and Pago Fácil | Select each method in a separate order. Complete the requested data and confirm, following the \[Rapipago and Pago Fácil test\](https://www.mercadopago.com.ar/developers/en/docs/checkout-api-orders/integration-test/rapipago-pagofacil). | The SDK may return success for generating instructions. The backend returns \`action\_required\` / \`waiting\_payment\`. The Status Screen shows the available instructions and actions. This test validates flow creation without simulating the final payment; do not fulfill the order. | | Review and email change | Open an experience with \`withReviewAndConfirm\` and another without it. Go back from review to change the method. For an offline method, request an email change with \`onEmailChangeRequested\` configured. | Review appears only when enabled. Going back does not cancel the entire checkout. Email change calls the callback and closes the experience without emitting cancellation; your application collects the email, creates another order and opens a new instance. | | Rejection with and without retry | Repeat rejection with \`config.online.retries.allowed\` enabled and disabled. Query the order and check \`status: action\_required\` and \`status\_detail: waiting\_retry\`. | On Status Screen, check whether the server offers the \`change\_payment\_method\` action. When offered, changing the method returns to the selector and preserves \`orderId\`; reconcile the results for that order. Authorization and state alone do not guarantee the button. The pending presentation does not offer retry. | | Cancellation | Exit checkout before confirming payment. | The SDK returns \`UserCancelled\` on Android or \`.userCancelled\` on iOS, with the \`screens\` history. Do not expect the Status Screen or interpret the exit as financial cancellation of the order; query your backend. | | Connection loss and reopening | Interrupt the network during the flow. Restore connectivity and query the order before opening another Builder instance with a new callback. Also test an order that has already expired. | Your application handles the error or missing response and retrieves the backend state without automatically starting another charge. An expired order must not be treated as an approved payment. | | Status Screen and receipt failure | Interrupt the network while loading the result or preparing a receipt, when that action is available. | Preserve the processing result. Android may use fallback content or open the receipt externally. iOS may close the result without \`onExit\` if no usable fallback exists and remains on the screen if receipt preparation fails. | Configure \[order notifications\](https://www.mercadopago.com.ar/developers/en/docs/checkout-api-orders/notifications) to track changes after the initial result. Fulfill the order only after confirming payment in your backend. ::: ## Troubleshoot integration issues | Problem | Check | | --- | --- | | Checkout does not open | Check initialization before use, Public Key, \`ARG\` configuration and release dependencies. | | Invalid or expired order | Check that \`orderId\` and \`clientToken\` belong to the same purchase. Recreate the order when necessary and preserve its cart association. | | Missing method or installment | Review exclusions, \`max\_installments\`, \`default\_installments\` and the actual returned options. | | Missing result after reopening | Register the callback on the new instance; do not reuse a closed experience. | | Retry unavailable | Query \`status: action\_required\` and \`status\_detail: waiting\_retry\`, check retry authorization and the \`change\_payment\_method\` action in the Status Screen response. The flag alone is insufficient. | | Status Screen failure | Preserve the result and query the order. Android may render fallback content; iOS may close without \`onExit\` if no usable fallback exists. | | Receipt is unavailable | Check the returned action, connectivity and platform limits. Android may open the URL externally; iOS remains on the screen if preparation fails. | | Compilation error | Review the release, imports, required iOS \`checkoutAppearance\` and \`MainActor\` context. Do not use \`setPaymentMethodConfiguration\` with Payment. | Also see \[SDK errors\](https://www.mercadopago.com.ar/developers/en/docs/checkout-api-orders/payment-management/integration-errors/sdk) and \[mobile troubleshooting\](https://www.mercadopago.com.ar/developers/en/docs/checkout-api-orders/resources/troubleshooting).