OrderRefundedFailedv0.0.1
OrderRefundedFailed
This event is triggered when an order refund has been started but the operation failed.
OrderRefundedFailed Schema (json)
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "OrderRefundedFailed",
"required": [
"detail-type",
"resources",
"detail",
"id",
"source",
"time",
"region",
"version",
"account"
],
"type": "object",
"x-amazon-events-detail-type": "OrderRefundedFailed",
"x-amazon-events-source": "brink.external.v1",
"properties": {
"account": {
"type": "string"
},
"detail": {
"$ref": "#/definitions/Detail"
},
"detail-type": {
"type": "string"
},
"id": {
"type": "string"
},
"region": {
"type": "string"
},
"resources": {
"items": {
"type": "string"
},
"type": "array"
},
"source": {
"type": "string"
},
"time": {
"format": "date-time",
"type": "string"
},
"version": {
"type": "string"
}
},
"definitions": {
"Detail": {
"properties": {
"data": {
"$ref": "#/definitions/Data"
},
"metadata": {
"$ref": "#/definitions/Metadata"
}
},
"required": [
"metadata",
"data"
],
"type": "object"
},
"Metadata": {
"type": "object",
"required": [
"awsRequestId"
],
"properties": {
"awsRequestId": {
"type": "string"
}
}
},
"Data": {
"$ref": "#/definitions/OrderRefunded"
},
"OrderRefunded": {
"type": "object",
"required": [
"id",
"orderId",
"orderReference",
"paymentProvider",
"created",
"updated",
"failed",
"restarts",
"revision"
],
"properties": {
"id": {
"type": "string",
"description": "The refund id"
},
"orderId": {
"type": "string",
"description": "The order id"
},
"orderReference": {
"type": "string",
"description": "The order short reference"
},
"paymentProvider": {
"$ref": "#/definitions/ProviderStatus"
},
"shippingProvider": {
"$ref": "#/definitions/Provider"
},
"giftCardProvider": {
"$ref": "#/definitions/ProviderStatus"
},
"giftCardProductProvider": {
"$ref": "#/definitions/ProviderStatus"
},
"voucherProvider": {
"$ref": "#/definitions/Provider"
},
"bonusProvider": {
"$ref": "#/definitions/ProviderStatus"
},
"bonus": {
"$ref": "#/definitions/Bonus"
},
"fee": {
"$ref": "#/definitions/Fee"
},
"giftCards": {
"type": "array",
"items": {
"$ref": "#/definitions/GiftCard"
}
},
"giftCardProducts": {
"type": "array",
"items": {
"$ref": "#/definitions/GiftCardProduct"
}
},
"reason": {
"$ref": "#/definitions/Reason"
},
"created": {
"type": "string",
"format": "date-time",
"description": "Created date for the order refund"
},
"updated": {
"type": "string",
"format": "date-time",
"description": "Updated date for the order refund"
},
"started": {
"type": "string",
"format": "date-time",
"description": "Started date for the order refund"
},
"failed": {
"type": "string",
"format": "date-time",
"description": "Failed date for the order refund"
},
"restarts": {
"description": "The number of restarts",
"type": "integer"
},
"restarted": {
"type": "string",
"format": "date-time",
"description": "Restarted date for the order refund"
},
"revision": {
"description": "The revision number of the order refund",
"type": "integer"
}
}
},
"Provider": {
"type": "object",
"required": [
"providerId",
"providerName"
],
"properties": {
"providerId": {
"type": "string",
"description": "The id of the provider"
},
"providerName": {
"type": "string",
"description": "The name of the provider"
}
}
},
"ProviderStatus": {
"type": "object",
"required": [
"providerId",
"providerName",
"status"
],
"properties": {
"providerId": {
"type": "string",
"description": "The id for the provider"
},
"providerName": {
"type": "string",
"description": "The name of the provider"
},
"status": {
"$ref": "#/definitions/ProviderStatusLog"
}
}
},
"ProviderStatusLog": {
"type": "object",
"required": [
"current",
"history"
],
"properties": {
"current": {
"type": "string",
"description": "The latest status for the provider"
},
"history": {
"type": "array",
"items": {
"$ref": "#/definitions/ProviderStatusLogEntry"
}
}
}
},
"ProviderStatusLogEntry": {
"type": "object",
"required": [
"status",
"timestamp",
"type"
],
"properties": {
"message": {
"type": "string",
"description": "Optional message for the status"
},
"errorMessage": {
"type": "string",
"description": "Optional error message from the provider"
},
"status": {
"type": "string",
"description": "The actual status"
},
"timestamp": {
"type": "string",
"format": "date-time",
"description": "Timestamp for the status"
},
"type": {
"type": "string",
"description": "Status type"
}
}
},
"CurrencyCode": {
"title": "CurrencyCode",
"maxLength": 3,
"minLength": 3,
"pattern": "^[A-Z]{3}$",
"type": "string",
"description": "ISO 4217 currency code"
},
"Bonus": {
"type": "object",
"required": [
"reservationId",
"amount",
"currencyCode"
],
"properties": {
"reservationId": {
"type": "string",
"description": "The id of the bonus reservation"
},
"amount": {
"type": "integer",
"description": "Bonus amount"
},
"transactionId": {
"type": "string",
"description": "The id of the bonus transaction"
},
"currencyCode": {
"$ref": "#/definitions/CurrencyCode"
}
}
},
"Fee": {
"type": "object",
"description": "Optional refund fee for the refund. The fee only applies to the amount sent to the payment provider, not gift card or bonus points providers. It is only supported for the payment providers Adyen, KlarnaCheckout, and WalleyCheckout",
"required": [
"name",
"amount",
"currencyCode",
"taxAmount",
"taxPercentage",
"taxPercentageDecimals"
],
"properties": {
"name": {
"type": "string",
"description": "A descriptive name for the refund fee."
},
"amount": {
"type": "integer",
"description": "Refund fee amount in minor units"
},
"currencyCode": {
"$ref": "#/definitions/CurrencyCode"
},
"taxAmount": {
"type": "integer",
"description": "Refund fee tax amount in minor units"
},
"taxPercentage": {
"type": "integer",
"description": "Tax percentage, eg. taxPercentage=2500 and taxPercentageDecimals=2 -> 25.00 % tax"
},
"taxPercentageDecimals": {
"type": "integer",
"description": "Number of decimals in tax percentage, eg. taxPercentage=2500 and taxPercentageDecimals=2 -> 25.00 % tax"
}
}
},
"GiftCard": {
"type": "object",
"required": [
"giftCardId",
"amount",
"currencyCode",
"status"
],
"properties": {
"giftCardId": {
"type": "string",
"description": "The id for the gift card"
},
"amount": {
"type": "integer",
"description": "The amount for the gift card"
},
"currencyCode": {
"$ref": "#/definitions/CurrencyCode"
},
"status": {
"type": "string",
"description": "The status of the gift card"
},
"transactionId": {
"type": "string",
"description": "The id for the gift card refund transaction"
}
}
},
"GiftCardProduct": {
"type": "object",
"required": [
"giftCardProductId",
"priceAmount",
"currencyCode",
"status"
],
"properties": {
"giftCardProductId": {
"type": "string",
"description": "The id for the gift card product"
},
"amount": {
"type": "integer",
"description": "The amount for the gift card product"
},
"currencyCode": {
"$ref": "#/definitions/CurrencyCode"
},
"status": {
"type": "string",
"description": "The status of the gift card product creation"
},
"createTransactionId": {
"type": "string",
"description": "External transactional id of the gift card product creation"
},
"createFailedReason": {
"type": "string",
"description": "External failed reason for the gift card product creation"
},
"createId": {
"type": "string",
"description": "External id for the created gift card product"
},
"cancelTransactionId": {
"type": "string",
"description": "External transactional id of the gift card product cancellation"
},
"cancelErrorStatusCode": {
"type": "integer",
"description": "External http status code for the failed gift card product cancellation"
},
"cancelErrorMessage": {
"type": "string",
"description": "External error message for the failed gift card product cancellation"
}
}
},
"Reason": {
"type": "object",
"properties": {
"code": {
"type": "string",
"description": "Optional code for the reason, useful for BI tracking"
},
"cause": {
"type": "string",
"description": "Optional human readable cause for the reason"
}
}
}
}
}
Last updated on 2024/11/15