Payment page

📘

This is the integration mode to choose if you are not PCI-DSS certified and do not make payments in iFrame.

In Payment Page integration, the payment page is hosted by Floa.

🚧

Requirements :

  • A dedicated and not shared IP
  • Your IP must have a good reputation on this website : https://www.brightcloud.com/tools/url-ip-lookup.php . If not, you can request a change using the form.
  • Calls to FLOA services must be made on the server side, the authentication token being provided for each call to our services must not be on the client side

❗️

In order to avoid the loss of the user session while returning to your website after the payment, we recommend to configure cookies in SameSite = None on your server.
Example of line to put in the .htaccess:
Header edit Set-Cookie ^(.*)$ $1;Secure;SameSite=None

This integration offers the following advantages :

  • You do not have to develop your own payment page
  • Does not require PCI-DSS certification on your part
  • Calls to payment services are simplified

Disadvantages of this integration :

  • You don't have any control over the graphic design of the payment page, only the logo of your company can be added (amendment to be requested to the Floa team)

Workflow

Services to call

Authentication

Authenticate

Example in the integration environment

GET https://paymentgateway.integration-cb4x.fr/v1/auth/token

Headers
authorization : login:password (in base 64)

Body
Empty

PreEligibility

Subject to customer information and consent (workshop to be conducted with your account manager)

PreEligibility
For a 1XD payment, specify the number of days of deferment in reportDelayInDays

Example in the integration environment

POST https://eligibility.integration-cb4x.fr/api/v1/pre-eligibilities?merchantId=38&merchantSiteIds=7017

Headers
Content-type : application/json
authToken : the token retrieved via the call to the authentication service

Body

{
    "presaleFolder": {
        "shoppingCarts": [
            {
                "reference": "order reference",
                "rawAmount": amount of the order in cents,
                "productsCount": 1,
                "products": [
                    {
                        "name": "Product A",
                        "rawAmount": amount of the product in cents,
                        "shipping": {
                            "method": "UPS"
                            }
                    }
                ]
            }
        ],
        "customer": {
            "reference": "customer reference",
            "civility": "Mr",
            "firstName": "fTest",
            "lastName": "lTest",
            "email": "[email protected]",
            "homePhoneNumber": "0512345678",
            "homeAddress": {
                "line1": "route de bordeaux",
                "zipCode": "33000",
                "city": "Bordeaux",
                "countryCode": "FR"
            }
        },
        "saleChannel": "Desktop"
    }
}

Eligibility

Eligibility
For better tracking of the orders, we recommend you put the same value in presaleFolder/shoppingCarts/reference for the PreEligibility and the Eligibility
In the case of a 1XD payment, indicate the number of deferred days in reportDelayInDays
In the case of a iXC payment, birthDate, birthZipCode, maidenName are not mandatory

Example in the integration environment

POST https://eligibility.integration-cb4x.fr/api/v1/eligibilities?merchantId=38&merchantSiteIds=7017

If a pre-eligibility is made, link the pre-eligibility to the eligibility via the pre-eligibility requested in the URL :
POST https://eligibility.integration-cb4x.fr/api/v1/eligibilities?merchantId=38&merchantSiteIds=7017&requestId=123456

Headers
Content-type : application/json
authToken : the token retrieved via the call to the authentication service

Body

{
    "presaleFolder": {
        "shoppingCarts": [
            {
                "reference": "order reference",
                "rawAmount": amount of the order in cents,
                "productsCount": 1,
                "products": [
                    {
                        "name": "Product A",
                        "rawAmount": amount of the product in cents,
                        "shipping": {
                            "method": "UPS"
                            }
                    }
                ]
            }
        ],
        "customer": {
            "reference": "60128411000001321",
            "firstName": "fTest",
            "lastName": "lTest",
            "email": "[email protected]",
            "birthDate": "1986-07-16T00:00:00.0000000+00:00",
            "birthZipCode": "33",
            "civility": "Mr",
            "homePhoneNumber": "0512345678",
            "cellPhoneNumber": "0612345678",
            "homeAddress": {
                "line1": "route de bordeaux",
                "zipCode": "33000",
                "city": "Bordeaux",
                "countryCode": "FR"
            }
        },
        "saleChannel": "Desktop"
    }
}

Create a payment session

Creates a payment session
Set the default value in configuration/formType
For better orders’ follow-up, we recommend you set the same value in orderData/orderSummaryRef, orderData/orderRef as presaleFolder/shoppingCarts/reference
In the case of a 1XD payment, indicate the number of days of delay in configuration/reportDelayInDays

🚧

Send in orderData/scoringToken the value returned by the Eligibility service in the token field
Send in orderData/amount the value returned by the Eligibility service in the totalAmount field

❗️

The orderData/orderTag field, present in the service contract, must not be used.

Example in the integration environment

POST https://paymentgateway.integration-cb4x.fr/v1/payment-sessions

Headers
Content-type : application/json
authToken : the token retrieved via the call to the authentication service

Body

{
    "merchantId": 38,
    "merchantSiteId": "7017",
    "customer": {
        "customerRef": "00000001",
        "firstName": "fTest", 
        "lastName": "lTest"
    },
    "orderData": {
        "amount": amount returned by the eligibility service (contains Floa fees if any),
        "orderSummaryRef": "order reference",
        "orderRef": "order reference",
        "orderDate": "2021-06-12T02:36:28.639Z",
        "salesChannel": "Desktop",
        "shippingMethod": "UPS",
        "scoringToken": "token returned by the eligibility service"
    },
    "configuration": {
        "culture": "fr-FR",
        "template": "Generic",
        "formType": "default",
        "merchantBackUrl": "back to cart URL",
        "merchantNotifyUrl": "URL to which the payment notification will be sent",
        "merchantReturnUrl": "URL to which the customer will be redirected after the payment (this redirection also returns the payment result)",
        "paymentOptionRef": "63"
    }
}

Payment page

Redirection of the user to the URL returned by the payment session creation service paymentSessionUrl (Redirection operated by the merchant)

Merchant return

Redirection of the user to the URL specified in configuration/merchantReturnUrl when calling the payment session creation service (Redirection operated by Floa Pay)
The payment’s result is posted on this URL. The POST contains the same data as the payment notification described in the Payment Notification chapter

Overview of the payment page

Display of specific information

BACK TO BASKET

This link is only displayed if the configuration/merchantBackUrl data is completed

Items

Corresponds to the amount indicated in orderData/orderRowsAmount (displays 0 if not filled)

Delivery

Corresponds to the amount indicated in orderData/orderShippingAmount (displays 0 if not filled)

Voucher / promo code

Corresponds to the amount indicated in orderData/orderDiscountAmount (not displayed if not completed)

Management fees

Corresponds to the amount indicated in orderData/orderFeesAmount (not displayed if not completed)

Total amount

Corresponds to the amount of the order orderData/amount

❗️

ATTENTION

No calculations of the amounts are made automatically. The amounts displayed are those sent in the service. It is up to the merchant to make sure that the values are consistent.