Refund

Refund a transfer payment

A refund is made by providing to the API call information about the payment to refund through paymentId and the transfer linked to that payment through transferId.

In the request you can indicate the list of contributions, that will state which original creditor will contribute which amount to the refund. In case there are no contributions, the request will be considered as a full refund.

For the payments that are funding multiple transfers, you have to request a refund for each transfer adding each specific transferId in the call.

In the headers of the response, you will find the UUID of the refund payment that will be made to the debtor. This way you will be able to follow the status of that payment.

Full refunds

A full refund is made when the list of contributions is empty.

Digiteal retrieves the full amount of all the payments made to all the creditors through SDD with a standard communication.

Once all the funds are retrieved, a refund is made to the debtor through SCT with a standard communication. The communication can be overridden using the communication attribute.

πŸ“˜

Full refund example

{  
  "communication": "Refund from payment cart-1234 of 15/05/2023 from MyMarketplace"
}

Partial refunds

To request a partial refund, you can use the contributions attribute. Each contribution will define the amount to be refunded from one of the creditors linked to the transfer. Only the contributions defined in the request are refunded.

The amount of each contribution must be positive and must not exceed the amount that was paid to the creditor.

πŸ“˜

Partial refund example

{  
  "communication": "Refund from payment cart-1234 of 15/05/2023 from MyMarketplace",  
  "refundContributions": [  
    {  
      "contributorIban": "ES0720951914701193632422",  
      "amountInCents": "9250",  
      "currency": "EUR",  
      "communication": "Refund from payment cart-1234 of 15/05/2023 from MyMarketplace",  
      "reference": "REFERENCE_ID1"  
    },  
    {  
      "contributorIban": "ES1401827984057893687272",  
      "amountInCents": "750",  
      "currency": "EUR",  
      "communication": "Refund from payment cart-1234 of 15/05/2023 from MyMarketplace",  
      "reference": "REFERENCE_ID2"  
    }  
  ]  
}

Webhooks

You can subscribe to webhooks to be notified during the refund process.

Refund received

πŸ“˜

Webhook type

TRANSFER_REIMBURSEMENT_RECEIVED

A notification is send with the confirmation that Digiteal received the funds from a creditor. This webhook will be sent for each creditor.

The payload for this webhook is defined in the callback section of the refund payment endpoint.

This payload contains:

  • payment: information of the payment that is refunded.
  • transfer, transfer that it is refunded, which contains the reference used in the payout operation.

Refund started

πŸ“˜

Webhook type

TRANSFER_REIMBURSEMENT_STARTED

Once Digiteal receives all the funds from all the creditors, a notification is send to inform that Digiteal is about to send the full amount as a unique payment to the debtor.

The payload for this webhook is defined in the callback section of the refund payment endpoint.

This payload contains:

  • transferID: id of the transfer that that it is refunded.
  • parentBankTransactionID: id of the original payment that is refunded (provided in the communication parameter of the request refund call).
  • bankTransactionID: id of the refund payment (also provided in the headers of the response of the request refund call).

Refund completed

πŸ“˜

Webhook type

TRANSFER_REIMBURSEMENT_COMPLETED

A notification is send with the confirmation that the debtor received the refund payment from Digiteal. It indicates the end of the refund process.

The payload for this webhook is defined in the callback section of the refund payment endpoint.

This payload contains:

  • transferID: id of the transfer that that it is refunded.
  • parentBankTransactionID: id of the original payment that is refunded (provided in the communication attribute of the request refund call).
  • bankTransactionID: id of the refund payment (also provided in the headers of the response of the request refund call).