Configure redirect URLs
Client-Side
With the Status Screen Brick, it is possible to redirect your user to another page of your site through the redirection buttons, so that user can make a new purchase or, in case of payment error, try to make a new payment. To configure the return URLs, you need to send the desired URLs in the Brick configuration.
const settings = {
initialization: {
paymentId: 100, // payment id generated by Mercado Pago
},
callbacks: {
onReady: () => {
// callback called when Brick is ready
},
onError: (error) => {
// callback called for all Brick error cases
},
},
customization: {
backUrls: {
'error': '<http://<seu dominio>/error>',
'return': '<http://<seu dominio>/homepage>'
}
}
};
const customization = {
backUrls: {
error: '<http://<your_domain>/error>',
return: '<http://<your_domain>/homepage>',
},
};
The address provided in the return
property of the backUrls
object will be displayed as a link to the user whenever the Status Screen Brick is displayed, while the address provided in the error
property will be displayed as a link to the user when there is an error in payment processing.