Order Payment Failed Webhook
The ORDER_PAYMENT_FAILED webhook is sent when an attempt to pay an order fails.
Note
The endpoint for webhooks is unique for each client. To set up a webhook endpoint, see Defining a Webhook Endpoint.
Content-Type
Indicates that the data appears in JSON format. Set to application/json.
salt
Random string.
signature
Signature calculated for each webhook individually.
timestamp
Timestamp for the webhook, in Unix time (seconds).
created_at
Time that the webhook was created, in Unix time.
Note
Inside the
data
object, some webhooks have anothercreated_at
field that refers to a different event.
data
Contains the actual data of the webhook.
For details, see below.
extended_timestamp
Time in milliseconds that the webhook was created, in Unix time.
id
ID of the webhook. String starting with wh_.
status
Status of the webhook. One of the following:
NEW
CLO - Closed.
ERR - Error.
RET - Re-sent.
Note
Inside the
data
object, some webhooks have anotherstatus
field that refers to a different event.
trigger_operation_id
ID of the operation that triggered the webhook. UUID.
type
Name of the webhook type.
Note
The name in the Client Portal is different.
amount
Total amount of the order, the sum of the amount of the shipping' items, plus the
amount
of the tax, plusamount
timesquantity
of each of thesku
items. Decimal.
amount_returned
Total amount of returns against the order. Decimal.
coupon
ID of a coupon that is applied against this order.
created
When the order was created, in Unix time.
currency
Three-letter ISO 4217 code for the currency used in the
item
objects.
customer
ID of the customer. String starting with cus_.
email
Email address of the customer.
external_coupon_code
ID of a coupon that is applied against this order, defined by the merchant. If generated by Rapyd, a string starting with coupon_.
id
Unique ID of the Order object. If the merchant does not define an ID, Rapyd generates a string starting with order_.
items
Each item describes one charge in this invoice. There must be one item of
type
= shipping and at least one item oftype
= sku.amount
Price of one SKU unit, in the currency defined in
currency
. Decimal, including the correct number of decimal places for the currency exponent, as defined in ISO 2417:2015.
currency
Three-letter ISO 4217 code for the currency. Must be the same as the currency of the order and the currency of the customer's payment method.
description
Description of the item.
parent
ID of the SKU object that represents the product. One of the following:
ID of the SKU object. String starting with sku_
ID of the coupon. If generated by Rapyd, a string starting with coupon_.
quantity
Quantity of the product in the line item. Integer. Required when
type
is sku.
type
Type of line item. One of the following:
discount
shipping
sku
tax
metadata
A JSON object defined by the client. See Metadata.
payment
Describes the collection efforts being made against this order.
payment_method
Payment method ID. String starting with card_ or other_.
If not specified in this field, the payment method is the default payment method specified for the customer.
returns
A list of the returns charged against this order.
shipping_address
Address to receive the shipment.
address
Billing address associated with the payment. For details about the fields of the 'address' object, see Create Address.
status
Indicates the status of the order. One of the following:
created - Created.
pending - The collection process has been started.
paid - Paid in full.
canceled - The total amount of returns against this order equal the total amount of the order.
partial - Some of the products have been delivered to the customer.
fulfilled - The products have been delivered to the customer.
returned - A return has been processed against this order.
status_transitions
Indicates the last time in Unix time that the order transitioned to one of the following statuses. A zero value for a status indicates that the order has never transitioned to it.
canceled
fulfilled
paid
partial
pending
returned
tax_percent
Percentage of tax to charge. Decimal 0-100, up to four decimal places.
updated
Time the order was last updated, in Unix time.
upstream_id
Merchant-defined ID for the order.
ORDER_PAYMENT_FAILED Webhook
{ "id": "wh_a2f0c9d7c3e3f7a643235e49a23e73c0", "type": "ORDER_PAYMENT_FAILED", "data": {}, "trigger_operation_id": "695ff3d0-675b-4f97-b969-a35d8d597b1f", "status": "NEW", "created_at": 1643716162, "extended_timestamp": 1643716162932 }
The number of seconds elapsed since the beginning of the Unix epoch, which was 00:00:00 GMT on January 1, 1970. 10-digit integer.