Skip to main content

Request examples

Simple requests

Payment request:

{
"amount": 30000,
"reference": "testref",
"currencyCode": "EUR",
"redirectUrl": "https://www.testRedirectUrl.com",
"cancelUrl": "https://www.testCancelUrl.com",
"notificationUrl": "https://www.testNotificationUrl.com/api"
}

Card validation request:

{
"amount": 30000,
"reference": "testref",
"currencyCode": "EUR",
"redirectUrl": "https://www.testRedirectUrl.com",
"cancelUrl": "https://www.testCancelUrl.com",
"notificationUrl": "https://www.testNotificationUrl.com/api",
"authenticationDetails": {
"authenticationOnly": true
}
}

These requests will render the Payment form alone. Docs Version Dropdown

Request with prefilled form:

{
"amount": 30000,
"reference": "testref",
"currencyCode": "EUR",
"cardHolderName": "testName",
"billingDetails": {
"email": "testEmail",
"street": "testStreet",
"city": "testCity",
"postcode": "testPostcode",
"country": "PL"
},
"redirectUrl": "https://www.testRedirectUrl.com",
"cancelUrl": "https://www.testCancelUrl.com",
"notificationUrl": "https://www.testNotificationUrl.com/api"
}

Providing Billing Details and Card Holder name will prefill the form: image.png

Request with Order Details

{
"amount": 40000,
"reference": "testref",
"currencyCode": "EUR",
"order": {
"lineItems": [
{
"description": "Table for two",
"amount": 40000,
"children": [
{
"description": "Steak with fries",
"detailRows": ["Medium rare", "double fries"],
"amount": 20000,
"children": [
{
"description": "Steak",
"detailRows": ["Medium rare"],
"amount": 15000
},
{
"description": "Double fries",
"amount": 5000
}
]
},
{
"description": "Wine",
"detailRows": ["Old", "Room temperature"],
"amount": 10000
}
]
}
]
},
"cardHolderName": "testName",
"billingDetails": {
"email": "testEmail",
"street": "testStreet",
"city": "testCity",
"postcode": "11-111",
"country": "PL"
},
"redirectUrl": "https://www.testRedirectUrl.com",
"cancelUrl": "https://www.testCancelUrl.com",
"notificationUrl": "https://www.testNotificationUrl.com/api"
}

Providing order details with items generates the Payment Details view on the left image.png

Request with Invoice details

{
"amount": 40000,
"reference": "testref",
"currencyCode": "EUR",
"invoiceDetails": {
"items":
[
{
"reference": "CrsNumber1",
"amount": 20000
},
{
"reference": "CrsNumber2",
"amount": 20000
}
]
},
"cardHolderName": "testName",
"billingDetails": {
"email": "testEmail",
"street": "testStreet",
"city": "testCity",
"postcode": "11-111",
"country": "PL"
},
"redirectUrl": "https://www.testRedirectUrl.com",
"cancelUrl": "https://www.testCancelUrl.com",
"notificationUrl": "https://www.testNotificationUrl.com/api"
}

Providing invoice details with items allows deposits to be added to PMS after a payment transaction is successful

Sending invoice data should be done either via GuestPay Hosted Payment Page or via Roomlynx API. Doing it in both places at once can result in duplicates!

Note: The notificationUrl is an optional property which, when included, will be used as an endpoint for receiving session notifications. More information can be found under Session notifications.

Checkout session retrieval

The checkout API can also be queried using a session ID in order to retrieve the latest status of a checkout session. This can be used to update details within third party systems following a successful payment, for example.

To query for a checkout session, make a GET request to the following URL, with the sessionId of the session for which you want to retrieve:

https://hpp-stage.payment.pay.accessacloud.com/api/checkout/sessions/{sessionId}

Note: The URL varies depending on the environment.

The Authorization header must also be provided, as described in Authorization.

Depending on the outcome of payment on the checkout session, you can expect a response similar to the following examples:

Succesful checkout session:

{
"outcome": "Success",
"sessionId": "ac097ba17bcb437f8c966895ecc6aa06",
"reference": "TestRef",
"amount": 30000,
"currencyCode": "EUR",
"createdAt": "2025-01-03T10:47:16.4777072Z",
"paymentTakenAt": "2025-01-03T10:48:50.035Z",
"transactionId": "LAGERMAN-3DSV2-684c3fac-dee8-499d-b246-0873078046f4",
"token": "58-9-3988545",
"providerName": "SecureTrading",
"cardType": "VISA",
"errorCode": null,
"errorMessage": null,
"acquirerResponseCode": null
}

Failed checkout session:

{
"outcome": "Failure",
"sessionId": "bf261e90ab2c44c78b03d52aedf192af",
"reference": "TestRef",
"amount": 70000,
"currencyCode": "EUR",
"createdAt": "2025-01-10T11:59:33.3265623Z",
"paymentTakenAt": null,
"transactionId": "LAGERMAN-3DSV2-61fd0b29-2109-4704-bf0f-c113c14d6218",
"token": "56-9-3985377",
"providerName": null,
"cardType": null,
"errorCode": "decline",
"errorMessage": "SecureTrading: Decline. No further data.",
"acquirerResponseCode": "05"
}

Checkout session with payment still pending:

{
"outcome": "Pending",
"sessionId": "bf261e90ab2c44c78b03d52aedf192af",
"reference": "TestRef",
"amount": 70000,
"currencyCode": "EUR",
"createdAt": "2025-01-10T11:59:33.3265623Z",
"paymentTakenAt": null,
"transactionId": null,
"token": null,
"providerName": null,
"cardType": null,
"errorCode": null,
"errorMessage": null,
"acquirerResponseCode": null
}