Skip to main content

Charge Reservation

Refund Order Payment

Endpoint

:

https://demo-api.frontpayment.no/api/v1/connect/reservations/capture/charge/{{RESERVATION_UUID}}

Method

:

POST

Authorization

:

Bearer

Payload Validation

:

 

'products' => 'required|array',
'products.*.id'name' => 'required|string',
'products.*.productId' => 'nullable|string',
'products.*.rate' => 'required|numeric',
'products.*.tax' => 'required|numeric',
'products.*.amount' => 'required|numeric',
'grandTotal' => 'required|numeric',

Example Payload

:

 

{
    "products": {
        "0": {
            "id"name": 298,"Charge "amount": 5
        }QA",
            "1"productId": {null,
            "id"rate": 299,1500,
            "amount"tax": 500
        }"0",
        "2": {
            "id": 300,
            "amount": 1500
        }
    },
    "grandTotal": 20051500
}

 

Response Structure

:

 

// Success
{
    "status_code": 202,
    "status_message": "OK",
    "message": "reservationCapturedSuccessfully"reservationChargedSuccessfully",
    "is_data": false,
    "data": null
}

// Errors
{
    "status_code": 417,
    "status_message": "Client Error",
    "message": "payloadValidationErrors",
    "is_error": true,
    "errors": "Array"
}

{
    "status_code": 404,
    "status_message": "Not Found",
    "message": "orderNotFound"reservationNotFound",
    "is_data": false,
    "data": null
}

{
    "status_code": 404,
    "status_message": "Not Found",
    "message": "paymentCardNotFound",
    "is_data": false,
    "data": null
}

{
    "status_code": 400,
    "status_message": "Conflict of Business Logic",
    "message": "requestedCaptureAmountExceedAvailableCaptureRunway"paymentChargeRunwayExceed",
    "is_data": false,
    "data": null
}

{
    "status_code": 400,
    "status_message": "Conflict of Business Logic",
    "message": "reservationStatusAlreadyCancelled",
    "is_data": false,
    "data": null
}

{
    "status_code": 400,
    "status_message": "Conflict of Business Logic",
    "message": "paymentCaptureDeadlineExceed"paymentChargeDeadlineExceed",
    "is_data": false,
    "data": null
}

{
    "status_code": 500,
    "status_message": "Internal Dependency Error",
    "message": "internalErrorOccurredPleaseTryAgainLater",
    "is_error": true,
    "errors": "Array"
}

{
  "status_code": 510,
  "status_message": "Execution Exception Occurred",
  "message": "somethingWentWrong",
  "is_error": true,
  "errors": "Array"
}

 

Example Response

:

 

 

{
    "status_code": 202,
    "status_message": "OK",
    "message": "reservationCapturedSuccessfully"reservationChargedSuccessfully",
    "is_data": false,
    "data": null
}