Skip to content
Developers

Search the guides, the API reference and the changelog.

Order Management

Handle an order after the purchase: capture it when you ship, refund a capture, cancel an authorized order you won't ship, release what's left after a partial capture, or update the cart and references. Which of these an order supports depends on its payment provider.

Capture an order

POST /v3/session/{sessionId}/order/capture

Section: Order Management. Base URLs: Playground https://playground-api.briqpay.com, Production https://api.briqpay.com. Auth: HTTP Basic.

Capture an order of a completed payment session. The provided cart items must exist on the session.

Path parameters

  • sessionId (string, required): Format: UUID

Headers

  • Content-Type (string, one of: "application/json")
  • Accept (string, one of: "application/json")
  • Authorization (string): Format: "Basic <base64(username:secret)>"

Request body

  • data (object, required)
    • order (object, required)
      • amountIncVat (integer, required): 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, required): 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, required): Example: SEK, EUR, USD
      • cart (array, each one of 3 shapes, required)
        • 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.
  • merchantCaptureReference (string, nullable, min length 1, max length 512): A merchant-set reference attached to the capture for merchant-side traceability. Returned on this capture in GET session responses and included in the capture webhook payload.

Request example

curl -X POST 'https://playground-api.briqpay.com/v3/session/{sessionId}/order/capture' \
  -H 'Authorization: Basic <base64(merchantId:secret)>' \
  -H 'Content-Type: application/json'

No request body example in the spec yet.

Responses

201

  • createdAt (string): ISO 8601 format, example: "2023-04-12T13:16:08.647Z".
  • captureId (string)
  • parentTransactionId (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.
  • autoCaptured (boolean): Whether the transaction was automatically captured by the Briqpay system or not.
  • 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")
  • 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.
  • pspOrderManagementIds (object): This feature is in beta. IDs that can be used directly with the API of the used payment method.
    • refund (object)
      • apiTransactionId (string)
  • merchantCaptureReference (string, nullable, min length 1, max length 512): A merchant-set reference attached to the capture for merchant-side traceability. Returned on this capture in GET session responses and included in the capture webhook payload.

400

  • error (object)
    • code (string, one of: "INVALID_CREDENTIALS", "CAPTURE_NOT_SUPPORTED", "PARTIAL_CAPTURE_NOT_SUPPORTED", "INVALID_DATA", "ORDER_REJECTED", "ORDER_PENDING", "ORDER_CANCELLED", "ORDER_FULLY_CAPTURED", "REMAINING_UNCAPTURED_QUANTITY_TOO_LOW", "REMAINING_UNCAPTURED_AMOUNT_TOO_LOW", "UNKNOWN")
    • message (string)

403

  • error (object)
    • code (string, one of: "INVALID_CREDENTIALS", "INVALID_API_KEY", "AUTH_SECRET_EXPIRED")
    • message (string)

404

  • error (object)
    • code (string, one of: "SESSION_NOT_FOUND")
    • message (string)

Refund a capture

POST /v3/session/{sessionId}/order/refund

Section: Order Management. Base URLs: Playground https://playground-api.briqpay.com, Production https://api.briqpay.com. Auth: HTTP Basic.

Refund a captured order of a payment session.

Path parameters

  • sessionId (string, required): Format: UUID. The session that should be partially or fully refunded.

Headers

  • Content-Type (string, one of: "application/json")
  • Accept (string, one of: "application/json")
  • Authorization (string): Format: "Basic <base64(username:secret)>"

Request body

  • captureId (string): Format: UUID. The capture that should be partially or fully refunded. Only needed when working with partial captures.
  • data (object, required)
    • order (object, required)
      • amountIncVat (integer, required): 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, required): 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, required): Example: SEK, EUR, USD
      • cart (array, each one of 3 shapes, required)
        • 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.
  • merchantRefundReference (string, nullable, min length 1, max length 512): A merchant-set reference attached to the refund for merchant-side traceability. Returned on this refund in GET session responses and included in the refund webhook payload.

Request example

curl -X POST 'https://playground-api.briqpay.com/v3/session/{sessionId}/order/refund' \
  -H 'Authorization: Basic <base64(merchantId:secret)>' \
  -H 'Content-Type: application/json'

No request body example in the spec yet.

Responses

