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"
}
}PAYIN
Rimborsare 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"
}
}Questo endpoint ti permette di rimborsare integralmente una transazione Payin autorizzata in precedenza.
Requisiti per il rimborso:
- L’importo del rimborso deve corrispondere all’importo del Payin originale.
- Il rimborso deve essere inviato allo stesso beneficiario e allo stesso conto usati per il Payin originale.
Autorizzazioni
Intestazioni
Token di accesso Bearer per l'autenticazione. Questo token si ottiene dagli endpoint Ottenere il token di accesso o Rinnovare il token di accesso.
Parametri del percorso
Corpo
application/json
Risposta
OK
Ultima modifica il 22 novembre 2026

