Create Session for Invoice Order
This endpoint allows you to export an order as an invoice to Front Payment Go. Upon successful submission, it returns:
- Order UUID
- Customer UUID
- Bank ID Verification URL (for customer identity verification)
Request
- Endpoint:
https://demo-api.frontpayment.no/api/v1/connect/orders/invoice/submit - Method:
POST - Authorization:
Bearer <token>
PayloadValidation Schema
Rules
Ensure your payload adheres to the following validation rules:
| Field | Type | Description |
|---|---|---|
products.*.name |
string |
|
products.*.productId |
string |
|
products.*.quantity |
numeric |
|
products.*.rate |
numeric |
|
products.*.discount |
numeric |
|
products.*.tax |
numeric |
|
products.*.amount |
numeric |
|
orderSummary.subTotal |
numeric |
|
orderSummary.totalTax |
numeric |
|
orderSummary.totalDiscount |
numeric |
|
orderSummary.grandTotal |
numeric |
|
orderDate |
string |
|
referenceNo |
string |
|
customerReference |
string |
|
orderFrom |
string |
Optional. Must be PARTNER if present. |
fpgoUuid |
string |
Optional. Must exist in `App\Models\Order`. |
invoiceInterval |
numeric |
|
separateInvoices |
boolean |
|
invoiceFeeApplicable |
boolean |
|
invoiceMaturity |
numeric |
|
| ||
| ||
| ||
settings.secureDetails |
boolean |
|
| | |
| | |
customerDetails.type |
string |
private / corporate) |
customerDetails.countryCode |
string |
|
customerDetails.msisdn |
string |
|
customerDetails.email |
email |
|
customerDetails.name |
string |
|
customerDetails.personalNumber |
string |
private. Customer's personal identification number, must be 11 |
| ||
customerDetails.organizationId |
string |
Required if corporate. Must be alphanumeric. |
customerDetails.preferredLanguage |
string |
Optional Customer preferred language. Available languages are en , no , sv , da , de. If nothing is given it will set default to no. |
customerDetails.address.street |
string |
|
customerDetails.address.zip |
string |
|
customerDetails.address.city |
string |
|
customerDetails.address.country |
string |
|
callback.callbackUrl |
url |
Required The URL to which Front Payment will send updates. Must be a valid url. |
callback.success |
url |
Required The URL to redirect to upon successful payment. Must be a valid url. |
callback.failure |
url |
Required The URL to redirect to upon failed payment. Must be a valid url. |
Example Request
{
"products": [
{
"name": "Router",
"productId": "R_1",
"quantity": "1",
"rate": 40,
"discount": 0,
"tax": "0",
"amount": 40
}
],
"orderSummary": {
"subTotal": "40",
"totalTax": "0",
"totalDiscount": "0.00",
"grandTotal": "40"
},
"orderDate": "1755150488",
"customerDetails": {
"type": "private",
"countryCode": "+47",
"msisdn": "46567468",
"email": "[email protected]",
"name": "Zahidul",
"preferredLanguage": "en",
"personalNumber": "28038712383",
"organizationId": "",
"address": {
"street": "Klosterenget 144",
"zip": "7030",
"city": "Trondheim",
"country": "NO"
}
},
"referenceNo": "Dhaka",
"customerReference": "3500",
"invoiceInterval": 0,
"separateInvoices": true,
"invoiceFeeApplicable": true,
"invoiceMaturity": 10,
"callback": {
"callbackUrl": "https://wp.frontpayment.no/?order_identifier=rRbl1FWZG59o&order_status=success",
"success": "https://wp.frontpayment.no/?order_identifier=rRbl1FWZG59o&order_status=success",
"failure": "https://frontpayment.no/?order_identifier=rRbl1FWZG59o&order_status=failed"
}
}
Example Success Response
{
"status_code": 201,
"status_message": "OK",
"message": "orderCreatedSuccessfully",
"is_data": true,
"data": {
"orderUuid": "ODR4286244937",
"customerUuid": "CSRT3419523642",
"bankIdUrl": "https://auth.current.bankid.no/precheck/auth?...state=eyJvcmRlclV1aWQiOiJPRFI0Mjg2MjQ0OTM3IiwiY29ubmVjdCI6InllcyJ9"
}
}
Other Responses
Internal Error (500)
{
"status_code": 500,
"status_message": "Internal Dependency Error",
"message": "Internal Error Occurred Please Try Again Later",
"is_error": true,
"errors": {
"happenedAt": "String",
"internalErrorDetails": "Array"
}
}
Execution Exception (510)
{
"status_code": 510,
"status_message": "Execution Exception Occurred",
"message": "Something Went Wrong",
"is_error": true,
"errors": "Array"
}