Returning an order

Ordering money return for the given transaction.

POST /v1/izi/transaction/{transaction_id}/refund

Parameters

Field name

Description

Type

Requirement status

Additional remarks

X-Command-ID

Unique ID necessary to check idempotencji.

string($uuid)

 

Y

 

transaction_id

Unique transaction ID assigned by the payment services provider.

string($uuid)

 

Y

 

 

Request

Field name

Description

Type

Requirement status

Additional remarks

external_refund_id

Refunding order's ID assigned by the merchant.

string

O

 

refund_amount

Return amount. If it is not determined, the full refund will be requested.

number

O

 

additional_business_data

Additional data associated with return order.

object

O

 

additional_business_data.additional_data

string

O

 

signature

Sygnatura*

string

Y

 

 

Sygnatura*:

Message signature required to verify the authenticity of the request. Calculated by combining the values of the X-Command-ID header, the transaction_id path variable, all the field values in the request content (ignoring the signature field) in alphanumeric order and the merchant's secret (if any of the values has the null value, it should be treated as an empty string). The final signature is a lowercase hexadecimal hash of the hash function applied to the associated message.

The hash functions supported are: SHA-512

Default hash function: SHA-512 SHA-512

If the hash function used is different than the default one, the signature must be preceded by its ID and the sign "_".

Merchant Secret, is a random string of characters, which can be found in the Merchant's panel in the tab Konfiguracja Merchant Transaction API secret.

Example 1:

Merchant Secret: 0051db3ab9ea4351bfebbcbe1adcc045

X-Command-ID: f3daf649-30bd-4578-a3bc-89ee822e2887

transaction_id: c50c3756-7ca1-431d-8b4e-4fc322b18548

request_body: { "signature": "TBD", "refund_amount": 1.23, "external_refund_id": "0b374857-2096-46e0-a9d6-26f313073d32", "additional_business_data": { "key1": "value1", "key2": "value2", } }

Intermediate signature: f3daf64930bd-4578-a3bc-89ee822e2887c50c3756-7ca1-431d-8b4e-4fc322b18548key1value1key2value20b374857-2096-46e0-a9d6-26f313073d321.230051db3ab9ea4351bfebbcbe1adcc045

Valid Signatures: 1832a9a561c7f95782e8e10da5f6d181d31b4537ba168fb2bf903cd3cb9455433e6537b4f2da7bd0ec129888a265d609acf6efa1144763f2085866604db63ecd

SHA-512_1832a9a561c7f95782e8e10da5f6d181d31b4537ba168fb2bf903cd3cb9455433e6537b4f2da7bd0ec129888a265d609acf6efa1144763f2085866604db63ecd

Example 2:

Merchant Secret: 0051db3ab9ea4351bfebbcbe1adcc045

X-Command-ID: f3daf649-30bd-4578-a3bc-89ee822e2887

transaction_id: c50c3756-7ca1-431d-8b4e-4fc322b18548

request_body: { "signature": "TBD", "refund_amount": null, "external_refund_id": null }

Intermediate signature: f3daf649-30bd-4578-a3bc-89ee822e2887c50c3756-7ca1-431d-8b4e-4fc322b185480051db3ab9ea4351bfebbcbe1adcc045

Valid Signatures: 186c45bb02603c37325233a8e5471adda94eed27caeb27f3289c678c48a496367db1937d045d8421d914b94502d92d3a9a2fe52e566fbcb8a2e6330add4a663c

SHA-512_186c45bb02603c37325233a8e5471adda94eed27caeb27f3289c678c48a496367db1937d045d8421d914b94502d92d3a9a2fe52e566fbcb8a2e6330add4a663c

Response

Field name

Description

Type

Requirement status

Additional remarks

external_refund_id

Refunding order's ID assigned by the merchant.

string

Y

 

refund_amount

Return amount. If it is not determined, the full refund will be requested.

number

Y

 

status

Return's current status

Enum:

[ PENDING, SUCCESS, FAILED ]

string

Y

 

description

Returning order description

string

Y