Skip to main content
Version: v2.0.4 latest

Get Payment Status

retrieve a Payment object using Payment ID.

API Endpoint:

GET https://uat-sandbox-3ds-api.qi.iq/api/v1/payment/{paymentId}/status

Headers

NameTypeDescriptionRequired
X-Terminal-IdStringThe ID of the Merchant Terminal. Provided by the Acquirer.Yes

Parameters

NameTypeDescriptionRequired
paymentIdStringthe ID of the payment transaction that want to be refunded.Yes

CURL Example

curl --location '<API_HOST>/api/v1/payment/{paymentId}/status' \
--header 'X-Terminal-Id: {terminalId}' \
--header 'Authorization: Basic <Base64<username:password>>' \

Response Details

200 OK Response

You will receive the following payment object:

{
"requestId": "4256ab83-de74-450f-b442-8fb995458243",
"paymentId": "f2bb43a8-488a-4281-977b-5b3418fc3c67",
"status": "CREATED",
"canceled": true,
"amount": 5500.15,
"currency": "IQD",
"creationDate": "2024-08-04T15:34:33Z",
"formUrl": "https://uat-sandbox-3ds-api.qi.iq/api/v1/payment/f2bb43a8-488a-4281-977b-5b3418fc3c67",
"additionalInfo": {
"key1": "value1"
}
}

200 OK Response fields

OptionsTypeDescription
requestIdstringA unique identifier generated by the Merchant's side. It must be ensured that the RequestId remains unique within the context of each Merchant Terminal to prevent duplication or conflicts.
paymentIdstringPayment ID (Transaction ID): the payment transaction reference ID in the Payment Gateway system
statusstringthe payment transaction status value, possible values are: SUCCESS, FAILED, CREATED & AUTHENTICATION_FAILED
canceledbooleanA boolean value indicate if the payment got canceled or not.
amountnumber Specifies the total payment amount, including any applicable fees or commissions from the merchant. This field is required for all payment transactions but should be absent for non-payment transactions. Note non-payment transactions are used to collect card information without processing any payment. This type of transaction is useful when card details are needed for future use, but no immediate charge is required.
currencystringThe ISO 4217 code represents the currency for the payment, for example: IQD - Iraqi Dinar, The value must be exactly 3 characters long, Max value = 3, Min value = 3
creationDatestringPayment object creation date, follows the ISO 8601 standard, example: '2024-08-04T15:34:33Z'.
formUrlstringThis object contains details about the customer making the payment and is optional for the merchant's side to include when using the create payment request. It helps the merchant track which customer is paying, offering visibility into their payments.
additionalInfoobjectAdditional information about the payment.

400 Bad Request

{
"error": {
"code": 27,
"description": "Authentication required: Incorrect credentials"
}
}

500 Server Error

{
"error": {
"code": 23,
"description": "INTERNAL_SYSTEM_ERROR"
}
}