# order_status webhook

Briqpay sends `POST` to your webhook URL. This is not an endpoint you call. Section: Outgoing Webhooks.

Sent when the order status changes.  
This webhook is triggered when a transaction is created or its status changes (e.g., approved, rejected, cancelled).  
The full `transaction` object is included in the payload.  
  
Your `externalReferences` from the session are always included as additional properties in the payload.

## Payload

- `event` (string, required, one of: `"order_status"`): The event type.
- `status` (string, required, one of: `"order_pending"`, `"order_rejected"`, `"order_cancelled"`, `"order_approved_not_captured"`): The new order status.
- `sessionId` (string, required): The session ID.
- `transaction` (object)
  - `createdAt` (string): ISO 8601 format, example: "2023-04-12T13:16:08.647Z".
  - `expiresAt` (string): ISO 8601 format, example: "2023-04-12T13:16:08.647Z".
  - `transactionId` (string)
  - `reservationId` (string): The primary reference for the payment in the PSP’s system. This is typically used for reconciliation and to locate the order in the PSP’s portal or customer service tools.
  - `secondaryReservationId` (string): If the PSP provides an additional important reference (e.g., one shown in reports or reconciliation files), it will be returned here. It serves the same purpose as reservationId: to help with reconciliation and order lookups.
  - `pspId` (string): Unique UUID identifier of the payment method.
  - `pspDisplayName` (string): Localized name of the payment method that is showed to end users.
  - `pspIntegrationName` (string): Name of the payment integration that helps merchants distinguish the payment method processor used. For payment methods integrated via a payment suite (e.g. Adyen, Stripe), this will be in the format: "{Suitename} - {payment method name}" (e.g., "Adyen - Card payments"). For direct integrations (e.g., PayPal, Klarna, Swish), this will be the name of the payment method provider (e.g., "PayPal"). This name is not intended for the end user to see.
  - `email` (string)
  - `phoneNumber` (string): If applicable, the phone number that was used to pay. Otherwise, the phone number from the billing address object.
  - `reference` (string)
  - `amountIncVat` (integer): Amount including vat/tax. Should be in cents / minor units. e.g. 1 SEK = 100. ISK, JPY and KRW also use two-decimal minor units: 10,000 ISK is sent as 1000000. For ISK, JPY and KRW, amountIncVat on sessions, captures and refunds must be a whole unit (a multiple of 100), otherwise the request is rejected with 400 INVALID_DATA.
  - `amountExVat` (integer): Amount excluding vat/tax. Should be in cents / minor units. e.g. 1 SEK = 100. ISK, JPY and KRW also use two-decimal minor units: 10,000 ISK is sent as 1000000.
  - `currency` (string): Example: SEK, EUR, USD
  - `status` (string, one of: `"pending"`, `"approved"`, `"rejected"`, `"cancelled"`, `"cancel_pending"`, `"expired"`): `cancel_pending` means a cancellation has been requested and is awaiting confirmation from the payment provider. `expired` means the authorization is no longer valid and the order can no longer be captured.
  - `captureStatus` (string, one of: `"not_captured"`, `"partially_captured"`, `"fully_captured"`, `"partially_captured_and_released"`): Capture state of the transaction. `partially_captured_and_released` means a partial amount was captured and the remaining uncaptured amount has been permanently released, so nothing further can be captured.
  - `refundStatus` (string, one of: `"not_refunded"`, `"partially_refunded"`, `"captured_amount_fully_refunded"`)
  - `sessionId` (string)
  - `cart` (array, each one of 3 shapes)
    - One of, option 1 (Regular items):
      - `productType` (string, required, one of: `"physical"`, `"digital"`, `"discount"`, `"shipping_fee"`, `"deposit"`, `"surcharge"`, `"adjustment"`): Type of item. 'discount' - the unitPrice should be negative. 'adjustment' - Can only be used on refunds.
      - `name` (string, required, max length 256)
      - `reference` (string, nullable, max length 256): The SKU of the item
      - `quantity` (integer, required, min 1)
      - `quantityUnit` (string, required, max length 10)
      - `taxRate` (integer, required): The applicable taxrate in minor units. Eg 25% = 2500
      - `unitPrice` (integer, required): Unit price in minor units (e.g. 1 EUR = 100 unitPrice). Should be excluding VAT and excluding discount. ISK, JPY and KRW also use two-decimal minor units: 10,000 ISK is sent as 1000000.
      - `unitPriceIncVat` (integer, nullable): Unit price including VAT but excluding any discounts, in minor units. (1 EUR = 100 unitPriceIncVat). ISK, JPY and KRW also use two-decimal minor units: 10,000 ISK is sent as 1000000. unitPrice * (1 + taxRate / 10000)
      - `discountPercentage` (integer, nullable): Discount value in percentages. 10% = 1000
      - `unitDiscountAmountIncVat` (integer, nullable): Fixed discount amount per unit in minor units, including VAT (e.g. 1 EUR = 100). This represents the discount amount applied to each individual unit after VAT calculation. When both discountPercentage and unitDiscountAmountIncVat are provided, they must be consistent within ±1 minor unit, otherwise a validation error will occur.
      - `totalAmount` (integer, nullable): Total amount for the order line in minor units (e.g. 1 EUR = 100 totalAmount). This value should include VAT, any applied discounts, and multiplied by quantity. ISK, JPY and KRW also use two-decimal minor units: 10,000 ISK is sent as 1000000. (unitPrice * (1 - discountPercentage / 10000)) * quantity * (1 + taxRate / 10000)
      - `totalVatAmount` (integer, nullable): The total VAT amount for the line item in minor units (e.g. 1 EUR = 100 totalAmount). Calculated by applying the tax rate to the unit price including discount and multiplying by the quantity. (unitPrice * (1 - discountPercentage / 10000)) * quantity * (taxRate / 10000)
      - `imageUrl` (string, max length 1024): URL to an image: png | jpg | jpeg | svg. Image that can be later embedded in communications between certain payment providers. Minimum 250x250 recommended. Limited PSP support.
    - One of, option 2 (US sales tax):
      - `productType` (string, required, one of: `"sales_tax"`): Has to be "sales_tax".
      - `name` (string, required, max length 256)
      - `reference` (string, max length 256): Reference
      - `totalTaxAmount` (integer, required): Total tax amount for the order in minor units (e.g. 1 USD = 100 totalTaxAmount).
    - One of, option 3 (Gift card):
      - `productType` (string, required, one of: `"gift_card"`): Has to be "gift_card".
      - `name` (string, required, max length 256)
      - `reference` (string, max length 256): Reference
      - `giftCardAmount` (integer, required): Gift card amount in minor units (e.g. 1 EUR = 100 giftCardAmount). When gift_card is used, a positive value indicates that a gift card is being purchased, and a negative value indicates a gift card being used as part of the payment. Keep in mind that gift cards are generally exempt from VAT/Tax as it's buying a currency and not a product.
  - `autoCaptureEnabled` (boolean): Whether Briqpay will schedule an automatic capture for this transaction when approved. When true, the merchant does not need to send a capture request.
  - `pspOrderManagementIds` (object): This feature is in beta. IDs that can be used directly with the API of the used payment method.
    - `cancel` (object)
      - `apiTransactionId` (string)
    - `capture` (object)
      - `apiTransactionId` (string)
    - `refund` (object)
      - `apiTransactionId` (string)