201

  • createdAt (string): ISO 8601 format, example: "2023-04-12T13:16:08.647Z".
  • refundId (string)
  • parentCaptureId (string)
  • parentTransactionId (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.
  • 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")
  • 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.
  • merchantRefundReference (string, nullable, min length 1, max length 512): A merchant-set reference attached to the refund for merchant-side traceability. Returned on this refund in GET session responses and included in the refund webhook payload.

400

  • error (object)
    • code (string, one of: "INVALID_CREDENTIALS", "INVALID_DATA", "REFUND_NOT_SUPPORTED", "REFUND_NOT_ALLOWED", "PARTIAL_REFUND_NOT_ALLOWED", "ORDER_NOT_COMPLETED", "ORDER_NOT_CAPTURED", "ORDER_CANCELLED", "ORDER_PENDING", "REMAINING_UNREFUNDED_QUANTITY_TOO_LOW", "REMAINING_UNREFUNDED_AMOUNT_TOO_LOW", "UNKNOWN")
    • message (string)

403

  • error (object)
    • code (string, one of: "INVALID_CREDENTIALS", "INVALID_API_KEY", "AUTH_SECRET_EXPIRED")
    • message (string)

404

  • error (object)
    • code (string, one of: "SESSION_NOT_FOUND")
    • message (string)

Cancel an order

POST /v3/session/{sessionId}/order/cancel

Section: Order Management. Base URLs: Playground https://playground-api.briqpay.com, Production https://api.briqpay.com. Auth: HTTP Basic.

Cancel an order of a payment session. It is only possible to cancel an order that has order status order_approved_not_captured. If the order has been captured it is no longer possible to cancel the order as it should be refunded instead. It is also not possible to cancel a pending or rejected order.

Most payment providers confirm a cancellation right away and you get a 204. A few process it in the background and answer 202 with status: cancel_pending instead. In that case the order sits in order_cancel_pending and the authorization stays live until the provider replies. You then get an order_status webhook with one of:

  • order_cancelled - the cancellation went through. An authorization that had already expired ends up here too, since it can no longer be captured. Look at transaction.status to tell them apart: cancelled or expired.
  • order_approved_not_captured - the provider refused the cancellation. The order is back where it was and can still be captured.

Path parameters

  • sessionId (string, required): Format: UUID

Headers

  • Content-Type (string, one of: "application/json")
  • Accept (string, one of: "application/json")
  • Authorization (string): Format: "Basic <base64(username:secret)>"

Request example

curl -X POST 'https://playground-api.briqpay.com/v3/session/{sessionId}/order/cancel' \
  -H 'Authorization: Basic <base64(merchantId:secret)>' \
  -H 'Content-Type: application/json'

Responses

202 The cancellation is accepted but not confirmed yet. The order is now order_cancel_pending and the authorization stays live until the provider replies. Wait for the order_status webhook - see the endpoint description for the outcomes.

  • status (string, required, one of: "cancel_pending")

204 The order is cancelled. The payment provider confirmed it right away, so there is no webhook to wait for.

No content.

400

  • error (object)
    • code (string, one of: "INVALID_CREDENTIALS", "CANCEL_NOT_SUPPORTED", "INVALID_DATA", "ORDER_NOT_COMPLETED", "ORDER_REJECTED", "ORDER_PENDING", "ORDER_ALREADY_CAPTURED", "ORDER_ALREADY_CANCELLED", "UNKNOWN")
    • message (string)

403

  • error (object)
    • code (string, one of: "INVALID_CREDENTIALS", "INVALID_API_KEY", "AUTH_SECRET_EXPIRED")
    • message (string)

404

  • error (object)
    • code (string, one of: "SESSION_NOT_FOUND")
    • message (string)

Release remaining order amount

POST /v3/session/{sessionId}/order/release-remaining

Section: Order Management. Base URLs: Playground https://playground-api.briqpay.com, Production https://api.briqpay.com. Auth: HTTP Basic.

Release the remaining uncaptured amount of a partially captured order. This signals to the payment provider that no further captures will be made, effectively closing out the order. It is only possible to release remaining on an order that has been partially captured (captured_partial status). Orders that have not been captured, are fully captured, cancelled, pending, or rejected cannot have their remaining amount released.

Path parameters

  • sessionId (string, required): Format: UUID

Headers

  • Content-Type (string, one of: "application/json")
  • Accept (string, one of: "application/json")
  • Authorization (string): Format: "Basic <base64(username:secret)>"

Request example

curl -X POST 'https://playground-api.briqpay.com/v3/session/{sessionId}/order/release-remaining' \
  -H 'Authorization: Basic <base64(merchantId:secret)>' \
  -H 'Content-Type: application/json'

Responses

204

No content.

400

  • error (object)
    • code (string, one of: "INVALID_CREDENTIALS", "OPERATION_NOT_SUPPORTED", "ORDER_NOT_COMPLETED", "ORDER_REJECTED", "ORDER_PENDING", "ORDER_ALREADY_CANCELLED", "UNKNOWN")
    • message (string)

403

  • error (object)
    • code (string, one of: "INVALID_CREDENTIALS", "INVALID_API_KEY", "AUTH_SECRET_EXPIRED")
    • message (string)

404

  • error (object)
    • code (string, one of: "SESSION_NOT_FOUND")
    • message (string)

Update cart

PATCH /v3/session/{sessionId}/order/update/cart

Section: Order Management. Base URLs: Playground https://playground-api.briqpay.com, Production https://api.briqpay.com. Auth: HTTP Basic.

Update cart and amounts of a completed but not fully captured session.

Path parameters

  • sessionId (string, required): Format: UUID

Headers

  • Content-Type (string, one of: "application/json")
  • Accept (string, one of: "application/json")
  • Authorization (string): Format: "Basic <base64(username:secret)>"

Request body

  • data (object, required)
    • order (object, required)
      • amountIncVat (integer, required): 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, required): 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, required): Example: SEK, EUR, USD
      • cart (array, each one of 3 shapes, required)
        • 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.

