> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kibocommerce.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Payment Gateway Responses

The Kibo Composable Commerce Platform (KCCP) uses payment gateways to process credit card transactions. To process credit card transactions on your storefront, you must set up a payment gateway and then assign that gateway to payment types.

You can set up a payment gateway in Admin, on the **System** > **Settings** > **Payment Gateways** page. Refer to [Payment Gateways](/pages/payment-gateways) in the Guides section for more information.

## Payment Interactions

Payment information is stored in the [commerce/orders/payments](/api-overviews/openapi_commerce_overview) resource. You can view specific gateway response information under the `interactions` object on this payment, such as in:

```
"interactions": [
    {
        ...
        "gatewayAuthCode": "string",
        "gatewayAVSCodes": "string",
        "gatewayCVV2Codes": "string",
        "gatewayInteractionId": "int",
        "gatewayResponseCode": "string",
        "gatewayResponseData": [
            {
                "key": "string",
                "value": "string"
            }
        ],
        "gatewayResponseText": "string",
        "gatewayTransactionId": "string"
        ...
    }
]
```

Refer to the following sections for more information about the `gatewayResponseCode` and `gatewayResponseData` values.

## Gateway Response Code and Text

Each payment gateway returns specific gateway response codes and text that are unique to the payment gateway. The response code is stored in the `gatewayResponseCode` property and the response text is stored in the `gatewayResponseText` property.

For example, a response code of `32` from Authorize.Net would be displayed as:

```
"gatewayResponseCode": 32,
"gatewayResponseText": "The merchant password is invalid or not present."
```

Refer to your specific payment gateway's documentation for details about their specific response codes. Kibo displays the gateway response code and text in Admin, under the payments section on an order:

<img src="https://mintcdn.com/kibocommerce-59e68a4a/J4w9KvWH3YVo4Mms/img/1660066401302-orders_payment-response.png?fit=max&auto=format&n=J4w9KvWH3YVo4Mms&q=85&s=3c81344c40bde6e84a21cefd685080a5" alt="Callouts of the Response Code and Response Message in payment transaction history" width="1164" height="457" data-path="img/1660066401302-orders_payment-response.png" />

## Gateway Response Data

Kibo also captures additional response data that's unique to each gateway in the payment object. This response data is displayed as a list of key:value pairs in the `responseData` object:

```
{
    "authCode": "",
    "transactionId": "123",
    "aVSCodes": "",
    "cVV2Codes": "",
    "isSuccessful": true,
    "isDeclined": false,
    "isPending": false,
    "responseText": "OK",
    "responseCode": "200",
    "responseData": [
        {
            "key": "time",
            "value": "Thu Aug 29 2024 15:21:32 GMT+0000 (Coordinated Universal Time)"
        },
        {
            "key": "stuff",
            "value": "isGood"
        }
    ]
}
```

Note that the full response includes flags indicating whether the action was successful, declined, or pending. If `isPending=true` after initiating an authorization, capture, void, or credit, then the payment will be moved into [the appropriate pending state](/pages/payment-states "Payment States"):

* AuthorizePending
* CapturePending
* VoidPending
* CreditPending

The authorized, collected, and credited amounts will not be updated in the order payment data until it moves into a successful state.
