Preferences - Python - Mercado Pago Developers
Which documentation are you looking for?

Do not know how to start integrating? 

Check the first steps

Create full refund

You can create a full refund using the SDK below. For details on the request parameters, check the Create refund API.

          
sdk = mercadopago.SDK('YOUR_ACCESS_TOKEN')
 
sdk.refund().create('payment_id')

        

Create partial refund

You can create a partial refund using the SDK below. For details on the request parameters, check the Create refund API.

          
sdk = mercadopago.SDK('YOUR_ACCESS_TOKEN')
 
refund_object = {
   'amount': 0.0
}
 
sdk.refund().create('payment_id', refund_object)

        

Get specific refund

You can get a specific refund of certain payments using the SDKs below. For details on the request parameters, check the Get specific refund API.

          
refunds_response = sdk.refund().list_all(payment_id)
refunds = refunds_response["response"]