Request example

curl -X PATCH 'https://playground-api.briqpay.com/v3/session/{sessionId}/order/update/cart' \
  -H 'Authorization: Basic <base64(merchantId:secret)>' \
  -H 'Content-Type: application/json'

No request body example in the spec yet.

Responses

204

No content.

400

  • error (object)
    • code (string, one of: "INVALID_CREDENTIALS", "INVALID_DATA", "ORDER_NOT_COMPLETED", "ORDER_REJECTED", "ORDER_PENDING", "ORDER_CANCELLED", "UPDATE_NOT_ALLOWED", "UPDATE_NOT_SUPPORTED", "UNKNOWN")
    • message (string)

403

  • error (object)
    • code (string, one of: "INVALID_CREDENTIALS", "INVALID_API_KEY", "AUTH_SECRET_EXPIRED")
    • message (string)

404

  • error (object)
    • code (string, one of: "SESSION_NOT_FOUND")
    • message (string)

Update references

PATCH /v3/session/{sessionId}/order/update/references

Section: Order Management. Base URLs: Playground https://playground-api.briqpay.com, Production https://api.briqpay.com. Auth: HTTP Basic.

Update order references of a completed session.

Path parameters

  • sessionId (string, required): Format: UUID

Headers

  • Content-Type (string, one of: "application/json")
  • Accept (string, one of: "application/json")
  • Authorization (string): Format: "Basic <base64(username:secret)>"

Request body

  • references (object, required): Your own references, we recommend using property name "reference1" as your order reference for payments since this property is default for multiple payment providers. But any additional property name can be used e.g. customerId. Example: { "reference1": "000", "customerId": "12345" }

Request example

curl -X PATCH 'https://playground-api.briqpay.com/v3/session/{sessionId}/order/update/references' \
  -H 'Authorization: Basic <base64(merchantId:secret)>' \
  -H 'Content-Type: application/json'

No request body example in the spec yet.

Responses

204

No content.

400

  • error (object)
    • code (string, one of: "INVALID_CREDENTIALS", "INVALID_DATA", "ORDER_NOT_COMPLETED", "ORDER_REJECTED", "ORDER_PENDING", "ORDER_CANCELLED", "UPDATE_NOT_ALLOWED", "UPDATE_NOT_SUPPORTED", "UNKNOWN")
    • message (string)

403

  • error (object)
    • code (string, one of: "INVALID_CREDENTIALS", "INVALID_API_KEY", "AUTH_SECRET_EXPIRED")
    • message (string)

404

  • error (object)
    • code (string, one of: "SESSION_NOT_FOUND")
    • message (string)

For AI tools: this page as Markdown, llms.txt (every page as Markdown) and the OpenAPI spec.