Skip to content

¿Como permitir cancelar una suscripción a un cliente? #384

Answered by lucmantovani
emilioHayes asked this question in Q&A
Discussion options

You must be logged in to vote

Hola @emilioHayes!

Es posible cancelar una subscripción llamando el método update.
Como referência dejo el snippet para cancelar un pago:

<?php
MercadoPago\SDK::setAccessToken("YOUR_ACCESS_TOKEN");
$payment_id = 000000000;
$payment = MercadoPago\Payment::find_by_id($payment_id);
$payment->status = "cancelled";
$payment->update(); 
?>

Dejo también la referencia de API de actualización de subscripción: https://www.mercadopago.com.br/developers/pt/reference/subscriptions/_preapproval_id/put

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@emilioHayes
Comment options

@lucmantovani
Comment options

Answer selected by emilioHayes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants