Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changeset/lazy-spies-laugh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@epcc-sdk/sdks-cart-checkout-order": patch
"@epcc-sdk/sdks-shopper": patch
---

add failure details type in transactions
13 changes: 13 additions & 0 deletions packages/sdks/cart-checkout-order/src/client/types.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1912,6 +1912,19 @@ export type TransactionResponse = {
* The status provided by the gateway for this transaction, such as `complete` or `failed`.
*/
status?: string
/**
* Non-PII payment failure information from the payment gateway. Only present on failed transactions where the gateway provided structured failure details.
*/
failure_details?: {
/**
* Machine-readable failure or error code from the payment gateway.
*/
code?: string
/**
* Human-readable failure reason or error message from the payment gateway.
*/
reason?: string
}
relationships?: {
order?: {
data?: {
Expand Down
29 changes: 29 additions & 0 deletions packages/sdks/shopper/src/client/types.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3039,6 +3039,10 @@ export type ShippingGroupResponse = {
order_id?: string
shipping_type?: string
tracking_reference?: string
/**
* An optional external ID reference for a shipping group. It can contain alphanumeric characters, special characters, and spaces, and is not required to be unique. The maximum allowed length is 64 characters. It can be used to include an external reference from a separate company system.
*/
external_ref?: string
address?: ShippingAddress
delivery_estimate?: DeliveryEstimate
createdAt?: Date
Expand All @@ -3064,6 +3068,10 @@ export type CreateShippingGroupRequest = {
type?: "shipping_group"
shipping_type?: string
tracking_reference?: string
/**
* An optional external ID reference for a shipping group. It can contain alphanumeric characters, special characters, and spaces, and is not required to be unique. The maximum allowed length is 64 characters.
*/
external_ref?: string
shipping_price?: ShippingPriceRequest
address?: ShippingAddress
includes_tax?: boolean
Expand All @@ -3076,6 +3084,10 @@ export type UpdateCartShippingGroupRequest = {
type?: "shipping_group"
shipping_type?: string
tracking_reference?: string
/**
* An optional external ID reference for a shipping group. It can contain alphanumeric characters, special characters, and spaces, and is not required to be unique. The maximum allowed length is 64 characters.
*/
external_ref?: string
shipping_price?: ShippingPriceRequest
address?: ShippingAddress
includes_tax?: boolean
Expand Down Expand Up @@ -3882,6 +3894,19 @@ export type TransactionResponse = {
* The status provided by the gateway for this transaction, such as `complete` or `failed`.
*/
status?: string
/**
* Non-PII payment failure information from the payment gateway. Only present on failed transactions where the gateway provided structured failure details.
*/
failure_details?: {
/**
* Machine-readable failure or error code from the payment gateway.
*/
code?: string
/**
* Human-readable failure reason or error message from the payment gateway.
*/
reason?: string
}
relationships?: {
order?: {
data?: {
Expand Down Expand Up @@ -3988,6 +4013,10 @@ export type UpdateOrderShippingGroupRequest = {
type?: "shipping_group"
shipping_type?: string
tracking_reference?: string
/**
* An optional external ID reference for a shipping group. It can contain alphanumeric characters, special characters, and spaces, and is not required to be unique. The maximum allowed length is 64 characters.
*/
external_ref?: string
address?: ShippingAddress
delivery_estimate?: DeliveryEstimate
}
Expand Down
16 changes: 16 additions & 0 deletions packages/sdks/specs/cart_checkout.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6972,6 +6972,22 @@ components:
type: string
examples:
- complete
failure_details:
description: >-
Non-PII payment failure information from the payment gateway. Only present on
failed transactions where the gateway provided structured failure details.
type: object
properties:
code:
description: Machine-readable failure or error code from the payment gateway.
type: string
examples:
- "2"
reason:
description: Human-readable failure reason or error message from the payment gateway.
type: string
examples:
- This transaction has been declined.
relationships:
type: object
properties:
Expand Down
54 changes: 54 additions & 0 deletions packages/sdks/specs/shopper.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18766,6 +18766,17 @@ components:
type: string
tracking_reference:
type: string
external_ref:
description: >-
An optional external ID reference for a shipping group. It can
contain alphanumeric characters, special characters, and spaces, and
is not required to be unique. The maximum allowed length is 64
characters. It can be used to include an external reference from a
separate company system.
type: string
maxLength: 64
examples:
- SG-12345
address:
$ref: '#/components/schemas/ShippingAddress'
delivery_estimate:
Expand Down Expand Up @@ -18814,6 +18825,14 @@ components:
type: string
tracking_reference:
type: string
external_ref:
description: >-
An optional external ID reference for a shipping group. It can
contain alphanumeric characters, special characters, and spaces,
and is not required to be unique. The maximum allowed length is
64 characters.
type: string
maxLength: 64
shipping_price:
$ref: '#/components/schemas/ShippingPriceRequest'
address:
Expand All @@ -18836,6 +18855,14 @@ components:
type: string
tracking_reference:
type: string
external_ref:
description: >-
An optional external ID reference for a shipping group. It can
contain alphanumeric characters, special characters, and spaces,
and is not required to be unique. The maximum allowed length is
64 characters.
type: string
maxLength: 64
shipping_price:
$ref: '#/components/schemas/ShippingPriceRequest'
address:
Expand Down Expand Up @@ -20013,6 +20040,25 @@ components:
type: string
examples:
- complete
failure_details:
description: >-
Non-PII payment failure information from the payment gateway. Only
present on failed transactions where the gateway provided structured
failure details.
type: object
properties:
code:
description: Machine-readable failure or error code from the payment gateway.
type: string
examples:
- '2'
reason:
description: >-
Human-readable failure reason or error message from the payment
gateway.
type: string
examples:
- This transaction has been declined.
relationships:
type: object
properties:
Expand Down Expand Up @@ -20174,6 +20220,14 @@ components:
type: string
tracking_reference:
type: string
external_ref:
description: >-
An optional external ID reference for a shipping group. It can
contain alphanumeric characters, special characters, and spaces,
and is not required to be unique. The maximum allowed length is
64 characters.
type: string
maxLength: 64
address:
$ref: '#/components/schemas/ShippingAddress'
delivery_estimate:
Expand Down
Loading