Transaction Failure: eventTransactionFailure

The Transaction Failure event API captures details related to failed transactions, such as declined payments or system errors. It records the reason for the failure, product details, and any relevant customer information.

API Endpoint and Method

URL

Copy
https://rcdp-us-east-1.algonomy.com/callback/rest/events/{APP_API_KEY}/eventTransactionFailure

Example URL

Copy
https://rcdp-us-east-1.algonomy.com/callback/rest/events/BESQILOBZCGHVLZTCNTGJMYGQEARWVZVCUPYVUGNCZPJRSUDAR/eventTransactionFailure

HTTP Method

POST

Parameters

Parameter

Type Required or Optional

Description

transactionId String Optional

Unique identifier of the transaction.

Example: "727"

tenderType

String

Optional

Payment method used, such as cash, card, or net banking.

Example: "cash"

checkoutType

String

Optional

Type of checkout, such as guest or logged-in user.

Example: "0"

totalPrice Float Required

Total price of the transaction.

Example: 227.33

shippingCost

Float

Optional

Shipping cost applied.

Example: 0.0000

discount

Float

Optional

Discount applied.

Example: 0

couponCode

String

Optional

Coupon code applied.

Example: null

reason

String

Optional

Reason for the transaction failure.

Example: "Payment Failure"

cartProducts

Object

Required

Details of the products in the failed transaction (see sub-parameters below).

billingInfo Object Optional

Billing details (see sub-parameters below).

shippingInfo Object Optional

Shipping details (see sub-parameters below).

cartId

String

Required

Specifies the cart ID.

Cart Product

Parameter

Type Required or Optional

Description

productId

String Required

Unique identifier of the product.

Example: "814"

productPosition

Integer Optional

Position of the product in the cart.

Example: 1

action String Optional

Action performed, such as transaction failure.

Example: "eventTransactionFailure"

quantity

Integer

Required

Specifies the number of items in the cart.

Example: 1

productBasePrice

Float

Required

Base price of the product.

Example: 210.00

tax

Float

Optional

Tax applied to the product.

Example: 17.33

sku

String

Required

SKU of the product.

Example: "sku"

discount

Float

Optional

Discount applied to the product.

Example: 0.0000

couponCode

String

Optional

Coupon code applied to the product.

Example: null

Billing and Shipping Info Parameters

Parameter

Type Required or Optional

Description

firstName

String Optional

Specifies the first name of the customer.

Example: "John"

lastName

String Optional

Specifies the last name of the customer.

Example: ”Smith”

line1

String Optional

Specifies the 'address line 1' of the customer.

Example: "4/40"

line2

String Optional

Specifies the 'address line 2' of the customer.

Example: ”Boulevard Road”

cityCode

String

Optional

Specifies the city code or city name.

Example: "Chicago"

stateCode

String

Optional

Specifies the state code.

Example: ”IL”

zip

String

Optional

Specifies the ZIP code.

Example: 60001

countryCode

String

Optional

Specifies the country code.

Example: "IN"

emailAddress

String

Optional

Specifies the email ID of the customer.

Example: "john.smith@example.com"

phoneNumber

String

Optional

Specifies the phone number of the customer.

Example: "1234567890"

totalItemCount

Integer

 

Specifies the total number of items.

Example: 10

Request Body Schema

Copy
{
  "eventData":{
    "eventType":"String",
    "transactionId":"String",
    "orderId":"String",
    "tenderType":"String",
    "checkoutType":"String",
    "totalPrice":"Float",
    "shippingCost":"Float",
    "discount":"Float",
    "couponCode":"String",
    "reason":"String",
    "cartProducts":[
      {
        "productId":"String",
        "productPosition":"Integer",
        "action":"String",
        "quantity":"Integer",
        "productBasePrice":"String",
        "tax":"Float",
        "discount":"Float",
        "couponCode":"String",
        "childProductId":"String"
      }
    ],
    "billingInfo":{
      "firstName":"String",
      "lastName":"String",
      "line1":"String",
      "line2":"String",
      "cityCode":"String",
      "stateCode":"String",
      "zip":"String",
      "countryCode":"String",
      "emailAddress":"String",
      "phoneNumber":"String",
      "totalItemCount":"Integer"
    },
    "shippingInfo":{
      "firstName":"String",
      "lastName":"String",
      "line1":"String",
      "line2":"String",
      "cityCode":"String",
      "stateCode":"String",
      "zip":"String",
      "countryCode":"String",
      "emailAddress":"String",
      "phoneNumber":"String",
      "totalItemCount":"Integer"
    }
  }
}

Example Request

Copy
{
  "eventData":{
    "eventType":"eventTransactionFailure",
    "transactionId":"727",
    "orderId":"123",
    "tenderType":"cash",
    "checkoutType":0,
    "totalPrice":227.33,
    "shippingCost":0.0000,
    "discount":0,
    "couponCode":null,
    "reason":"Payment Failure",
    "cartProducts":[
      {
        "productId":"814",
        "productPosition":1,
        "action":"eventTransactionFailure",
        "quantity":1,
        "productBasePrice":210.0000,
        "tax":17.3300,
        "discount":0.0000,
        "couponCode":null,
        "childProductId":"605"
      }
    ],
    "billingInfo":{
      "firstName":"John",
      "lastName":"Smith",
      "line1":"4/40",
      "line2":"Boulevard Road",
      "cityCode":"Chicago",
      "stateCode":"IL",
      "zip":"60001",
      "countryCode":"IN",
      "emailAddress":"john.smith@example.com",
      "phoneNumber":"1234567890",
      "totalItemCount":10
    },
    "shippingInfo":{
      "firstName":"John",
      "lastName":"Smith",
      "line1":"4/40",
      "line2":"Boulevard Road",
      "cityCode":"Chicago",
      "stateCode":"IL",
      "zip":"60001",
      "countryCode":"IN",
      "emailAddress":"john.smith@example.com",
      "phoneNumber":"1234567890",
      "totalItemCount":10
    }
  }
}

Example Response

Copy
{
  "status": "failure",
  "message": "Transaction failed due to payment error."
}

HTTP Response Codes

Response Code

Description

202 Accepted The request has been received and validated, but processing is asynchronous and not yet complete.