Briqpay Integration Guide
Technical guide for integrating Briqpay's V3 checkout API: sessions, amount handling, order flow, order management, decision flow, references, payment information and webhooks. A plain-text summary is available at /llms.txt.
2. Briqpay Integration
Create a session with POST /v3/session using Basic Auth. Playground: https://playground-api.briqpay.com/v3/session. Production: https://api.briqpay.com/v3/session. Scoped generated secrets are available for advanced use cases. The response contains sessionId, htmlSnippet and clientToken. Store sessionId against your order. Always send billing and shipping at creation, set references.reference1 and enable the decision flow.
API reference: Create session.
3. Order Flow
Create Session → Present iFrame → Keep in Sync → Purchase Decision → Order Complete. Keep the checkout in sync with suspend → update → resume. The make_decision event triggers final merchant validation. After purchase the customer is redirected to urls.redirect and the order_status webhook confirms the order.
4. Amount Handling
Amounts are in minor units. Divide by 100 for display for currencies with two decimals. Cart items include taxRate, unitPrice, unitPriceIncVat, discountPercentage, totalAmount, totalVatAmount and imageUrl; use quantityUnit pcs. The order total must match the sum of the cart lines; small rounding differences are accepted. Shipping, discounts and fees are separate cart lines (shipping_fee, discount, surcharge).
5. Updating the Session
Update the order with PATCH /v3/session/{sessionId} and references or URLs with PATCH /v3/session/{sessionId}/metadata. Call _briqpay.v3.suspend() before updating and _briqpay.v3.resume() afterwards to rehydrate the iFrame. Send the complete updated order with recalculated amounts. Always resume, even if the update fails. Customer data, loaded modules and payment method rules cannot be updated. Use Order Management after purchase.
API reference: Update session, Update metadata.
6. Decision Flow
Recommended. Enabled per session with modules.config.payment.decision.enabled: true. The JS SDK fires make_decision; the merchant allows or rejects via POST /v3/session/{sessionId}/decision, then calls resumeDecision(). Validate stock, price and permissions by reading the session and running your checks. The iFrame waits about 20 seconds. Use decision allow or reject; notify_user with softErrors for a message, or reject_session_with_error with hardError to close the session.
7. Order Management
Capture, cancel and refund are asynchronous; results arrive via webhooks. Capture and refund use the same data.order.cart format as session creation. Capture and cancel require order_approved_not_captured. Cancel only before anything is captured; afterwards use refund. Each refund belongs to one capture; with multiple captures include captureId. Capture and refund return 201 with a status (pending, approved or rejected); pending results arrive via webhooks. Cancel returns 204, or 202 when the provider confirms later. Also available: POST /order/release-remaining, PATCH /order/update/cart and PATCH /order/update/references.
API reference: Capture an order, Cancel an order, Refund a capture.
8. References
Top-level references object. Always set reference1: it is sent to payment providers and shown in provider portals, settlement and reconciliation reports (depending on the provider), and the Briqpay merchant portal. Other keys are stored for internal use. Up to 10 references, max 512 characters each. Update before purchase via Update metadata and after purchase via Update references.
9. Payment Information
Payment method details are delivered in the order_status webhook and available when reading the session. Transaction fields: reservationId (main PSP reference), secondaryReservationId, pspId, pspDisplayName and pspIntegrationName. pspMetadata: customerFacingReference, description, type, payerEmail, payerFirstName, payerLastName and payerPhone. Availability depends on the provider and payment method.
10. Webhooks
Receive session and order status notifications. order_status values: order_pending, order_approved_not_captured, order_rejected, order_cancelled. session_status: completed. capture_status and refund_status: pending, approved, rejected. POST webhooks also include the full refund / capture / transaction object. Deduplicate on captureId / refundId + status. Return 200 OK immediately and process asynchronously. Enable signing in the merchant portal and verify x-briq-signature (HMAC-SHA256, POST only); without signing read the session via the API to confirm the event.
11. Get Started
Full documentation at developer.briqpay.com. Technical Meeting, Project Kick-Off, Integration & Live, Monitoring.