curl --request PATCH \
--url https://api.stage.localpayment.com/api/payin/{externalId}/refund \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"comment": "Pix refund",
"beneficiary": {
"type": "INDIVIDUAL",
"name": "John",
"lastname": "Doe",
"document": {
"type": "DocumentType",
"id": "DocumentId"
},
"bank": {
"name": "BankName",
"code": "Code",
"account": {
"type": "BankAccountType",
"number": "AccountNumber"
}
}
}
}
'
{
"externalId": "e36ef929-c2d4-fcf0-b30c-99dc51798f4b",
"internalId": "c09095fb-6a0e-47af-9f43-3d9452b0f290",
"status": {
"code": "902",
"description": "REFUNDED",
"detail": "The payin was refunded"
}
}{
"status": {
"code": "400",
"description": "ERROR",
"detail": "Invalid operation"
}
}{
"detail": "Given token not valid for any token type",
"code": "token_not_valid",
"messages": [
{
"token_class": "AccessToken",
"token_type": "access",
"message": "Token is invalid or expired"
}
]
}{
"status": {
"code": "404",
"description": "ERROR",
"detail": "Payin not found"
}
}PAYINS
Reembolsar un Payin
PATCH
/
api
/
payin
/
{externalId}
/
refund
curl --request PATCH \
--url https://api.stage.localpayment.com/api/payin/{externalId}/refund \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"comment": "Pix refund",
"beneficiary": {
"type": "INDIVIDUAL",
"name": "John",
"lastname": "Doe",
"document": {
"type": "DocumentType",
"id": "DocumentId"
},
"bank": {
"name": "BankName",
"code": "Code",
"account": {
"type": "BankAccountType",
"number": "AccountNumber"
}
}
}
}
'
{
"externalId": "e36ef929-c2d4-fcf0-b30c-99dc51798f4b",
"internalId": "c09095fb-6a0e-47af-9f43-3d9452b0f290",
"status": {
"code": "902",
"description": "REFUNDED",
"detail": "The payin was refunded"
}
}{
"status": {
"code": "400",
"description": "ERROR",
"detail": "Invalid operation"
}
}{
"detail": "Given token not valid for any token type",
"code": "token_not_valid",
"messages": [
{
"token_class": "AccessToken",
"token_type": "access",
"message": "Token is invalid or expired"
}
]
}{
"status": {
"code": "404",
"description": "ERROR",
"detail": "Payin not found"
}
}Este endpoint te permite reembolsar íntegramente una transacción de Payin previamente autorizada.
Requisitos de reembolso:
- El importe del reembolso debe coincidir con el importe original del pago.
- El reembolso debe enviarse al mismo beneficiario y a la misma cuenta utilizada para el pago original.
Autorizaciones
Encabezados
Token de acceso Bearer para la autenticación. Este token se obtiene de los endpoints Get Access Token o Refresh Access Token.
Parámetros de ruta
Cuerpo
application/json
Respuesta
OK
Última modificación el 12 de noviembre de 2026

