Orders
Create a BR-DGE Hosted Payment Page Order
post/orders
Request body
Example request
{
"allowedPaymentInstruments": [
"applePay",
"card"
],
"amount": 1234,
"billingAddress": {
"firstName": "John",
"lastName": "Smith",
"phoneNumber": "+44 123 1110000",
"buildingNumberOrName": "10a",
"address1": "Flat 1",
"address2": "Victoria House",
"address3": "15 Apple Street",
"town": "Edinburgh",
"county": "Lothian",
"postcode": "BH23 6AA",
"country": "GB"
},
"cardOnFileTermsAndConditionsUrl": "http://example.com/terms",
"corporateCardPercentageSurcharge": 12.5,
"currencyCode": "GBP",
"customerEmail": "a@b.com",
"customerFirstName": "John",
"customerId": "john@doe.com",
"customerLastName": "Smith",
"customerOrderCode": "ABC123",
"customerPhoneNumber": "+44 123 1110000",
"deliveryAddress": {
"firstName": "John",
"lastName": "Smith",
"phoneNumber": "+44 123 1110000",
"buildingNumberOrName": "10a",
"address1": "Flat 1",
"address2": "Victoria House",
"address3": "15 Apple Street",
"town": "Edinburgh",
"county": "Lothian",
"postcode": "BH23 6AA",
"country": "GB"
},
"orderDescription": "Taxi fare",
"returnUrl": "http://www.return.url",
"threeDSecureRequired": true,
"tokens": "token1,token2",
"payPal": {
"invoiceId": "987654321",
"customerAccountId": "A12345N343",
"customerAccountCreationTimestamp": "2022-01-30T10:10:10Z",
"enableShippingAddress": true,
"displayName": "Display Name",
"locale": "en_GB",
"lineItems": [
{
"name": "T-Shirt",
"description": "A green t-shirt",
"quantity": 1,
"unitAmount": 1000,
"unitTax": 100
}
],
"ota": {
"type": "bus",
"serviceStartDate": "2022-01-30T10:10:10Z",
"serviceEndDate": "2022-01-30T10:10:10Z",
"startCountry": "GB",
"startCity": "Edinburgh",
"startPostcode": "BH23 6AA"
}
}
}Response
Order created. You can now redirect your customer to the provided URL.
Example response
{
"code": "1000",
"id": "4fad8e2e06a15656"
}