Prefill data
Sessions can be prefilled with data that the user would otherwise enter themselves. Simply provide information in the data
object as documented in Create session.
The following data can be provided:
- Order / cart (Payments)
- Company identification number (B2B)
- Consumer identification and date of birth (B2C)
- Billing details & address
- Shipping details & address
Payments data example
In the POST request to the Create session endpoint, add as much data to the data
object as you want:
{
"data": {
"order": {
"currency": "string",
"amountIncVat": 3000,
"amountExVat": 2400,
"cart": [
{
"productType": "physical",
"reference": "testproduct1",
"name": "Test product",
"quantity": 2,
"quantityUnit": "pc",
"unitPrice": 1200,
"taxRate": 2500,
"discountPercentage": 0
}
]
},
"company": {
"cin": "123456790"
},
"billing": {
"firstName": "Test",
"lastName": "Testsson"
},
"shipping": {
"firstName": "Test",
"lastName": "Testsson"
}
}
}