Integration with Checkout Solution is a lightweight procedure that requires two code snippets. The snippets are integrated to Client’s System User Interface and Client’s System Back-End. Client’s Back-End is involved to achieve high security of transferred data between Client and Checkout Solution.
In general client integration steps are depicted below:
This section describes high level architecture of Checkout Solution and explains integration approach.
Business context provides overview of business use cases that are implemented by Checkout Solution. Use Case diagram is depicted below:
System context diagram depicts involved systems and their relationships.
As can be seen a User redirected from Client’s Web site to Checkout Solution Web Site in order to execute checkout (payment) process. The Checkout Solution abstracts the Neonomics API from the Client.
This section provides information about the communication between the Client's system and Neonomics Checkout
Integration between Client’s System and Neonomics Checkout is done via REST API:
As can be seen Client’s System Back-End calls Neonomics Checkout via REST API in order to create CheckoutRequest. The CheckoutRequest caries parameters: apiKey, amount, currency, referenceId, remittance information, etc. These parameters are transferred in a protected way between the Client’s Back-End and Neonomics Checkout, so they can’t be changed by a user. Parameters description is provided below.
The specification is intended to provide information about integration endpoint and fields.
Endpoint: Create CheckoutRequest
HTTP Path: /api/v1/checkout-requests
Sandbox Environment: https://checkout.sandbox.neonomics.io/
Sandbox Sample App: https://checkout.sandbox.neonomics.io/sample-shop/
- represents a simple app which integrates with the checkout
Live Environment: https://checkout.neonomics.io/
Endpoint is called by Client's back-end.
Endpoint checks client's api-key in Postgres DB.
JSON object with the next fields:
URL redirections back to Client:
Example of the JSON object:
The fields reference and referenceType are mandatory, while referenceIssuer is optional. If the referenceType is "KID", the length should be minimum 4, maximum 25 digits and digits only.
Example of the JSON object:
All of the fields of the object are String type. Note that creditorName is mandatory, while at least one of iban or bban is needed. Note that in case both the iban and bban are present the payment will be completed using the iban. In case only the bban is present, it will be converted to iban and used for the transaction.
The response is a JSON object. It contains a redirectUrl field and a checkout id number.
Integrating with Neonomics Checkout follows two easy steps where you have to:
After going through the checkout process, the user will be redirected back to the URL you specified in the redirect parameters depending on the result of the checkout (success, failure or cancellation). The following examples illustrates a setup using HTML and PHP, and HTML and Java. If you need help for other languages, please feel free to get in touch with us.
HTML Frontend: Place a "Pay Now" button or link on a page you wish your customers to complete the payments.
This HTML code adds to your website product information and a button which will initiate the whole process. The Pay Now button simply does a call towards the server-side plugin.
PHP Server-Side: Plugin which triggers the call towards the Neonomics Checkout endpoint
A click on the Front-End component would trigger the execution of the PHP code below. This is an example of how the server-side can initiate the process for creating a checkout request.
YOUR_DOMAIN - here goes the domain in which the HTML snippet is being hosted.
For example https://-yourDomain-.com/cart
postData - the body of the request which will arrive on the checkout.sandbox.neonomics.io/api/v1/checkout-request endpoint. Note that all the fields are hardcoded in this example to illustrate the purpose. You might use dynamic data for these fields.
CURLOPT_URL - this is the Checkout Project Endpoint which will receive the request
api-key – API key generated when the Merchant was registered to have access to the Checkout Project.
Note that this key will identify the merchant to the endpoint and allow access afterward.
redirectUrl - received as a response from the Checkout Endpoint (example : https://checkout.sandbox.neonomics.io/app/checkouts/0a0a048f-7e4d-1955-817e-5281e0ec0026). Once this is received the page will automatically redirect to this URL (the end-user is forwarded to the Neonomics Checkout to perform the payment).
successUrl/failUrl/cancelUrl - represent your pages where the Neonomics Checkout will redirect to afterwards according to the outcome. For example, in case of success, the end-user could be redirected to: https://-yourDomain-.com/cart/successPage
HTML Frontend: Similar to the HTML example above, this code will make a POST request towards a Java endpoint.
Java Server-Side: Plugin which triggers the call towards the Neonomics Checkout endpoint
Corresponding to the above outlined PHP code snippet, here an example in Java which could be referenced from the Frontend HTML code accordingly:
If you need any further help with code implementations, please do not hesitate to get in touch with us!