Receiving Transaction Responses Asynchronously {#sis-pymnt-svcs-cloud-txn-resp-async-api-intro}
===============================================================================================

Use this information to receive transaction responses asynchronously when the app is in Cloud mode. There is a follow-on service for this type of request. For more information, see [Check Transaction Events](/docs/cybs/en-us/sis-pax/integration/all/rest/sis-pax/sis-pymnt-svcs-cloud-mode-intro/sis-pymnt-svcs-cloud-txn-resp-async-api-intro/sis-pymnt-svcs-cloud-check-txn-events-intro.md "").  
Generate a bearer token before sending each request. For more information, see [Generating a Bearer Token for Authentication](/docs/cybs/en-us/sis-pax/integration/all/rest/sis-pax/sis-pymnt-svcs-cloud-mode-intro/sis-pymnt-svcs-cloud-mode-bearer-tkn-intro.md "").

Endpoints
---------

**Test:** `POST https://terminalstest.cybersource.com/v1/cloud/transactions/async`  
**Production:** `POST https://terminals.cybersource.com/v1/cloud/transactions/async`

Receive Transaction Responses Asynchronously {#sis-pymnt-svcs-cloud-txn-resp-async-api-task}
============================================================================================

Asynchronous endpoints can be used to receive transaction responses for most types of transaction requests when the app is in Cloud mode.  
Follow these steps to receive transaction responses asynchronously:

1. Use the asynchronous endpoints shown in the example to process a transaction and receive an interaction identifier. The example shows how to process a sale asynchronously.
2. After the transaction is completed, use the interaction identifier returned in the response to check the transaction events and to get a transaction identifier.
3. Use the transaction identifier to process a Check Transaction Status request. The response will contain full transaction and receipt details. For more information, see [Requesting a Check Transaction Status](/docs/cybs/en-us/sis-pax/integration/all/rest/sis-pax/sis-pymnt-svcs-cloud-mode-intro/sis-pymnt-svcs-cloud-txn-status-api-intro.md "").

REST Example: Receive Transaction Responses Asynchronously {#sis-pymnt-svcs-cloud-txn-resp-async-sale-api-ex-rest}
==================================================================================================================

Request

```
{
    "serialNumber": "1850000000",
    "request": {
        "type": "PaymentRequest",
        "merchantReferenceCode": "058ed6c3430e436dab91b782f4113fd2",
        "amountDetails": {
            "amount": "1.00",
            "currency": "GBP"
        }
    }
}
```

Response to a Successful Request

```
{
    "interactionId": "0c292d7f-6bf9-460c-afc3-d75c189f2f99"
}
```

Response to an Unsuccessful Request  
When the request is unsuccessful, you receive an error response with details.

```
{
      "type": "ErrorResponse",
      "message": "Error message to display.",
      "developerDescription": "Detailed description of error."
}
```

Check Transaction Events {#sis-pymnt-svcs-cloud-check-txn-events-intro}
=======================================================================

Use this information to process a Check Transaction Events request when the app is in Cloud mode. This type of request is a follow-on service for receiving transaction responses asynchronously. For more information, see [Receiving Transaction Responses Asynchronously](/docs/cybs/en-us/sis-pax/integration/all/rest/sis-pax/sis-pymnt-svcs-cloud-mode-intro/sis-pymnt-svcs-cloud-txn-resp-async-api-intro.md "").  
Generate a bearer token before sending each request. For more information, see [Generating a Bearer Token for Authentication](/docs/cybs/en-us/sis-pax/integration/all/rest/sis-pax/sis-pymnt-svcs-cloud-mode-intro/sis-pymnt-svcs-cloud-mode-bearer-tkn-intro.md "").

Endpoints
---------

The GET request must include the interaction identifier (`interactionId`).  
**Test:** `GET https://terminalstest.cybersource.com/v1/cloud/interactions/{interactionId}/events`  
**Production:** `GET https://terminals.cybersource.com/v1/cloud/interactions/{interactionId}/events`

Required Fields to Check Transaction Events {#sis-pymnt-svcs-cloud-check-txn-events-reqfields}
==============================================================================================

The body of the API request is empty. The GET request must include the information required to return the response. If you want to receive only the latest transaction event, set a query parameter of `limit=1`.

REST Example: Check Transaction Events {#sis-pymnt-svcs-cloud-check-txn-events-api-ex-rest}
===========================================================================================

Request  
The body of the request is empty. The GET request includes the information required to return the response.

```
{
}
```

Response to a Successful Request

```
{
    "interactionId": "0c292d7f-6bf9-460c-afc3-d75c189f2f99",
    "transactionEvents": [
        {
            "type": "PaymentResponse",
            "message": "Payment approved",
            "transactionId": "c9f966ef0e0e4a9186c0cfb75c90841a",
            "createdAt": "2024-05-28 13:11:30:939"
        },
        {
            "type": "TransactionStatusResponse",
            "message": "Payment approved",
            "createdAt": "2024-05-28 13:11:30:556"
        },
        {
            "type": "TransactionStatusResponse",
            "message": "Processing payment...",
            "createdAt": "2024-05-28 13:11:28:928"
        },
        {
            "type": "TransactionStatusResponse",
            "message": "1.00 GBP - Present card",
            "createdAt": "2024-05-28 13:11:28:093"
        },
        {
            "type": "TransactionStatusResponse",
            "message": "1.00 GBP - Present card",
            "createdAt": "2024-05-28 13:11:27:439"
        },
        {
            "type": "TransactionStatusResponse",
            "message": "1.00 GBP - Present card",
            "createdAt": "2024-05-28 13:11:27:217"
        },
        {
            "type": "TransactionStatusResponse",
            "message": "Registering transaction",
            "createdAt": "2024-05-28 13:11:27:022"
        },
        {
            "type": "TransactionStatusResponse",
            "message": "Registering transaction",
            "createdAt": "2024-05-28 13:11:26:485"
        },
        {
            "type": "TransactionStatusResponse",
            "message": "Connecting to card reader",
            "createdAt": "2024-05-28 13:11:24:649"
        },
        {
            "type": "AcknowledgementResponse",
            "createdAt": "2024-05-28 13:11:23:823"
        }
    ]
}
```

Response to an Unsuccessful Request  
When the request is unsuccessful, you receive an error response with details.

```
{
      "type": "ErrorResponse",
      "message": "Error message to display.",
      "developerDescription": "Detailed description of error."
}
```

