Configure other payment methods
By default, all payment methods are available in Checkout Pro. This setting can be customized through the payment preference, allowing you to remove unwanted options.
The following table lists the available attributes in the payment preferences and the application of each one to configure them according to the business needs.
Preference Attribute | Description | Possible values |
payment_methods | Class that describes the attributes and methods of the Checkout Pro payment methods. | - |
excluded_payment_types | Allows you to exclude unwanted payment method types, such as offline payments, credit or debit cards, among others. You can obtain a detailed list of all available payment types for integration by sending a GET request with your Access Token to the endpoint /v1/payment_methodsAPI. | ticket |
excluded_payment_methods | Allows you to exclude specific credit and debit card brands, such as Visa, Mastercard, American Express, among others. You can obtain a detailed list of all available payment methods for integration by sending a GET request with your Access Token to the endpoint /v1/payment_methodsAPI. | master |
installments | Defines the maximum number of installments that can be offered to the buyer. | 10 |
purpose | By assigning the value wallet_purchase , Checkout Pro will only accept payments made by registered Mercado Pago users, using a card or account balance. | wallet_purchase |
With this information, use one of the SDKs available below to configure the payment methods.
<?php
$preference = new MercadoPago\Preference();
// ...
$preference->payment_methods = array(
"excluded_payment_methods" => array(
array("id" => "master")
),
"excluded_payment_types" => array(
array("id" => "ticket")
),
"installments" => 12
);
// ...
?>
const preference = new Preference(client);
preference.create({
body: {
// ...
payment_methods: {
excluded_payment_methods: [
{
id: "master"
}
],
excluded_payment_types: [
{
id: "ticket"
}
],
installments: 12
}
}
})
// ...
PreferenceClient client = new PreferenceClient();
//...
List<PreferencePaymentMethodRequest> excludedPaymentMethods = new ArrayList<>();
excludedPaymentMethods.add(PreferencePaymentMethodRequest.builder().id("master").build());
excludedPaymentMethods.add(PreferencePaymentMethodRequest.builder().id("amex").build());
List<PreferencePaymentTypeRequest> excludedPaymentTypes = new ArrayList<>();
excludedPaymentTypes.add(PreferencePaymentTypeRequest.builder().id("ticket").build());
PreferencePaymentMethodsRequest paymentMethods =
PreferencePaymentMethodsRequest.builder()
.excludedPaymentMethods(excludedPaymentMethods)
.excludedPaymentTypes(excludedPaymentTypes)
.installments(12)
.build();
PreferenceRequest request = PreferenceRequest.builder().paymentMethods(paymentMethods).build();
client.create(request);
//...
#...
preference_data = {
# ...
payment_methods: {
excluded_payment_methods: [
{ id: 'master' }
],
excluded_payment_types: [
{ id: 'ticket' }
],
installments: 12
}
# ...
}
#...
var paymentMethods = new PreferencePaymentMethodsRequest
{
ExcludedPaymentMethods = new List<PreferencePaymentMethodRequest>
{
new PreferencePaymentMethodRequest
{
Id = "master",
},
},
ExcludedPaymentTypes = new List<PreferencePaymentTypeRequest>
{
new PreferencePaymentTypeRequest
{
Id = "ticket",
},
},
Installments = 12,
};
var request = new PreferenceRequest
{
// ...
PaymentMethods = paymentMethods,
};
#...
preference_data = {
"excluded_payment_methods": [
{ "id": "master" }
],
"excluded_payment_types": [
{ "id": "ticket" }
],
"installations": 12
}
#...