It is the query service for the payment result. The current status of the payment is queried with the “paymentId” and “uuid” parameters of the payment transaction. The payment result is sent via the ”paymentResult” object.
For successfully completed payments; success = true , paymentStatusCode = 1 , paymentStatusMsg = “ success ” values are returned.
Method | Endpoint | Content-Type |
---|---|---|
POST | {{baseURL}}/paymapi/v1/transaction/getResult |
application/json |
Parameter | Type | Required | Description |
---|---|---|---|
credentials | obj | yes | API credentials |
apiKey | str | yes | API Key |
hash | str | yes | The hash value generated for this transaction. See: Hash calculation for payment query |
paymentId | int | yes | ID value for payment |
uuid | str | yes | UUID value for payment |
{
"credentials":{
"apiKey":"your-api-key",
"hash":"hash-for-transaction"
},
"paymentId": 55,
"uuid": "uuid-for-transaction"
}
Parameter | Type | Description |
---|---|---|
paymentId | int | ID value for payment |
paymentDate | str | Payment date |
paymentUuid | str | UUID value for payment |
hash | str | The hash value for the payment. See: Hash value check |
orderId | str | Order-specific, unique ID value |
orderTotal | flt | Payment total |
currencyCode | str | ISO 4217, three-digit currency code. |
items | obj arr | List of products subject to order |
name | str | Name of the product |
stockCode | str | Stock code of the product |
quantity | int | Product quantity |
price | flt | Product price |
customer | obj | Object containing customer information |
id | str | Customer-specific unique ID value |
group | str | Customer group. Default: Standard “STD” |
name | str | Customer name |
surname | str | Customer surname |
str | Customer email address | |
telephone | str | Customer phone number |
ssn | str | Customer ID number |
address | str | Customer address |
city | str | City |
country | str | Country |
zipCode | str | Zip Code |
ipAddr | str | Customer’s IP address |
paymentResult | obj | Payment result object |
success | bln | Payment success status |
paymentStatusCode | int | Payment status code |
paymentStatusMsg | str | Payment status message |
statusCode | int | Transaction status code |
statusMsg | str | Transaction status message |
{
"paymentId": 50,
"paymentDate": "2020-11-02 20:47:26",
"paymentUuid": "f021649c-b04b-43bf-8f47-1e52be9ee85f",
"hash": "n2Ehu802sgXF4LWEgLauwwYHu8GV6E=",
"orderId": "1212",
"orderTotal": 20,
"currencyCode": "TRY",
"items": [
{
"name": "Product 1",
"stockCode": "123456",
"quantity": 2,
"price": 5.5
},
{
"name": "Product 2",
"stockCode": "234567",
"quantity": 1,
"price": 9
}
],
"customer": {
"id": "007",
"group": "STD",
"name": "john",
"surname": "doe",
"email": "john.doe@somemail.com",
"telephone": "905554444433",
"ssn": "11122233344",
"address": "Mehterçeşme Mahallesi Cumhuriyet Cad. No:35 Kat:4 Esenyurt",
"city": "Istanbul",
"country": "Turkey",
"zipCode": "34515",
"ipAddr": "88.99.100.200"
},
"paymentResult": {
"success": true,
"paymentStatusCode": 1,
"paymentStatusMsg": "success"
},
"statusCode": 100,
"statusMsg": "OK"
}
The SHA1 algorithm is applied by adding “apiKey” + “uuid” + “secretKey” parameters, respectively. The hash value obtained is encoded as a base64 string.
base64(sha1(apiKey + uuid + secretKey))
Hash computing differs for each service.