A refund is the process of returning money to a customer for a previously completed transaction, typically when the customer is dissatisfied with a product or service, or when the transaction is invalid or erroneous. Refunds can be initiated by the customer or the merchant, depending on the situation.
Key Aspects of a Refund:
Purpose: Refunds are often requested when a customer returns a product, cancels a service, or when there is an error or issue with the original payment. They can also occur due to fraud detection, disputes, or chargebacks.
Types of Refunds:
Full Refund: The entire amount of the original payment is returned to the customer.
Partial Refund: Only a portion of the original payment amount is refunded to the customer. This is commonly used when a customer returns part of an order or service.
Refund Process:
Initiation: In order to initiate a refund, there are 2 options:
- Via API. For CARD, Apple Pay, Google Pay payment methods, Refund API can be used. For PIS payment method, currently Initiate payment API can be used.
- Via Online banking back office. All type of payments can be refunded from Merchant tab in Online banking. Select a transaction and press “Refund” option. To see merchant dashboard, additional role is required – “Merchant dashboard” with “Manage Transactions” capability. MAR of a merchant can assign roles for online banking user selecting Settings -> Users -> selecting user name -> Access & Permissions -> Merchant.
Authorization: ConnectPay checks whether the refund is valid and if the original payment qualifies for a refund (e.g., the transaction is in an approved or settled state). Additional authorization of a refund via API is not required, if card schemes require authorization, this process is triggered automatically. If refund is initiated via online banking, additional SCA step is applied for a user who is initiating an operation.
Processing: The refund is processed, and the funds are transferred back to the customer’s account through the same payment method (credit/debit card, bank account, Apple Pay wallet, Google Pay wallet).
Confirmation: Once the refund is processed, both the merchant and the customer receive confirmation that the refund has been completed. Optional webhook notification is sent to merchant or Get payment details API can be called.
Refund Conditions: The original transaction must be in a valid state (Approved, Settled).
Refund Fees: Refund fee is applied based on pricing agreed with a merchant.
Integration
For full refund no request body is required, just Refund API call.
For partial refund, amount can be specified (not greater than original payment amount).
Currency is not specified, refund is processed in same currency as original transaction. Description is also optional – order number can be provided. If description is not provided, it is prefilled by ConnectPay adding “Refund for {merchantReference
}” where merchantReference
is a reference provided in Initiate payment API.
For testing failed refunds a special amount can be used “66.06” in stage environment that results in refund time out.
If the request was successful, you will receive a response with HTTP code 201 and paymentId
together with actionId
in the response body. actionId
represent refund ID and can be used to retrieve status by calling Get payment details API or receiving webhook notification.
{
"payment": {
"paymentId": "5e864dad-4f10-4b91-bf3f-b8d0c9819d3a",
"actionId": "8c36b04b-fd6e-4442-b837-a3dcafcfc5ff"
},
"_links": {
"self": {
"href": "https://api2.connectpay.com/merchant/payments/5e864dad-4f10-4b91-bf3f-b8d0c9819d3a"
}
}
}
For cases where refund transaction is time outed by acquirer or card schemes immediatly reject such request, original transaction stays in original state (Approved, Settled), only actionId
will have Failed state.