Can you use two types of payment methods in a paid-for transaction?

12

For example, I want to sell a product that includes membership and monthly payment, R $ X, XX + R $ X, XX automatic debit.

Example of automatic debit:

$preapproval_data = array(
        "payer_email" => "[email protected]",
        "back_url" => "http://www.google.com.br",
        "reason" => "TESTE",
        "external_reference" => "OP-1234",
        "auto_recurring" => array(
           "frequency" => 1,
           "frequency_type" => "months",
           "transaction_amount" => 0.5,
           "currency_id" => "BRL",
           "start_date" => "2016-09-20T20:58:11.778-03:00"
        )
);
$preference = $mp->create_preapproval_payment($preapproval_data);

Simple payment example:

$preference_data = array(
    "reason" => "Adesão",
    "items" => array(
        array(
            "title" => "Adesão",
            "currency_id" => "BRL",
            "category_id" => "",
            "quantity" => 1,
            "unit_price" => 100
        )

    ),
    "payment_methods" => array(
    "installments" => 24
    )
);

$preference = $mp->create_preference($preference_data);

Would you have any way to create a transaction that includes the two payment methods ?

    
asked by anonymous 29.09.2015 / 20:47

1 answer

4
Unfortunately the current Free Market API still does not allow multiple forms of payment per order, however you can manage this internally, and if necessary create two transactions for each order (I do not recommend it if it is not extremely important to your business, visa that you will have greater complexity to manage billing, and may have problems with chargeback when any of the cards are declined.)

If even with the above caveats it is interesting for you to apply the concept:

Change your order table by adding two columns to save% of both transactions ( easy ) or modify your modeling to support multiple forms of payment per order ( difficult, requires a new table containing the forms of payment associated with the order 1 / N ), so if the customer chooses to pay with two cards, you will be able to record the data of both payments.

Please note that if one of the transactions is declined, the other should be reversed.

    
29.12.2015 / 13:19