Create a payment session
POST /checkout/v1/sessions
Once your customer has entered your checkout. You should create the payment session towards briqpay. The response will include the snippet needed to render our checkout iframe. If your customer is already logged into your systems you are able to provide Briqpay with billing and shipping details at this point.
- application/json
Request Body
Mandatory method to create a payment session
- currency Currency required
- locale Locale required
- country Country required
- amount integer required
The total amount of the order including VAT
cart object[] required
Array [producttype ProductTypePossible values: [
physical
,digital
,discount
,shipping_fee
,sales_tax
,deposit
,surcharge
]The type of items being sold. When using 'discount', the unitPrice should be negative.
reference ProductReferenceThe SKU of the item
name stringquantity integerquantityunit stringunitprice integerUnit price excluding VAT in minor units
taxrate TaxRateThe applicable taxrate in minor units. Eg 25% = 2500
discount integerDiscount value in percentages. 10% = 1000
]merchanturls object required
terms string requiredLink to your terms that the client approves at the point of purchase
notifications string requiredEndpoint for Briqpay to notify you of a successful purchase - ensure to handle different values in session.state
redirecturl string requiredWhere should the customer be redirected after the purchase has been completed?
merchantconfig object required
maxamount booleanShould the max amount rules be applied to this purchase?
creditscoring boolean requiredShould the creditscoring rules be applied to this purchase?
productid stringThe product ID identifier to use for this purchase, only use if you have multiple setups with Briqpay
order_note object
Control data of the order_note section of the checkout
customInputs object[]
Avaliable custom inputs fields that should be collected in the order_note section of the checkout
Array [key stringThe input key, must be unique between all custominputs
label stringThe label to be presented in relation to the input
minLength numbermaxLength numberrequired booleanDefault value:
false
span numberControl if the input field should span over 1 or 2 columns
]payment object
Specific configurations regarding the payment module.
pspRulesOverride object
Allows you to override the result of the Briqpay rule engine for a specific purchase
psp object[]
Array [pspId stringthe pspId of the payment method that you wish to manually control.
handles object
enabled booleanDefault value:
true
should this payment method be enabled in the checkout?
otherHandles stringPossible values: [
run_rules
,disable
]Default value:
run_rules
How should the other handles that are configured on this purchase act?
]otherPsps stringPossible values: [
run_rules
,disable
]Default value:
run_rules
How should the rule-engine act for remaining PSPs that you have not defined an override for?
billing object
Specific configurations regarding the billing module inside of the checkout
lockFields object
How should Briqpay lock the users addresses? Hard_lock means no user edits are possible. Soft_Lock means that incorrect data will be allowed to be corrected
companyname LockTypePossible values: [
soft_lock
,hard_lock
,none
]Default value:
none
firstname LockTypePossible values: [
soft_lock
,hard_lock
,none
]Default value:
none
lastname LockTypePossible values: [
soft_lock
,hard_lock
,none
]Default value:
none
streetaddress LockTypePossible values: [
soft_lock
,hard_lock
,none
]Default value:
none
streetaddress2 LockTypePossible values: [
soft_lock
,hard_lock
,none
]Default value:
none
zip LockTypePossible values: [
soft_lock
,hard_lock
,none
]Default value:
none
city LockTypePossible values: [
soft_lock
,hard_lock
,none
]Default value:
none
cellno LockTypePossible values: [
soft_lock
,hard_lock
,none
]Default value:
none
email LockTypePossible values: [
soft_lock
,hard_lock
,none
]Default value:
none
shipping object
Specific configurations regarding the shipping module inside of the checkout
lockFields object
How should Briqpay lock the users addresses? Hard_lock means no user edits are possible. Soft_Lock means that incorrect data will be allowed to be corrected
companyname LockTypePossible values: [
soft_lock
,hard_lock
,none
]Default value:
none
firstname LockTypePossible values: [
soft_lock
,hard_lock
,none
]Default value:
none
lastname LockTypePossible values: [
soft_lock
,hard_lock
,none
]Default value:
none
streetaddress LockTypePossible values: [
soft_lock
,hard_lock
,none
]Default value:
none
streetaddress2 LockTypePossible values: [
soft_lock
,hard_lock
,none
]Default value:
none
zip LockTypePossible values: [
soft_lock
,hard_lock
,none
]Default value:
none
city LockTypePossible values: [
soft_lock
,hard_lock
,none
]Default value:
none
cellno LockTypePossible values: [
soft_lock
,hard_lock
,none
]Default value:
none
email LockTypePossible values: [
soft_lock
,hard_lock
,none
]Default value:
none
upsell object
Configure which inputs will be collected in the Upsell module.
customInputs object[]
Inputs that will be collected in the Upsell module.
Array [key stringThe input key, must be unique between all custominputs
label stringThe label to be presented in relation to the input
minLength numbermaxLength numberrequired booleanDefault value:
false
span numberControl if the input field should span over 1 or 2 columns
]hideModule booleanheader stringPossible values:
<= 64 characters
Module header text.
subheader stringPossible values:
<= 512 characters
Module sub-header text.
footer stringPossible values:
<= 512 characters
Module footer text.
terms object
Set/override which checkboxes exists in the Terms Module.
checkboxes object[]
Checkboxes that will be collected in the Terms module.
Array [key stringThe input key, must be unique between all inputs.
label stringThe label to be presented in relation to the input. Can be formatted with urls as following: "Yes, I want to subscribe to the [Newsletter](https://example.com)"
required boolean nullableDefault value:
false
If true, the checkbox must be checked before the customer can complete the flow.
default boolean nullableDefault value:
false
If true, the checkbox will be pre-checked in the flow.
]reference object
reference1 stringreference2 string- orgnr string
billingaddress Address
companyname stringfirstname stringlastname stringstreetaddress stringstreetaddress2 stringzip stringcity stringregion stringState / region. Example: "CA" for California in the US.
cellno stringemail stringshippingaddress Address
companyname stringfirstname stringlastname stringstreetaddress stringstreetaddress2 stringzip stringcity stringregion stringState / region. Example: "CA" for California in the US.
cellno stringemail stringmerchantBilling object
Control data of the billing module inside of the checkout
addresses MerchantPrefillAddress[]
A list of pre-approved addresses that you wish your customers should be able to select as billing address for this specific purchase
Array [companyname stringstreetaddress stringstreetaddress2 stringzip stringcity stringregion stringState / region. Example: "CA" for California in the US.
country stringfirstname stringlastname stringcellno string]merchantShipping object
Control data of the shipping module inside of the checkout
addresses MerchantPrefillAddress[]
A list of pre-approved addresses that you wish your customers should be able to select as shipping address for this specific purchase
Array [companyname stringstreetaddress stringstreetaddress2 stringzip stringcity stringregion stringState / region. Example: "CA" for California in the US.
country stringfirstname stringlastname stringcellno string]
- 200
- 400
Successfully created a payment session
- application/json
- Schema
- Example (from schema)
Schema
- currency Currency
- locale Locale
- country Country
- orgnr string
billingaddress Address
companyname stringfirstname stringlastname stringstreetaddress stringstreetaddress2 stringzip stringcity stringregion stringState / region. Example: "CA" for California in the US.
cellno stringemail stringshippingaddress Address
companyname stringfirstname stringlastname stringstreetaddress stringstreetaddress2 stringzip stringcity stringregion stringState / region. Example: "CA" for California in the US.
cellno stringemail stringreference object
reference1 stringreference2 stringcart object[]
Array [producttype ProductTypePossible values: [
physical
,digital
,discount
,shipping_fee
,sales_tax
,deposit
,surcharge
]The type of items being sold. When using 'discount', the unitPrice should be negative.
reference ProductReferenceThe SKU of the item
name stringquantity integerquantityunit stringunitprice integerUnit price excluding VAT in minor units
taxrate TaxRateThe applicable taxrate in minor units. Eg 25% = 2500
discount integerDiscount value in percentages. 10% = 1000
]merchanturls object
terms string requiredLink to your terms that the client approves at the point of purchase
notifications string requiredEndpoint for Briqpay to notify you of a successful purchase - ensure to handle different values in session.state
redirecturl string requiredWhere should the customer be redirected after the purchase has been completed?
- amount integer
The total amount of the order including VAT
- snippet string
tags object
Additional data regarding the purchase
prepaid_invoice booleanmanual_review boolean- sessionid GUID
The unique identifier for this specific session
- state SessionState
Possible values: [
sessioncreated
,purchasecomplete
,paymentprocessing
,purchaserejected
,clientread
,tokencreated
] - createddate date-time
ordernote object
Record of optional order notes that the user has inputed - Default behaviour includes a 'note' key/value
property name*
stringtermsCheckboxes object
Contains data for the checkboxes of the terms module.
property name* object
value booleanheader stringpurchasepaymentmethod object
Additional data regarding the purchase
reservationid stringsessionid stringpspid stringpspname stringThe internal PSPName used
name stringThe customer-facing PSPname
autocapture booleanWas this order alread captured?
invoicemarkdown stringAdditional data added to the invoice markdown field
reference stringAdditional reference added to the invoice
email stringCustomer added an specific email to receive the invoice
pspSupportedOrderOperations object
Possible order management operations that he underlying PSP supports.
updateOrderSupported booleanDefault value:
false
Is this order possible to update?
captureOrderSupported booleanDefault value:
true
Is this order possible to capture?
refundOrderSupported booleanDefault value:
true
Is this order possible to refund?
extraCompanyFields object
Record of custom parameters that Briqpay will share on completed sessions - Contact Briqpay for complete specifications
property name*
stringrulesresult object[]
Get detailed information on what rules triggered for this purchase
Array [pspname stringWhat PSP was triggered
rulesResult object[]
All rules that failed for this method
Array [outcome booleanfriendlyname string]]- token string
The Bearer token to use for all subsequent calls on this session - This is only return on Session Create Calls
{
"currency": "SEK",
"locale": "en-gb",
"country": "SE",
"orgnr": "559249-5336",
"billingaddress": {
"companyname": "Company AB",
"firstname": "Alan",
"lastname": "Smith",
"streetaddress": "Kingstreet 1 B",
"streetaddress2": "careof MrTest",
"zip": "24224",
"city": "Kingcity",
"region": "string",
"cellno": "+4670333444",
"email": "youremail@mail.com"
},
"shippingaddress": {
"companyname": "Company AB",
"firstname": "Alan",
"lastname": "Smith",
"streetaddress": "Kingstreet 1 B",
"streetaddress2": "careof MrTest",
"zip": "24224",
"city": "Kingcity",
"region": "string",
"cellno": "+4670333444",
"email": "youremail@mail.com"
},
"reference": {
"reference1": "string",
"reference2": "string"
},
"cart": [
{
"producttype": "physical",
"reference": "testproduct1",
"name": "Test product",
"quantity": 2,
"quantityunit": "pc",
"unitprice": 1200,
"taxrate": 2500,
"discount": 0
}
],
"merchanturls": {
"terms": "https://merchant.com/terms",
"notifications": "https://merchant.com/api/briqpaycallback",
"redirecturl": "https://merchant.com/thankyou"
},
"amount": 2400,
"snippet": "<div id=\"briqpay\">....</div>",
"tags": {
"prepaid_invoice": true,
"manual_review": true
},
"sessionid": "c22071e0-0a5b-11eb-a630-a9bb6e5bf7ef",
"state": "sessioncreated",
"createddate": "2024-11-01T08:56:17.530Z",
"ordernote": {
"note": "This is the orderNote"
},
"termsCheckboxes": {},
"purchasepaymentmethod": {
"reservationid": "string",
"sessionid": "string",
"pspid": "string",
"pspname": "string",
"name": "string",
"autocapture": true,
"invoicemarkdown": "string",
"reference": "string",
"email": "string",
"pspSupportedOrderOperations": {
"updateOrderSupported": false,
"captureOrderSupported": false,
"refundOrderSupported": false
}
},
"extraCompanyFields": {},
"rulesresult": [
{
"pspname": "string",
"rulesResult": [
{
"outcome": true,
"friendlyname": "string"
}
]
}
],
"token": "nadwa.85hsefapoapndwa"
}
Bad format on your request