- `pspMetadata` (object): PSP-specific payment metadata, present only for certain PSPs on completed sessions and absent otherwise.
  - `customerFacingReference` (string): Payment reference given to the customer by the psp.
  - `description` (string): Description of the underlying payment method selected by the customer.
  - `type` (string): The type of payment used for the transaction.
  - `payerEmail` (string): The email of the payer.
  - `payerFirstName` (string): The first name of the payer.
  - `payerLastName` (string): The last name of the payer.

## Payload example

```json
{
  "event": "order_status",
  "status": "order_approved_not_captured",
  "sessionId": "61c16f84-b42e-4e1c-a114-a117a6e1e27d",
  "transaction": {
    "createdAt": "2026-01-12T11:23:24.000Z",
    "expiresAt": "2026-01-19T11:23:24.000Z",
    "transactionId": "t_123456789",
    "reservationId": "res_abc123",
    "secondaryReservationId": "sec_def456",
    "pspId": "psp_987654321",
    "pspDisplayName": "Card Payment",
    "pspIntegrationName": "Adyen - Card payments",
    "email": "customer@example.com",
    "phoneNumber": "+46700000000",
    "reference": "order-ref-123",
    "amountIncVat": 1000,
    "amountExVat": 800,
    "currency": "SEK",
    "status": "approved",
    "autoCaptureEnabled": true,
    "captureStatus": "not_captured",
    "refundStatus": "not_refunded",
    "sessionId": "61c16f84-b42e-4e1c-a114-a117a6e1e27d",
    "cart": [
      {
        "productType": "physical",
        "reference": "item-1",
        "name": "Product 1",
        "quantity": 1,
        "quantityUnit": "pcs",
        "unitPrice": 800,
        "unitPriceIncVat": 1000,
        "taxRate": 2500,
        "discountPercentage": 0,
        "unitDiscountAmountIncVat": 0,
        "totalAmount": 1000,
        "totalVatAmount": 200,
        "imageUrl": "https://example.com/product.png"
      },
      {
        "productType": "sales_tax",
        "reference": "sales_tax",
        "name": "Sales tax",
        "totalTaxAmount": 200
      },
      {
        "productType": "gift_card",
        "reference": "gift_card",
        "name": "Gift card",
        "giftCardAmount": 500
      }
    ],
    "pspOrderManagementIds": {
      "cancel": {
        "apiTransactionId": "cancel_xyz"
      },
      "capture": {
        "apiTransactionId": "cap_xyz"
      },
      "refund": {
        "apiTransactionId": "ref_xyz"
      }
    }
  },
  "pspMetadata": {
    "customerFacingReference": "REF-123",
    "description": "Invoice KA0376778N1",
    "type": "invoice",
    "payerEmail": "customer@example.com",
    "payerFirstName": "John",
    "payerLastName": "Doe"
  }
}
```

## What your endpoint should return

### 200 Your server should return a 2xx status code to acknowledge receipt.

No content.
