FILTER BY TAG

Receiving Transaction Responses Asynchronously

Use the information in this section to receive transaction responses asynchronously when the app is in Cloud mode. For information about a follow-on service for this type of request, see Check Transaction Events.
Generate a bearer token before sending each request. For more information, see Generating a Bearer Token for Authentication.

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

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 Check Transaction Status.

REST Example: Receive Transaction Responses Asynchronously

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 will receive an error response with details.
{ "type": "ErrorResponse", "message": "Error message to display.", "developerDescription": "Detailed description of error." }

Check Transaction Events

Use the information in this section 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.
Generate a bearer token before sending each request. For more information, see Generating a Bearer Token for Authentication.

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

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

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 will receive an error response with details.
{ "type": "ErrorResponse", "message": "Error message to display.", "developerDescription": "Detailed description of error." }