After the service sends a payment request via KONG to “Payment Service,” the user is shown the purchase request/approval. Payment responses are sent asynchronously to the service. “Listener Service” is triggered after the user completes the approval message. Responses are posted to the service-provided, preconfigured URLs (see Payment General).
Listener callback payload format:
Provided by the service application.
{
"resultCode":0,
"resultDesc":"SUCCESS",
"transactionId":"189093139",
"shippingAddress":
{
"addressId":"29",
"alias":"ev",
"name":"Bill",
"surname":"Gates",
"city":"Istanbul",
"address":"Barbados Bulvari",
"district":"Besiktas",
"isDefault":true
},
"billingAddress":
{
"addressId":"29",
"alias":"ev",
"name":"Bill",
"surname":"Gates",
"city":"Istanbul",
"address":"Barbados Bulvari",
"district":"Besiktas",
"isDefault":true
},
"paymentMethod":"reserve",
"itemList":
[
{
"itemId":50,
"itemName":"Coca-Cola",
"itemPrice":56.0,
"currency":"TL",
"itemCount":2,
"iRemovable" false
}
],
"totalAmount":73.25,
"orderDate":"25.11.2016 14:36:02",
"currency":"TL",
"channelId":40
}
| Field | Type | Description |
|---|---|---|
| resultCode | int | Return code id value |
| resultDesc | String | Return description |
| transactionId | String | Request id value |
{
"transactionId": "2016080230541319",
"resultCode": 0,
"resultDesc": "SUCCESS",
"additionalInfo": {
"commitToken": "12345432"
}
}
| Field | Type | Description |
|---|---|---|
| resultCode | int | Return code id value |
| resultDesc | String | Return description |
| transactionId | String | Request id value |
| additionalInfo | String | If payment channel=10 (reserve&commit), commitToken is provided; for other channels this field is absent. Token is used to call Commit Service |