Skip to content

Refund

Info

This transaction type is available for: Cards and BLIK.

The purpose of this operation is to refund the amount of a previous payment, crediting the cardholder account and debiting the Merchant account.

A refund is performed against a previous payment, referencing its transactionID by sending a POST request over HTTPS to the /payments/{transactionID}/refund endpoint.

A refund can be performed:

  • against purchase (PURS)
  • against captured preauthorisation (AUTH -> Capture).

And it can be:

  • a full refund when the total amount of the purchase is refunded to the cardholder
  • a partial refund when a subtotal of the total purchase is refunded to the cardholder.
Generate the transaction:
POST https://stargate-cer.qly.site1.sibs.pt/api/v1/payments/{transactionID}/refund
Header parameters
Content-type

string

Mandatory

application/json

Show more
Authorization

string

Mandatory

Bearer Token. Based on OAuth2 authentication performed in a pre-step.

Show more
x-ibm-client-id

string

Mandatory

Token that identifies a client organization. It is provided during onboarding process and must be used in every call.

Show more
Request parameters
merchant

object

Mandatory

An optional element to query transaction status.

Show more
terminalID

numeric [<= 10 characters]

Mandatory

Merchant Terminal Identification.

Show more
channel

string

Mandatory

Merchant channel, Possible Value “Web”.

Show more
merchantTransactionID

string

Mandatory

Unique Id used by the Merchant.

Show more
transaction

object

Mandatory

An optional element to query transaction status.

Show more
transactionTimeStamp

Date ISODate Time

Mandatory

Transaction timestamp.

Show more
description

string <= 70 characters

Mandatory

Transaction short description.

Show more
amount
Mandatory

Parameter with the value and currency of the transaction.

Show more
value

number Double

Mandatory

Amount in the transaction.

Show more
currency

Currency Code
SO 4217 Alpha-3 Code

Mandatory
Show more
originalTransaction
Mandatory

Parameter with the original transaction.

Show more
Id

string

Mandatory

Unique identifier of the original transaction.

Show more
date time

date ISODate Time

Mandatory

Timestamp of the original transaction.

Show more

Here’s an example:

Request Header:
Autorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6I (...)
X-IBM-Client-Id: b4480347-9fc8-4790-b359-100a99c60ea3
Content-Type: application/json
{
 "merchant": {
 "terminalId": 24,
 "channel": "web",
 "merchantTransactionId": "BO_Order Id: c9876bcasd"
 },
 "transaction": {
 "transactionTimestamp": "2022-05-29T18:23:41.367Z",
 "description": "This is a refund request",
 "amount": {
 "value": 10,
  "currency": "PLN"
 },
 "originalTransaction": {
 "id": "mvuy3dh3wucpsi4389fh",
 "datetime": "2022-05-29T17:23:36.105Z"
 }
 }
}