Zinia API Integration Guide v1.8
Zinia API Integration Guide v1.8
1
5 Daily Settlement & Reporting ............................................................................................................... 77
2
1 Introduction
Zinia APIs have been designed to facilitate integration with e-commerce platforms in a quick and easy way.
This document sets out the integration flow and all the API documentation required to carry out the
integration using just a few lines of code.
All the information needed to integrate your e-commerce shop with the Zinia BNPL payment method can
be found in this document.
Follow these four simple steps to carry out the Zinia integration process:
1. Create an account with Zinia and request your test credentials.
Please contact our Merchant IT Support ([email protected]) and provide it with the
following details:
• Contact person, email address and other contact details
• Full business name
• E-commerce brand name
• E-commerce URL
• Short shop description
We will set up a specific SANDBOX environment for you to test your shop integration and provide
you with the Test API Credentials, which comprise:
• Client ID: Unique username that identifies your store.
• Client Secret: String associated with your Client ID and used to authorise access to our APIs
(password).
• Merchant API Key: Key that allows you to subscribe to and use our APIs.
We will also provide you with another set of credentials for the production environment.
• Should you decide to interact with Zinia through a payment gateway, an API Key will be shared
with the gateway that will need to be used in conjunction with your credentials.
3. Integrate with the Zinia BNPL payment method at checkout by calling the Zinia Checkout API (POST
/checkout/orders). The Checkout API will provide a URL to show users the Zinia checkout payment
screen (customer Link-Up process) to consolidate the order.
3
Customer at ecommerce Ecommerce. captures
selects products filling basket additional information
Merchant
Merchant
Product Catalog Add Customer Zinia Merchant
Data: BNPL Payment Sale
TV 1 … Phone? Page Confirmation
TV 2 … Email?
TV 3 … Shipping Address
Billing Address
Shop BUY
…
Customer
/v1/Order API
There is also an option to directly create an order in Zinia without the customer having to go through
the Link-Up process. This is carried out by calling the Zinia Link-Up API (POST /link-up/orders
and POST /link-up/orders/{orderId}/confirm).
4. Integrate your store’s order management shipment and refund system with the Zinia Orders API for
cancellations (POST /order-management/orders/{orderId}/cancellations), shipment
confirmation (POST / order-management/orders/{orderId}/captures) and refunds (POST /
order-management/orders/{orderId}/refunds).
Merchant
Warehouse
shipment
User receives
package at
home
/v1/orders/{orderId}/captures
4
2 Getting Started
2.2 Authentication
To authenticate with Zinia, you need to use your API credentials and OAuth 2.0.
To receive both your live and test API credentials contact Merchant IT Support ([email protected]).
The API credentials consist of three elements:
• Client ID: Unique username that identifies your store.
example: merchant-username-example
• Client Secret: String associated with your Client ID and used to authorise access to our APIs (Password).
example: a4b8f2170a163d0f64fe7fbe74d0f1976ff90d67196c6620cda21a9c0e4d
• Merchant API Key: Key that allows you to subscribe to and use our APIs.
example: Bbmf9fm0gr83x19UK6a1kSwQFX333R9p
The above credentials will be used to obtain your “accessToken” and “ApiKey”:
• accessToken: Use the Zinia Merchant Security API (POST /cf-api-
auth/authentication/merchant/login).
The accessToken will last for a limited period of time. The expiration information is contained in the
response of this endpoint within the attribute "expiresIn".
All API requests require an access token, but you can use the same access token in all API calls while it
is valid. When it expires, another one will have to be requested.
example: 5X5zC840w27MOapfMbnv22iYkezNH3MeHBKwhJtEjBo=
• ApiKey: To generate yours, encrypt the string “MerchantApiKey#accessToken” using the “publicKey”
and RSA-OAEP-256 algorithm. Finally, encode the resulting string to Base64 format.
example: 5810f3dfffd6497db63b8764ba42c4407f6efded
5
2.3 Data Formats
In the endpoint description, each parameter type (string, number, DateTime, etc.) is described.
Furthermore, a standardised format is used for the following data across all Zinia APIs.
Please note that any rule stated in the description of a specific parameter overrides the general rules
explained in this section.
• Currency
We use the Alpha-3 currency code established in the ISO-4217 standard for defining currencies.
Examples: EUR, GBP or USD.
• Country
Countries are expressed using the Alpha-2 country codes established in the ISO-3166 standard.
Examples: NL for the Netherlands, GB for Great Britain and ES for Spain.
• Dates
Dates are expressed according to the ISO 8601 standard with combined date, time and time zone: YYYY-
MM-DDThh:mm[:ss[.nnn]]Z (24-hour format).
Example: 2021-12-23T12:34:56Z
An exception to this is the dates of birth field, where values are accepted in the YYYY-MM-DD format.
Example: 1980-11-15
• Language
Languages are expressed using a composition of language and country codes expressed as ll-LL, where:
o ll: Language Code: Two lowercase alphanumeric positions as per ISO 639-1.
o LL: Country Code: Two uppercase alphanumeric positions as per ISO 3166-1 Alpha-2.
Examples: en-GB, nl-NL or es-ES.
• Strings
Strings usually have a character limit. Please see the specification of each endpoint to find out more about
a particular field.
• Amount
Amounts should be sent as decimal-number values with 2-digit precision.
Examples: 43.56 for €43.56
• Encoding
All data sent to the Zinia APIs must be UTF-8 encoded.
6
2.4 HTTP Status Codes & Errors
2.4.1 Convention
Our API uses the general HTTP response status codes, mainly 2xx (successful), 4xx (client error) and 5xx
(server error) codes.
Our error messages in the response body will always appear in the following format:
• 201 - Created
This status confirms that your HTTP request has been received and that the resource has been created
successfully. You will usually get this status for any order creation, capture (shipping goods), cancellation or
refund request.
{
"resourceId": "<order/capture/cancellation/refund_id>"
}
• 204 – No Content
This status indicates that the server has successfully fulfilled the request and that there is no additional
content to be sent in the response payload body. You could get this status when trying to retrieve
information for the Checkout webpage using the wrong search criteria in the request.
In this case, there is no Response Body.
7
"description": " field:[amount], rejected value:[566.700]",
"errorCode": "BAD_REQUEST"
}
• 401 - Unauthorised
The access token is missing or invalid, or you are trying to log in using invalid credentials.
{
"description": " Unauthorized!",
"errorCode": "UNAUTHORIZED"
}
When the request is not authorised, a HTML response may also appear:
<head><title>401 Authorization Required</title></head>
<body>
<center><h1>401 Authorization Required</h1></center>
<hr><center>openresty/1.21.4.1</center>
</body>
</html>
• 403 - Forbidden
This would appear if your token does not have the rights required, e.g., if you try to capture (ship), cancel or
refund a transaction that belongs to another account/business.
{
"description": " Operation cannot be executed",
"errorCode": "FORBIDDEN"
}
• 409 - Conflict
If the same capture, cancellation or refund request is sent twice within a 5-minute period, the second
repeated request will not be processed and this error message will appear.
{
"description": " Concurrent capture/cancellation/refund error",
"errorCode": "CONFLICT"
}
{
"description": " Unprocessable Entity",
8
"errorCode": "UNPROCESSABLE_ENTITY"
}
• Related endpoints
• Merchant Login
• Create Checkout Order
9
In order to do that, the Merchant will have to retrieve the risk data information, Zinia customer legal checks
and payment option quotes (if relevant to the chosen payment option) to be shown in the Checkout
Webpage. When the Customer place the Order, all of this information will be included in the request.
To be able to consolidate the Order, an SMS will be sent to the customer mobile phone with an OTP code.
The customer will have to introduce it in the Merchant Checkout page to be sent across to Zinia for
validation.
No Notifications are needed in this scenario as the response is sent synchronously.
• Related endpoints
• Merchant Login
• Retrieve Risk Data
• Retrieve Customer Legal Checks
• Retrieve Payment Option Quotes
• Submit Order
• Confirm Order
10
2.5.3 Link-Up via API without OTP
If the Merchant does not want the customer to go through Zinia Web Link-Up Process, they can retrieve all
the relevant information and create the Order directly in Zinia.
In order to do that, the Merchant will have to retrieve the risk data information, Zinia customer legal checks
and payment option quotes (if relevant to the chosen payment option) to be shown in the Checkout
Webpage. When the Customer place the Order, all of this information will be included in the request.
This way of integrating is not available by default as it requires a specific approval from Zinia Risk Team
that only will be granted in very specific cases.
No Notifications are needed in this scenario as the response is sent synchronously.
• Related endpoints
• Merchant Login
• Retrieve Risk Data
• Retrieve Customer Legal Checks
• Retrieve Payment Option Quotes
• Create Order
11
Status Description
NEW The order was created, but it has not yet been consolidated (still to go
through the Zinia Link-Up and scoring phases).
CHECKOUT_EXPIRED The order has not been consolidated before the "expirationTime". The
customer did not finalise the Zinia Link-Up process within the predefined
time limit.
CHECKOUT_DECLINED The order consolidation process has failed due either to reasons of risk or
fraud or to it being cancelled by the customer prior to its consolidation.
CHECKOUT_FAILED The order consolidation process has failed due to reasons unrelated to risk,
fraud or a customer cancellation.
ORDER_EXPIRED The order has been successfully consolidated, but none of the items has
been shipped within the deadline.
ORDER_CANCELLED All of the order items have been cancelled by the merchant, so nothing will
be shipped to the customer.
If an order is partially cancelled (one or more items of the order have been
cancelled by the merchant, but not all of them) the order will remain in the
“CHECKOUT_COMPLETE” status.
ORDER_SHIPPED All of the order items have been shipped to the customer.
If a partial capture (shipment) of the order is carried out (one or more items
of the order have been shipped to the customer, but not all of them) the
order will remain in the “CHECKOUT_COMPLETE” status.
ORDER_REFUNDED All the order items that were shipped to the customer have been returned,
so the full order will have to be refunded.
If a partial refund of the order is carried out (one or more items of the order
that were shipped to the customer have been returned, but not all of them)
the order will remain in the “ORDER_SHIPPED” status.
This status-flow diagram illustrates the different transitions that could happen within Zinia and how you are
notified of them (synchronous vs. notification process):
12
13
3 Zinia APIs
3.1.1 Login
This operation carries out the merchant log in based on the credentials provided by the Security Team.
It will give you the “accessToken” to encrypt the “MerchantApiKey” and to obtain the “ApiKey” that will have
to be included in all requests sent to Zinia along with the “accessToken” itself.
The “accessToken” will last for a limited period of time. The expiration information is also contained in the
response of this endpoint in the attribute called "expiresIn".
You can use the same “accessToken” in all API calls while it is valid. When it expires, another one will have
to be requested.
Should you decide to interact with Zinia through a payment gateway, an API Key will be shared with the
gateway that will need to be used in conjunction with your credentials.
3.1.1.1 Parameters
3.1.1.1.1 Body parameters
Name Description
body* {
Required: clientId, clientSecret, grantType
clientId*:
string
Username of the merchant
example: merchant-username-example
clientSecret*:
string
Password of the merchant
example:
a4b8f2170a163d0f64fe7fbe74d0f1976ff90d67196c6620cda21a9c0e4d
grantType*:
string
Indicates the grant type required
Enum: client_credentials
example: client_credentials
}
14
3.1.1.2 Responses
3.1.1.2.1 Status: 200 - OK
Description:
The log-in process has been carried out successfully and the login accessToken can be found in the response.
Schema:
{
accessToken: string Merchant login accessToken
example: EmtSkdWA3Gb37pDiMk1WtWm79eUbiVXsyKDxdoDK6Ic=
expiresIn: integer (int32) Time to session expiration date (in seconds). If conversion fails, it'll
return -1
example: 1199
errorCode: string
example: BAD_REQUEST
}
Example:
{
"description": "Bad Request, please review it and try again",
"errorCode": "BAD_REQUEST"
}
This service creates a checkout order. The response will contain the Link-Up URL where customers have to
be redirected in order to validate their phone number and to complete the purchase. As soon as the
checkout order is consolidated, the order should be processed using the Orders API.
3.2.1.1 Parameters
3.2.1.1.1 Header parameters
Name Description
Authorization* Required
string
Bearer <accessToken>. Where the accessToken has already been obtained in the
response of the “login” endpoint
example: Bearer EmtSkdWA3Gb37pDiMk1WtWm79eUbiVXsyKDxdoDK6Ic=
ApiKey* Required
string
16
Encrypted ApiKey obtained using the accessToken and the Merchant API Key
provided by Zinia to the merchant and encoded to Base64 format
example: 5810f3dfffd6497db63b8764ba42c4407f6efded
body* {
Required: merchantOrderId, channel, email, customer, addresses,
orderItems, purchaseCountry, purchaseCurrency and orderTotalAmount.
channel*: string
Channel through which the purchase was carried out:
• ECOMMERCE: The purchase is made through the e-commerce store
and the items are sent to the customer.
• POS: The purchase is made at the physical shop and the customer
leaves with the items.
• POS_HOME_DELIVERY: The purchase is made at the physical store
and the items are sent to the customer.
• CLICKANDCOLLECT: The purchase is made through the e-commerce
store but the items are to be collected by the customer at the physical
store.
• CALL_CENTER: The purchase is made through the Merchant call
centre.
Restrictions:
• When "channel" is informed as "POS":
o BILLING Address is required.
• When "channel" is informed as "ECOMMERCE":
o The same Address has to be sent in both BILLING and
SHIPPING Addresses (both required).
Enum: ECOMMERCE , POS , POS_HOME_DELIVERY , CALL_CENTER
and CLICKANDCOLLECT
example: ECOMMERCE
17
failureUrl: string maxLength:300
URL to redirect the customer when there was an issue placing the order. We
recommend indicating this URL for a good user experience.
example:
https://www.your.shop.tld/callback/failure/{transactionId}
customer*:
Customer's information
{
Required: firstName and lastName
gender: string
Customer's gender
Enum: MALE , FEMALE
example: MALE
firstName*: string
Customer's first name
example: John
lastName*: string
Customer's last name
example: Smith
legalDocuments:
Customer's legal documents (used for identification)
[
Required: docNumber and docType
docNumber*: string
Legal document number
example: 12345678G
docType*: string
Legal document type
Enum: NATIONAL_ID , SSN , FOREIGN_NATIONAL_NUMBER and
PASSPORT
18
example: NATIONAL_ID
]
title: string
Customer's title
Enum: Mr , Mrs , Miss and Ms
example: Mr
type: string
Customer type
Enum: PERSON
example: PERSON
organizationName: string
Name of the organisation (in the event the customer type is a
company) (Only for B2B customers)
example: IBM
organizationRegistrationId: string
Registration ID of the Organization (in the event that the customer
type is a company) (Only for B2B customers)
example: 123423-CO
}
addresses*:
Customer’s addresses:
Restrictions:
• Sending 2 or more addresses with the same value in "addresses.type"
field: SHIPPING / BILLING is not permitted.
• When "channel" is informed as "POS":
o BILLING Address is required.
• When "channel" is informed as "E-COMMERCE":
o The same Address has to be sent in both BILLING and
SHIPPING Addresses (both required).
[ {
Customer’s Address
Required: firstName, lastName, streetName, streetNumber,
postalCode, city, country and type
19
title: string
Customer's title
Enum: Mr , Mrs , Miss and Ms
example: Mr
firstName*: string
Customer's first name
example: John
lastName*: string
Customer's last name
example: Smith
type*: string
20
Address type
Restrictions:
• When "channel" is informed as "POS":
o BILLING Address is required.
• When "channel" is informed as "ECOMMERCE":
o The same Address has to be sent in both BILLING and
SHIPPING Addresses (both required).
Enum: SHIPPING and BILLING
example: BILLING
} ]
orderItems*:
List of the items in the order
[ {
Item details
Required: name, reference, unitPrice, quantity and totalAmount
21
totalTaxAmount: number (double) maximum:100
Total tax amount based on the tax rate
example: 10
serialNumber:
Item serial number
[
serialNumber: string
Serial number
example: XRF328871WQ
]
} ]
3.2.1.2 Responses
3.2.1.2.1 Status: 201 – Created
Description:
The checkout order has been created successfully and the Link-Up URL is contained in the response so that
the customer can consolidate the order.
Schema:
{
Required: orderId, status and expirationTime
redirectUrl: string
URL where the customer must be redirected to consolidate the checkout order
example: https://customers.zinia.com/{orderId}
status*: string
Order status. You can find more information about order statuses in the Order Status Overview
section of this document.
Enum: NEW , CHECKOUT_COMPLETE , RISK_FRAUD , FAILED , CANCELLED
example: NEW
23
The server cannot process the request due to issues regarding the request body, for example:
• The request body is missing.
• Some of the mandatory fields are missing.
• The request body contains data with the wrong format or invalid values or patterns.
• The value entered in “paymentOptionTypeCode” corresponds to a payment option that is not
engaged by the merchant.
Schema:
{
description:
string example: Bad Request, please review it and try again
errorCode: string
example: BAD_REQUEST
}
Examples:
This is the generic bad-request response that may appear:
{
"description": "Bad request, please review it and try again",
"errorCode": "BAD_REQUEST"
}
The description will often contain more details on the fields where the errors have occurred:
• If several fields are incorrect, “BAD_REQUEST” will appear in “errorCode”:
{
"description": "field:[purchaseCurrency], rejected value:[],
field:[purchaseCurrency], rejected value:[], field:[purchaseCurrency], rejected
value:[]",
"errorCode": "BAD_REQUEST"
}
• If there is only one field generating the error, the “errorCode” value will specify it using the format
“fieldName +_MANDATORY”, for example: "STREET_NUMBER_MANDATORY",
"TOTAL_AMOUNT_MANDATORY", "STREET_NAME_MANDATORY", "QUANTITY_MANDATORY",
"FIRST_NAME_MANDATOR", etc.
{
"description": "field:[orderItems[0].totalAmount], rejected value:[null]",
"errorCode": " TOTAL_AMOUNT_MANDATORY"
}
errorCode: string
example: UNAUTHORIZED
}
24
Example:
This is the generic unauthorized response:
{
"description": " Unauthorized!",
"errorCode": "UNAUTHORIZED"
}
However, a HTML response may also appear:
<head><title>401 Authorization Required</title></head>
<body>
<center><h1>401 Authorization Required</h1></center>
<hr><center>openresty/1.21.4.1</center>
</body>
</html>
errorCode: string
example: FORBIDDEN
}
Example:
{
"description": " Operation cannot be executed",
"errorCode": " FORBIDDEN"
}
errorCode: string
example: GENERIC_ERROR
}
Example:
{
"description": "An error occurred, please try again later",
"errorCode": "GENERIC_ERROR"
}
25
3.2.2 Retrieve Risk Data
This service retrieves the risk data information needed to Create an Order without going through the Zinia
Link-Up process (Create Order / Submit Order / Link-Up via API).
3.2.2.1 Parameters
3.2.2.1.1 Header parameters
Name Description
Authorization* Required
string
Bearer <accessToken>. Where the accessToken has already been obtained in the
response of the “login” endpoint
example: Bearer EmtSkdWA3Gb37pDiMk1WtWm79eUbiVXsyKDxdoDK6Ic=
ApiKey* Required
string
Encrypted ApiKey obtained using the accessToken and the Merchant API Key
provided by Zinia to the merchant and encoded to Base64 format
example: 5810f3dfffd6497db63b8764ba42c4407f6efded
country* Required
string
Country where the Order is going to be Purchased, ISO 3166 alpha-2
example: DE
3.2.2.2 Responses
3.2.2.2.1 Status: 200 – OK
Description:
The risk data has been retrieved successfully and it is contained in the Payload of the response.
Schema:
{
Required: tmxId and orgId
26
orgId*: string
Organization Identifier for the logged merchant
example: bstxgewe
}
Example:
{
"tmxId":"2006cb55595d9fbf7a142e90f97cccc7",
"orgId": "bstxgewe"
}
errorCode: string
example: BAD_REQUEST
}
Examples:
This is the generic bad-request response that may appear:
{
"description": "Bad request, please review it and try again",
"errorCode": "BAD_REQUEST"
}
errorCode: string
example: FORBIDDEN
}
Example:
{
"description": " Operation cannot be executed",
"errorCode": " FORBIDDEN"
}
errorCode: string
example: GENERIC_ERROR
}
Example:
{
"description": "An error occurred, please try again later",
"errorCode": "GENERIC_ERROR"
28
}
This service retrieves the Customer legal information that needs to be checked by the Customer to be able
to Create an Order without going through the Zinia Link-Up process (Create Order / Submit Order / Link-Up
via API).
3.2.3.1 Parameters
3.2.3.1.1 Header parameters
Name Description
Authorization* Required
string
Bearer <accessToken>. Where the accessToken has already been obtained in the
response of the “login” endpoint
example: Bearer EmtSkdWA3Gb37pDiMk1WtWm79eUbiVXsyKDxdoDK6Ic=
ApiKey* Required
string
Encrypted ApiKey obtained using the accessToken and the Merchant API Key
provided by Zinia to the merchant and encoded to Base64 format
example: 5810f3dfffd6497db63b8764ba42c4407f6efded
applicationLocale* Required
string
Language in which the Consumer wants to retrieve the information.
Format: Language Code (Two lowercase alphanumeric positions as per ISO 639-
1) - Country Code (Two uppercase alphanumeric positions as per ISO 3166-1).
example: en-EN
country string
Country where the Order is going to be Purchased, ISO 3166 alpha-2
example: DE
3.2.3.2 Responses
3.2.3.2.1 Status: 200 – OK
Description:
The Customer legal checks have been retrieved successfully and they are contained in the Payload of the
response.
29
Schema:
{
consents:
List of consents to be shown to the Customer in the Checkout webpage
[ {
Required: documentId, title, text, metadata, sortOrder and required.
documentId*: string
Consent identifier
example: product_offerings
title*: string
Tittle of the consent to be shown in the Checkout webpage
example: Our products and services
text*: string
Text of the consent to be shown in the Checkout webpage.
This text can contain links to URLs and they will be informed with the tag “<urlName>”, for
example, “<urlPrivacy>”. Those URLs will be informed in the fields
“consents.metadata.assetsLinks.url_name”, for example,
“consents.metadata.assetsLinks.url_privacy”.
example: By ticking this box, […]
metadata*:
Metadata information regarding the consent: Internal data and Link URLs to be embedded in
the Text of the Consent.
{
Required: poEditorKey.
poEditorKey*: string
Key of the consent within Zinia Document Management System.
example: productOfferingsCategoryNameDescription.countryDE
poEditorText: string
Text of the consent within Zinia Document Management System.
example: By ticking this box, […]
assetsLinks:
URLs to be embedded in the links included in the Consent Text (field “consents.text”).
The consent text can contain links to URLs and they will be informed with the tag
“<urlName>”, for example, “<urlPrivacy>”. Those URLs will be informed in this fields.
{
< * >: string
The name of the attribute will be the name of the link within the consent text in
snake_case. If the tag in the consent text is “emailPrivacy”, the name of this
attribute will be “email_privacy”.
The value of the attribute will be the URL to be embedded on the link.
example: "email_privacy": "[email protected]"
}
}
30
example: 1
required*: boolean
Whether it is required or not to inform about this Consent in the Creation of the Order (Submit)
example: true
} ]
terms:
List of terms and conditions to be shown to the Customer in the Checkout webpage
[ {
Required: documentId, title, text, metadata, sortOrder and required.
documentId*: string
Term and condition identifier
example: terms_Link-Up_general
title*: string
Tittle of the term and condition to be shown in the Checkout webpage
example: Terms and Conditions
text*: string
Text of the term and condition to be shown in the Checkout webpage.
This text can contain links to URLs and they will be informed with the tag “<urlName>”, for
example, “<pdfTerms>”. Those URLs will be informed in the fields
“terms.metadata.assetsLinks.url_name”, for example,
“terms.metadata.assetsLinks.pdf_terms”.
example: I accept Zinia's […]
metadata*:
Metadata information regarding the term and condition: Internal data and Link URLs to be
embedded in the Text of the term and condition.
{
Required: poEditorKey.
poEditorKey*: string
Key of the term and condition within Zinia Document Management System.
example: termsLink-UpGeneralCategoryNameDescription.countryDE
poEditorText: string
Text of the term and condition within Zinia Document Management System.
example: I accept Zinia's […]
assetsLinks:
URLs to be embedded in the links included in the term and condition text (field
“terms.text”).
The term and condition text can contain links to URLs and they will be informed with
the tag “<urlName>”, for example, “<pdfTerms >”. Those URLs will be informed in this
fields.
{
< * >: string
The name of the attribute will be the name of the link within the term and
condition text in snake_case. If the tag in the term and condition text is
“pdfTerms”, the name of this attribute will be “pdf_terms”.
31
The value of the attribute will be the URL to be embedded on the link.
example: "pdf_terms": "
https://www.zinia.com/assets/TERMS.pdf"
}
}
required*: boolean
Whether it is required or not to inform about this term and condition in the Creation of the
Order (Submit)
example: true
} ]
policies:
List of policies to be shown to the Customer in the Checkout webpage
[ {
Required: documentId, title, text, metadata, sortOrder and required.
documentId*: string
Policy identifier
example: privacy_Link-Up
title*: string
Tittle of the policy to be shown in the Checkout webpage
example: Privacy Policy
text*: string
Text of the policy to be shown in the Checkout webpage.
This text can contain links to URLs and they will be informed with the tag “<urlName>”, for
example, “<pdfPrivacy>”. Those URLs will be informed in the fields
“policies.metadata.assetsLinks.url_name”, for example,
“policies.metadata.assetsLinks.pdf_privacy”.
example: I have read and accept […]
metadata*:
Metadata information regarding the policy: Internal data and Link URLs to be embedded in
the Text of the policy.
{
Required: poEditorKey.
poEditorKey*: string
Key of the policy within Zinia Document Management System.
example: privacyLink-UpAPICategoryNameDescription.countryDE
poEditorText: string
Text of the policy within Zinia Document Management System.
example: I have read and accept […]
assetsLinks:
URLs to be embedded in the links included in the policy text (field “policies.text”).
32
The policy text can contain links to URLs and they will be informed with the tag
“<urlName>”, for example, “<pdfPrivacy>”. Those URLs will be informed in this fields.
{
< * >: string
The name of the attribute will be the name of the link within the policy text in
snake_case. If the tag in the consent text is “pdfPrivacy”, the name of this
attribute will be “pdf_privacy”.
The value of the attribute will be the URL to be embedded on the link.
example: "pdf_privacy": "
https://www.zinia.com/assets/PRIVACY_POLICY.pdf"
}
}
required*: boolean
Whether it is required or not to inform about this policy in the Creation of the Order (Submit)
example: true
} ]
}
Example:
{
"consents": [
{
"documentId": "product_offerings",
"title": "Our products and services",
"text": "By ticking this box, you consent to Zinia (Open Bank S.A.), as data
controller, sending you customised marketing (by SMS, instant messaging applications,
email, push notifications, pop-ups or any other electronic or telematic means)
relating to its products and services that may interest you and based on your customer
profile, which has been created in accordance with Zinia's internal risk criteria
and <urlPrivacy>external source</urlPrivacy> consultations. You can exercise your
personal data rights, including withdrawal of your consent, by sending an email to
<emailPrivacy>[email protected]</emailPrivacy>. For further information, see
Zinia's <urlPrivacy>Privacy Policy</urlPrivacy>.\n",
"metadata": {
"poEditorKey":
"clLowlands.services.personalData.userInformation.marketingConsents.clMarketingCons
ents.productOfferingsCategoryNameDescription.countryDE",
"poEditorText": "By ticking this box, you consent to Zinia (Open Bank S.A.),
as data controller, sending you customised marketing (by SMS, instant messaging
applications, email, push notifications, pop-ups or any other electronic or telematic
means) relating to its products and services that may interest you and based on your
customer profile, which has been created in accordance with Zinia's internal risk
criteria and <urlPrivacy>external source</urlPrivacy> consultations. You can
exercise your personal data rights, including withdrawal of your consent, by sending
an email to <emailPrivacy>[email protected]</emailPrivacy>. For further
information, see Zinia's <urlPrivacy>Privacy Policy</urlPrivacy>.\n",
"assetsLinks": {
"url_privacy": "https://www.zinia.com/assets/CF_DE/de-
DE/documents/v1/DE.ZINIA.LINK-UP.PRIVACY_POLICY.pdf",
"url_santander": "https://www.zinia.com/assets/CF_DE/de-
DE/documents/v1/DE.ZINIA.LINK-UP.PRIVACY_POLICY.DOCUMENT.ENTITIES.pdf",
"pdf_privacy": "https://www.zinia.com/assets/CF_DE/de-
DE/documents/v1/DE.ZINIA.LINK-UP.PRIVACY_POLICY.pdf",
"pdf_terms": "https://www.zinia.com/assets/CF_DE/de-
DE/documents/v1/DE.ZINIA.LINK-UP.TERMS_AND_CONDITIONS_CUSTOMERS.pdf",
33
"email_privacy": "[email protected]"
}
},
"sortOrder": 2,
"required": false
}
],
"terms": [
{
"documentId": "terms_Link-Up_general",
"title": "Terms and Conditions",
"text": "I accept Zinia's <pdfTerms>Terms and Conditions</pdfTerms> (including
applicable collection costs for late payment) and its <pdfPrivacy>Privacy
Policy</pdfPrivacy>.",
"metadata": {
"poEditorKey":
"clLowlands.services.personalData.userInformation.termsAndConditions.clTermsAndCond
itions.termsLink-UpGeneralCategoryNameDescription.countryDE",
"poEditorText": "I accept Zinia's <pdfTerms>Terms and Conditions</pdfTerms>
(including applicable collection costs for late payment) and its <pdfPrivacy>Privacy
Policy</pdfPrivacy>.",
"assetsLinks": {
"url_privacy": "https://www.zinia.com/assets/CF_DE/de-
DE/documents/v1/DE.ZINIA.LINK-UP.PRIVACY_POLICY.pdf",
"url_santander": "https://www.zinia.com/assets/CF_DE/de-
DE/documents/v1/DE.ZINIA.LINK-UP.PRIVACY_POLICY.DOCUMENT.ENTITIES.pdf",
"pdf_privacy": "https://www.zinia.com/assets/CF_DE/de-
DE/documents/v1/DE.ZINIA.LINK-UP.PRIVACY_POLICY.pdf",
"pdf_terms": "https://www.zinia.com/assets/CF_DE/de-
DE/documents/v1/DE.ZINIA.LINK-UP.TERMS_AND_CONDITIONS_CUSTOMERS.pdf",
"email_privacy": "[email protected]"
}
},
"sortOrder": 1,
"required": false
}
],
"policies": [
{
"documentId": "privacy_Link-Up",
"title": "Privacy Policy",
"text": "I have read and accept the <pdfPrivacy>Privacy Policy</pdfPrivacy>",
"metadata": {
"poEditorKey":
"clLowlands.services.personalData.userInformation.PrivacyPolicy.clPrivacyPolicy.pri
vacyLink-UpAPICategoryNameDescription.countryDE",
"poEditorText": "I have read and accept the <pdfPrivacy>Privacy
Policy</pdfPrivacy>",
"assetsLinks": {
"url_privacy": "https://www.zinia.com/assets/CF_DE/de-
DE/documents/v1/DE.ZINIA.LINK-UP.PRIVACY_POLICY.pdf",
"url_santander": "https://www.zinia.com/assets/CF_DE/de-
DE/documents/v1/DE.ZINIA.LINK-UP.PRIVACY_POLICY.DOCUMENT.ENTITIES.pdf",
"pdf_privacy": "https://www.zinia.com/assets/CF_DE/de-
DE/documents/v1/DE.ZINIA.LINK-UP.PRIVACY_POLICY.pdf",
"pdf_terms": "https://www.zinia.com/assets/CF_DE/de-
DE/documents/v1/DE.ZINIA.LINK-UP.TERMS_AND_CONDITIONS_CUSTOMERS.pdf",
"email_privacy": "[email protected]"
}
},
"sortOrder": 1,
"required": false
}
]
34
}
errorCode: string
example: BAD_REQUEST
}
Examples:
This is the generic bad-request response that may appear:
{
"description": "Bad request, please review it and try again",
"errorCode": "BAD_REQUEST"
}
errorCode: string
example: UNAUTHORIZED
}
Example:
This is the generic unauthorized response:
35
{
"description": " Unauthorized!",
"errorCode": "UNAUTHORIZED"
}
However, a HTML response may also appear:
<head><title>401 Authorization Required</title></head>
<body>
<center><h1>401 Authorization Required</h1></center>
<hr><center>openresty/1.21.4.1</center>
</body>
</html>
errorCode: string
example: FORBIDDEN
}
Example:
{
"description": " Operation cannot be executed",
"errorCode": " FORBIDDEN"
}
errorCode: string
example: GENERIC_ERROR
}
Example:
{
"description": "An error occurred, please try again later",
"errorCode": "GENERIC_ERROR"
}
36
In case the Customer wants to select the INSTALLMENTS Payment Option in Zinia, this endpoint will retrieve
the simulation of the quotes based on the available Payment Options of the Merchant.
3.2.4.1 Parameters
3.2.4.1.1 Header parameters
Name Description
Authorization* Required
string
Bearer <accessToken>. Where the accessToken has already been obtained in the
response of the “login” endpoint
example: Bearer EmtSkdWA3Gb37pDiMk1WtWm79eUbiVXsyKDxdoDK6Ic=
ApiKey* Required
string
Encrypted ApiKey obtained using the accessToken and the Merchant API Key
provided by Zinia to the merchant and encoded to Base64 format
example: 5810f3dfffd6497db63b8764ba42c4407f6efded
channel* Required
string
Channel through which the purchase was carried out:
• ECOMMERCE: The purchase is made through the e-commerce store and the
items are sent to the customer.
• POS: The purchase is made at the physical shop and the customer leaves with
the items.
• POS_HOME_DELIVERY: The purchase is made at the physical store and the
items are sent to the customer.
• CLICKANDCOLLECT: The purchase is made through the e-commerce store but
the items are to be collected by the customer at the physical store.
• CALL_CENTER: The purchase is made through the Merchant call centre.
Enum: ECOMMERCE , POS , POS_HOME_DELIVERY , CALL_CENTER and CLICKANDCOLLECT
example: ECOMMERCE
amount* Required
number (double)
Total Amount of the Order.
example: 736
3.2.4.2 Responses
3.2.4.2.1 Status: 200 – OK
Description:
37
The payment option quotes have been retrieved successfully and they are contained in the Payload of the
response.
Schema:
{
paymentOptions:
List of available Payment Options for the Merchant.
[ {
Required: paymentOptionId, paymentOptionCode, paymentOptionTypeCode, and data.
paymentOptionId*: string
Payment Option internal identifier
Enum: PAY_IN_14 , PAY_IN_30 , SLICE_IN_3 , PAY_IN_3M , PAY_IN_6M , PAY_IN_12M ,
PAY_IN_18M , PAY_IN_24M and PAY_IN_36M
example: PAY_IN_30
paymentOptionCode*: string
Payment Option internal code
Enum: PAY_IN_14 , PAY_IN_30 , SLICE_IN_3 , PAY_IN_3M , PAY_IN_6M , PAY_IN_12M ,
PAY_IN_18M , PAY_IN_24M and PAY_IN_36M
example: PAY_IN_30
paymentOptionTypeCode*: string
Payment Option Type internal code
Enum: BNPL , SLICE_IN_3 and INSTALLMENTS
example: BNPL
data*:
Payment information for this Payment Option.
{
Required: numberOfInstallments, purchaseCurrency, totalAmount and
installments.
purchaseCurrency*: string
Currency of the purchase, ISO 4217
example: EUR
installments*:
List of the scheduled payments to be collected by Zinia. The number of elements in this
list will be the same as the value of the attribute
“paymentOptions.data.numberOfInstallments”.
[ {
Required: sequenceNumber and amount.
38
sequenceNumber*: integer (int32)
Sequence number of this instalment
example: 1
39
The server has successfully fulfilled the request but there are no payment option quotes to show for the
requested search criteria.
Schema:
N/A
Example:
N/A
errorCode: string
example: BAD_REQUEST
}
Examples:
This is the generic bad-request response that may appear:
{
"description": "Bad request, please review it and try again",
"errorCode": "BAD_REQUEST"
}
errorCode: string
example: UNAUTHORIZED
}
Example:
This is the generic unauthorized response:
{
"description": " Unauthorized!",
"errorCode": "UNAUTHORIZED"
}
However, a HTML response may also appear:
40
<head><title>401 Authorization Required</title></head>
<body>
<center><h1>401 Authorization Required</h1></center>
<hr><center>openresty/1.21.4.1</center>
</body>
</html>
errorCode: string
example: FORBIDDEN
}
Example:
{
"description": " Operation cannot be executed",
"errorCode": " FORBIDDEN"
}
errorCode: string
example: GENERIC_ERROR
}
Example:
{
"description": "An error occurred, please try again later",
"errorCode": "GENERIC_ERROR"
}
This service submits an Order to Zinia. This operation will have to include the risk data information, Zinia
customer legal checks and payment option quotes (if relevant to the chosen payment option) as part of the
request:
• Retrieve Risk Data
• Retrieve Customer Legal Checks
• Retrieve Payment Option Quotes
All the details regarding this endpoint (Parameters & Responses) are still being developed. This section will
be completed as soon as the service is available for consumption.
To be able to consolidate the Order submitted in the previous step, an OTP code will be sent by SMS to the
customer mobile phone. This endpoint will be the one responsible of the validation of that code and
consolidation of the Order.
All the details regarding this endpoint (Parameters & Responses) are still being developed. This section will
be completed as soon as the service is available for consumption.
This service creates an order in Zinia. This endpoint and that in the Checkout API should not be mixed up:
• This endpoint directly creates an order in Zinia.
• The endpoint in the Checkout API creates a checkout order in Zinia. The Customer has to complete
the web Link-Up process to consolidate the checkout order and convert it into an order.
The response body will contain the order identifier and its status.
42
3.4.1.1 Parameters
3.4.1.1.1 Header parameters
Name Description
Authorization* Required
string
Bearer <accessToken>. Where the accessToken has already been obtained in the
response of the “login” endpoint
example: Bearer EmtSkdWA3Gb37pDiMk1WtWm79eUbiVXsyKDxdoDK6Ic=
ApiKey* Required
string
Encrypted ApiKey obtained using the accessToken and the merchant API Key
provided by Zinia to the merchant and encoded to Base64 format
example: 5810f3dfffd6497db63b8764ba42c4407f6efded
body* {
Required: channel, birthdate, merchantOrderId, unverifiedCustomer,
userIpAddress, addresses, orderItems, purchaseCountry,
purchaseCurrency, orderTotalAmount and purchaseDate.
channel*: string
Channel through which the purchase was carried out:
• ECOMMERCE: The purchase is made through the e-commerce store
and the items are sent to the customer.
• POS: The purchase is made at the physical store and the customer
leaves with the items.
• POS_HOME_DELIVERY: The purchase is made at the physical store
and the items are sent to the customer.
• CALL_CENTER: The purchase is made through a telephone call.
• CLICKANDCOLLECT: The purchase is made through the e-commerce
store and the items are to be collected by the customer at the physical
store.
Restrictions:
• When "channel" is informed as "POS":
o BILLING Address is required.
• When "channel" is informed as "ECOMMERCE":
o The same Address has to be sent in both BILLING and
SHIPPING Addresses (both required).
Enum: ECOMMERCE , CLICKANDCOLLECT , POS_HOME_DELIVERY , CALL_CENTER
and POS
example: E-COMMERCE
unverifiedCustomer*:
Unverified customer information
{
Required: firstName and lastName
gender: string
Customer's gender
44
Enum: MALE , FEMALE
example: MALE
firstName*: string
Customer's first name
example: John
lastName*: string
Customer's last name
example: Smith
legalDocuments:
Customer's legal documents
[
docNumber: string
Legal document number
example: 12345678G
docType: string
Legal document type
Enum: NATIONAL_ID , SSN , FOREIGN_NATIONAL_NUMBER and
PASSPORT
example: NATIONAL_ID
]
title: string
Customer's title
Enum: Mr , Mrs , Miss and Ms
example: Mr
type: string
Customer type
Enum: PERSON
example: PERSON
organizationName: string
Name of the organization (in the event that the Customer type is a
company) (Only for B2B customers)
example: IBM
organizationRegistrationId: string
Registration ID of the organization (in the event that the customer
type is a company) (Only for B2B customers)
example: 123423-CO
language: string
Language of the unverified customer in format “ll-LL”, where:
• ll: Language Code: Two lowercase alphanumeric positions as
per ISO 639-1.
• LL: Country Code: Two uppercase alphanumeric positions as
per ISO 3166-1 Alpha-2.
example: en-GB
45
consents:
Consents to be created along with the unverified customer.
[ {
Required: documentId
documentId*: string
Consent Identifier
example: external_resources
value: boolean
Accepted/Rejected value for the current consent
example: true
} ]
terms:
Terms to be created along with the unverified customer.
[ {
Required: documentId
documentId*: string
Term Identifier
example: external_resources
value: boolean
Accepted/Rejected value for the current term
example: true
} ]
policies:
Policies to be created along with the unverified customer.
[ {
Required: documentId
documentId*: string
Policy identifier
example: external_resources
value: boolean
Accepted/Rejected value for the current policy
example: false
} ]
}
userIpAddress*: string
Unverified customer's IP Address
example: 124.0.0.1
addresses*:
Customer’s addresses:
Restrictions:
• Sending 2 or more addresses with the same value in "addresses.type"
field: SHIPPING / BILLING is not permitted.
• When "channel" is informed as "POS":
o BILLING Address is required.
46
• When "channel" is informed as "ECOMMERCE":
o The same Address has to be sent in both BILLING and
SHIPPING Addresses (both required).
[ {
Customer’s Address
Required: firstName, lastName, streetName, streetNumber,
postalCode, city, country and type
title: string
Customer's title
Enum: Mr , Mrs , Miss and Ms
example: Mr
firstName*: string
Customer's first name
example: John
lastName*: string
Customer's last name
example: Smith
47
city*: string maxLength:200
Customer's city
example: Leeds
type*: string
Address type
Restrictions:
• When "channel" is informed as "POS":
o BILLING Address is required.
• When "channel" is informed as "ECOMMERCE":
o The same Address has to be sent in both BILLING and
SHIPPING Addresses (both required).
Enum: SHIPPING and BILLING
example: BILLING
} ]
orderItems*:
List of the items in the order
[ {
Item details
Required: name, reference, unitPrice, quantity and totalAmount
48
quantity*: integer (int32)
Quantity
example: 1
serialNumber:
Items’ serial numbers
[
serialNumber: string
Serial number
example: XRF328871WQ
]
} ]
paymentOptionId: string
Payment option internal identifier chosen for the order
Enum: PAY_IN_14 , PAY_IN_30 , SLICE_IN_3 , PAY_IN_3M , PAY_IN_6M ,
PAY_IN_12M , PAY_IN_18M , PAY_IN_24M and PAY_IN_36M .
example: PAY_IN_30
49
Total amount. It is calculated as S( orderItems.totalAmount -
orderItems.totalDiscountAmount) + orderDeliveryFee
example: 130
browserInfo:
Unverified customer’s browser information
{
Required: javaEnabled, javascriptEnabled, cookiesEnabled,
language, platform, screenColorDepth, screenHeight, screenWidth,
timeZone, userAgent and acceptHeader.
javaEnabled*: boolean
Flag to indicate whether Java is enabled in the browser
example: true
javascriptEnabled*: boolean
Flag to indicate whether JavaScript is enabled in the browser
example: true
cookiesEnabled*: boolean
Flag to indicate whether the cookies are enabled in the browser
example: true
language*: string
Language of the browser in format “ll-LL”, where:
• ll: Language Code: Two lowercase alphanumeric positions as
per ISO 639-1.
• LL: Country Code: Two uppercase alphanumeric positions as
per ISO 3166-1 Alpha-2.
example: en-GB
platform*: string
Browser platform
example: Win32
screenColorDepth*: integer($int32)
Screen colour depth
screenHeight*: integer($int32)
Screen height
screenWidth*: integer($int32)
Screen width
timeZone*: integer($int32)
Time zone
userAgent*: string
User agent
acceptHeader*: string
Accept header
}
50
agentOrderId: string maxLength:200
Agent (payment gateway) order identifier
example: HB3434
tmxId: string
Threatmetrix identifier for the operation
proprietaryMerchantData:
This object will contain specific information required by each merchant.
However, the information is not “universal”
{
channelId: string maxLength:300
Merchant identifier for BNPL Germany
example: df9789fa99
}
isCustomerTrusted: boolean
Confirm by the merchant that it trusts the customer and a lower scoring could
be applied.
example: false
}
3.4.1.2 Responses
3.4.1.2.1 Status: 201 - Created
Description:
The order has been created successfully and the order identifier is contained in the response.
Schema:
{
orderId: string (uuid)
51
Order identifier
example: 123e4567-e89b-12d3-a456-426614174000
status: string
Order status. You can find more information about order statuses in the Order Status Overview
section of this document.
Enum: CHECKOUT_COMPLETE , CHECKOUT_PENDING , RISK_FRAUD and FAILED
example: CHECKOUT_COMPLETE
paymentMethods:
Payment method information that customers can use to make the payment. This information usually
refers to bank transfers.
{
Required: paymentMethodCode
paymentMethodCode*: string
Payment method internal identifier
Enum: CARD , BANK_TRANSFER and IDEAL
example: BANK_TRANSFER
data:
Additional information regarding the payment method identified by
“paymentMethodTypeCode”.
If paymentMethodTypeCode = BANK_TRANSFER
{
recipient: string
Recipient of the bank transfer
example: Zinia
iban: string
IBAN the bank transfer has been sent to
example: ES3600730100522030000001
bank: string
Bank the bank transfer has been sent to
example: Zinia
bic: string
BIC for the bank transfer
example: OPENESMMXXX
description: string
Reference of the bank transfer. This field will be used to match the payment with the
order
example: DE11WL0ZAU
}
If paymentMethodTypeCode = IDEAL
{
Required: banks
banks*:
List of iDeal Banks
[ {
iDeal Bank Details
52
Required: code and reference
code*: string
Issuer code
example: 3151
reference*: string
Issuer reference
example: Test Bank
} ]
}
}
}
Example:
{
"orderId": "ceedfd75-e4b9-439f-96ba-3eed4e200c85",
"status": "CHECKOUT_COMPLETE",
"paymentMethods": [
{
"paymentMethodCode": "BANK_TRANSFER",
"data": {
"recipient": "Zinia",
"iban": "ES3600730100522030000001",
"bank": "Zinia",
"bic": "OPENESMMXXX",
"description": "DE112WY8XD"
}
}
]
}
errorCode: string
example: BAD_REQUEST
}
Example:
This is the generic bad-request response that may appear:
{
"description": "Bad Request, please review it and try again",
"errorCode": "BAD_REQUEST"
}
The description will often contain more details on the fields where the errors have occurred:
{
53
"description": "field:[purchaseCountry], rejected
value:[iVlc],field:[purchaseCountry], rejected value:[iVlc]",
"errorCode": "BAD_REQUEST"
}
errorCode: string
example: UNAUTHORIZED
}
Example:
This is the generic unauthorized response:
{
"description": " Unauthorized!",
"errorCode": "UNAUTHORIZED"
}
However, an HTML response may also appear:
<head><title>401 Authorization Required</title></head>
<body>
<center><h1>401 Authorization Required</h1></center>
<hr><center>openresty/1.21.4.1</center>
</body>
</html>
errorCode: string
example: FORBIDDEN
}
Example:
{
"description": " Operation cannot be executed",
"errorCode": " FORBIDDEN"
}
54
The order cannot be consolidated as some business rules have not been met, for example:
• The OTP is not valid.
• Risk and Fraud failure.
• Other Internal Business Rules.
Schema:
{
description: string
example: User information did not meet the business requirements to execute
the operation
errorCode: string
example: UNPROCESSABLE_ENTITY
}
errorCode: string
example: GENERIC_ERROR
}
Example:
{
"description": "An error occurred, please try again later",
"errorCode": "GENERIC_ERROR"
}
You will use this endpoint to capture fully or partially the order amount. You should call this endpoint when
the order items have been shipped to the customer and it should be included in the shipping information.
The capture can be carried out by “amount” or by “items” depending on the information received in the
request:
• By amount: A capture by amount will be carried out when the “amount” attribute is informed in the
request.
o If “amount” equals “0”, a full capture will be carried out.
• By items: A capture by items will be carried out when the “orderItems” attribute is informed in the
request.
• If neither the “amount” nor the “orderItems” attribute is informed, a full capture will be carried out.
• If both the “amount” and the “orderItems” attributes are informed, it will be considered a bad
request.
55
3.4.2.1 Parameters
3.4.2.1.1 Path parameters
Name Description
orderId* Required
UUID (uuid)
Order identifier
example: f98b34a0-5fe7-4082-854e-9df1200374eb
Authorization* Required
string
Bearer <accessToken>. Where the accessToken has already been obtained in the
response of the “login” endpoint
example: Bearer EmtSkdWA3Gb37pDiMk1WtWm79eUbiVXsyKDxdoDK6Ic=
ApiKey* Required
string
Encrypted ApiKey obtained using the accessToken and the Merchant API Key
provided by Zinia to the merchant and encoded to Base64 format
example: 5810f3dfffd6497db63b8764ba42c4407f6efded
body* {
shippingDetails:
Details of the shipment
{
trackTraceCode: string
Track trace code
example: 12334324
trackTraceUrl: string
Track trace URL
example: http://tracktrace-url.com/
carrier: string
Carrier’s name
example: SEUR
shippingDate: string
Date when the order was shipped. The format is 'yyyy-mm-dd'. ISO
8601 (Date)
example: 2021-01-01
56
shippingCost:number
Additional cost due to the shipment type
example: 13
}
reason:string maxLength:300
Reason why the order is being captured
example: Fulfilled by warehouse
invoiceId:string maxLength:300
Invoice identifier
example: AB12345
poNumber:string maxLength:200
Purchase order number
example: 965430823
invoiceUrl:string maxLength:300
Invoice URL
example: http://url/invoice?sid=1234
otpValue:string maxLength:200
This field is only used with “POS” orders. It will contain the code sent to the
customer for the purchase and it will be internally validated.
example: Z36I
orderItems:
List of items from the order that are shipped on this capture.
If neither the “amount” nor the “items” attribute is informed, a full capture of
the order will be carried out.
[ {
Order item to be captured
Required: reference, name and quantity
reference*: string
Item reference
example: 123456
name*: string
Name of the item
example: TV 4k
57
quantity*: integer (int32)
Quantity of the item to be captured
example: 1
} ]
}
3.4.2.2 Responses
3.4.2.2.1 Status: 201 – Created
Description:
The order has been captured successfully and the capture identifier is contained in the response.
Schema:
{
Required: captureId
captureId*: string
Capture identifier
example: 1234
}
Example:
{
"captureId": "935d5fae-afc3-4a5f-a446-2c9028b311a2_1666962762835"
}
errorCode: string
example: BAD_REQUEST
}
Example:
This is the generic bad-request response that may appear:
{
"description": "Bad Request, please review it and try again",
"errorCode": "BAD_REQUEST"
}
The description will often contain more details on the fields where the errors have occurred:
{
58
"description": "field:[amount], rejected value:[557.040]",
"errorCode": "BAD_REQUEST"
}
errorCode: string
example: UNAUTHORIZED
}
Example:
This is the generic unauthorized response:
{
"description": " Unauthorized!",
"errorCode": "UNAUTHORIZED"
}
However, an HTML response may also appear:
<head><title>401 Authorization Required</title></head>
<body>
<center><h1>401 Authorization Required</h1></center>
<hr><center>openresty/1.21.4.1</center>
</body>
</html>
errorCode: string
example: FORBIDDEN
}
Example:
{
"description": " Operation cannot be executed",
"errorCode": " FORBIDDEN"
}
59
The order identifier entered in the path parameter is invalid or does not exist in Zinia for the registered
merchant.
Schema:
{
description: string
example: There is not a current representation for the target resource
errorCode: string
example: NOT_FOUND
}
Example:
{
"description": "Not Found",
"errorCode": "NOT_FOUND"
}
errorCode: string
example: CONFLICT
}
Example:
{
"description": "Concurrent capture error",
"errorCode": "CONFLICT"
}
60
errorCode: string
example: UNPROCESSABLE_ENTITY
}
Example:
{
"description": "Unprocessable Entity",
"errorCode": "UNPROCESSABLE_ENTITY"
}
errorCode: string
example: GENERIC_ERROR
}
Example:
{
"description": "An error occurred, please try again later",
"errorCode": "GENERIC_ERROR"
}
This service provides the capability to cancel an order fully or partially. This can only be done before it has
been captured (shipped). Once that has occurred, the “Refund” endpoint should be used.
The cancellation can be carried out by “amount” or by “items” depending on the information received in the
request:
• By amount: A cancellation by amount will be carried out when the “amount” attribute is informed in
the request.
o If “amount” equals 0, a full cancellation will be carried out.
• By Items: A cancellation by items will be carried out when the “orderItems” attribute is informed in
the request.
• If neither the “amount” nor the “orderItems” attribute is informed, a full cancellation will be carried
out.
• If both the “amount” and the “orderItems” attributes are informed, it will be considered a bad
request.
3.4.3.1 Parameters
3.4.3.1.1 Path parameters
Name Description
61
orderId* Required
UUID (uuid)
Order identifier
example: f98b34a0-5fe7-4082-854e-9df1200374eb
Authorization* Required
string
Bearer <accessToken>. Where the accessToken has already been obtained in the
response of the “login” endpoint
example: Bearer EmtSkdWA3Gb37pDiMk1WtWm79eUbiVXsyKDxdoDK6Ic=
ApiKey* Required
string
Encrypted ApiKey obtained using the accessToken and the Merchant API Key provided
by Zinia to the merchant and encoded to Base64 format
example: 5810f3dfffd6497db63b8764ba42c4407f6efded
body* {
amount: number (double)
Amount of the order to be cancelled. If the amount is equal to 0, a full
cancellation will be executed.
If neither the “amount” nor the “orderItems” attribute is informed, a full
cancellation of the order will be carried out.
example: 30.1
orderItems:
List of items from the order that are cancelled on this request.
If neither the “amount” nor the “items” attribute is informed, a full cancellation
of the order will be carried out.
[ {
Order item to be cancelled
Required: reference, name and quantity
reference*: string
Item reference
example: 123456
62
name*: string
Name of the item
example: TV 4k
3.4.3.2 Responses
3.4.3.2.1 Status: 201 - Created
Description:
The order has been fully or partially cancelled successfully and the cancellation identifier is contained in the
response.
Schema:
{
Required: cancellationId
cancellationId*: string
Cancellation identifier
example: 1234
}
Example:
{
"cancellationId": "47040"
}
errorCode: string
example: BAD_REQUEST
}
Example:
This is the generic bad-request response that may appear:
{
"description": "Bad Request, please review it and try again",
"errorCode": "BAD_REQUEST"
63
}
The description will often contain more details on the fields where the errors have occurred:
{
"description": " field:[amount], rejected value:[99999999999.99]",
"errorCode": "BAD_REQUEST"
}
errorCode: string
example: UNAUTHORIZED
}
Example:
This is the generic unauthorized response:
{
"description": " Unauthorized!",
"errorCode": "UNAUTHORIZED"
}
However, an HTML response may also appear:
<head><title>401 Authorization Required</title></head>
<body>
<center><h1>401 Authorization Required</h1></center>
<hr><center>openresty/1.21.4.1</center>
</body>
</html>
errorCode: string
example: FORBIDDEN
}
Example:
{
"description": " Operation cannot be executed",
"errorCode": " FORBIDDEN"
}
64
3.4.3.2.5 Status: 404 - Not found
Description:
The order identifier entered in the path parameter is invalid or it does not exist in Zinia for the registered
merchant.
Schema:
{
description: string
example: There is not a current representation for the target resource
errorCode: string
example: NOT_FOUND
}
Example:
{
"description": "Not Found",
"errorCode": "NOT_FOUND"
}
errorCode: string
example: CONFLICT
}
Example:
{
"description": "Concurrent cancellation error",
"errorCode": "CONFLICT"
}
65
example: User information did not meet the business requirements to execute
the operation
errorCode: string
example: UNPROCESSABLE_ENTITY
}
Example:
{
"description": "Unprocessable Entity",
"errorCode": "UNPROCESSABLE_ENTITY"
}
errorCode: string
example: GENERIC_ERROR
}
Example:
{
"description": "An error occurred, please try again later",
"errorCode": "GENERIC_ERROR"
}
This service provides the capability to refund an order fully or partially. Only items or amounts that have
been captured (shipped) can be refunded. If that has not yet occurred, the “cancellations” endpoint should
be used instead.
Refunds can be carried out by “amount” or by “items” depending on the information received in the request:
• By amount: A refund by amount will be carried out when the “amount” attribute is informed in the
request.
o If “amount” equals 0, a full refund will be carried out.
• By items: A refund by items will be carried out when the “orderItems” attribute is informed in the
request.
• If neither the “amount” nor the “orderItems” attribute is informed, a full refund will be carried out.
• If both the “amount” and the “orderItems” attributes are informed, it will be considered a bad
request.
66
3.4.4.1 Parameters
3.4.4.1.1 Path parameters
Name Description
orderId* Required
UUID (uuid)
Order identifier
example: f98b34a0-5fe7-4082-854e-9df1200374eb
Authorization* Required
string
Bearer <accessToken>. Where the accessToken has already been obtained in the
response of the “login” endpoint
example: Bearer EmtSkdWA3Gb37pDiMk1WtWm79eUbiVXsyKDxdoDK6Ic=
ApiKey* Required
string
Encrypted ApiKey obtained using the accessToken and the Merchant API Key
provided by Zinia to the merchant and encoded to Base64 format
example: 5810f3dfffd6497db63b8764ba42c4407f6efded
body* {
amount: number (double)
Amount of the order to be refunded. If the amount is equal to 0, a full refund
will be executed.
If neither the “amount” nor the “orderItems” attribute is informed, a full
refund of the order will be carried out.
example: 30.1
orderItems:
List of items from the order that are to be refunded.
If neither the “amount” nor the “orderItems” attribute is informed, a full
refund of the order will be carried out .
[ {
Order item to be refunded
Required: reference, name and quantity
67
reference*: string
Item reference
example: 123456
name*: string
Name of the item
example: TV 4k
3.4.4.2 Responses
3.4.4.2.1 Status: 201 - Created
Description:
The order has been fully or partially refunded successfully and the refund identifier is contained in the
response.
Schema:
{
Required: refundId
refundId*: string
Refund identifier
example: 1234
}
Example:
{
"refundId": "6995314"
}
errorCode: string
example: BAD_REQUEST
}
68
Example:
This is the generic bad-request response that may appear:
{
"description": "Bad Request, please review it and try again",
"errorCode": "BAD_REQUEST"
}
The description will often contain more details on the fields where the errors have occurred:
{
"description": " field:[orderItems[0].reference], rejected value:[null]",
"errorCode": "BAD_REQUEST"
}
errorCode: string
example: UNAUTHORIZED
}
Example:
This is the generic unauthorized response:
{
"description": " Unauthorized!",
"errorCode": "UNAUTHORIZED"
}
However, an HTML response may also appear:
<head><title>401 Authorization Required</title></head>
<body>
<center><h1>401 Authorization Required</h1></center>
<hr><center>openresty/1.21.4.1</center>
</body>
</html>
errorCode: string
example: FORBIDDEN
}
Example:
69
{
"description": " Operation cannot be executed",
"errorCode": " FORBIDDEN"
}
errorCode: string
example: NOT_FOUND
}
Example:
{
"description": "Not Found",
"errorCode": "NOT_FOUND"
}
errorCode: string
example: CONFLICT
}
Example:
{
"description": "Concurrent refund error",
"errorCode": "CONFLICT"
}
70
Schema:
{
description: string
example: User information did not meet the business requirements to execute
the operation
errorCode: string
example: UNPROCESSABLE_ENTITY
}
Example:
{
"description": "Unprocessable Entity",
"errorCode": "UNPROCESSABLE_ENTITY"
}
errorCode: string
example: GENERIC_ERROR
}
Example:
{
"description": "An error occurred, please try again later",
"errorCode": "GENERIC_ERROR"
}
71
4 Zinia Notification Process
4.1 Overview
The notification process informs you of any change made during the order life cycle.
To receive notifications, Zinia needs to know the endpoint where you want them to be sent. This is done
through the order creation process:
The “noticeUrl” is one of the parameters received in the request body of the checkout order creation (find
more information regarding this request the Checkout section):
noticeUrl: string maxLength:300
URL where notifications of any change in the order will be sent.
example: https://www.your.shop.tld/callback/notice/{transactionId}
Once an order has been updated in Zinia, you will be notified of it through the notification process:
72
Status Description
CHECKOUT_EXPIRED The order has not been consolidated before the "expirationTime". The
customer did not finalise the Zinia Link-Up process within the predefined
time limit.
CHECKOUT_DECLINED The order consolidation process has failed due either to reasons of risk or
fraud or to it being cancelled by the customer prior to its consolidation.
CHECKOUT_FAILED The order consolidation process has failed due to reasons unrelated to risk,
fraud or a customer cancellation.
ORDER_EXPIRED The order has been successfully consolidated, but none of the items has been
shipped within the deadline.
ORDER_CANCELLED All of the order items have been cancelled by the merchant, so nothing will
be shipped to the customer.
If an order is partial cancelled (one or more items of the order have been
cancelled by the merchant, but not all of them), a notification will be sent
with all the relevant information, but the order will remain in the
“CHECKOUT_COMPLETE” status.
ORDER_SHIPPED All of the items of the order have been shipped to the customer.
If a partial capture (shipment) of the order is carried out (one or more items
of the order have been shipped to the customer, but not all of them), a
notification will be sent with all the relevant information, but the order will
remain in the “CHECKOUT_COMPLETE” status.
If a partial refund of the order is carried out (one or more items of the order
that were shipped to the customer have been returned, but not all of them),
a notification will be sent with all the relevant information and the order will
remain in the “ORDER_SHIPPED” status.
ORDER_REFUNDED All the items of the order that were shipped to the customer have been
returned, so the complete order will have to be refunded.
If a partial refund of the order is carried out (one or more items of the order
that were shipped to the customer have been returned, but not all of them),
a notification will be sent with all the relevant information, but the order will
remain in the “ORDER_SHIPPED” status.
73
If an order was partially captured and a partial/full refund is carried out
(some/all of the shipped items are refunded, but given that it regards a partial
capture, some items are still pending shipment), a notification will be sent
with all the relevant information, but the order will remain in the
“CHECKOUT_COMPLETE” status.
You can find more information about order statuses in the Order Status Overview section of this document.
You can find the scenarios in which you could receive a notification, based on the order status and the
corresponding action carried out, in the following document:
74
2. Check that during that timeframe (2 minutes), no other JWT with the same “Jti” has been received
from Zinia (to avoid replay attacks).
3. Retrieve the actual payload of the notification, generate its SHA-512 and compare it with the
“payload” claim of the JWT.
4. If all of the above checks out, you’re good to accept the notification data.
Name Description
body* {
Required: notificationId, notificationTimestamp, orderId, merchantOrderId and
data.
notificationId*: string
Unique identifier of the notification
example: f98b34a0-5fe7-4082-854e-9df1200374eb
data*:
Notification details
{
Required: status, statusTimestamp and purchaseDate.
operationType: string
Type of operation due to which the notification was triggered.
Enum: CHECKOUT , EXPIRATION , CANCELLATION , SHIP or REFUND .
example: CHECKOUT
operationId: string
75
If the operation that triggered the notification generated a unique identifier,
this field will contain this information (cancellationId, captureId or refundId).
example: 123456
status*: string
Final status of the order (after the operation that triggered the notification has
been carried out). You can find more information about order statuses in the
Order Status Overview section of this document.
Enum: CHECKOUT_COMPLETE , CHECKOUT_DECLINED , CHECKOUT_FAILED , C
HECKOUT_EXPIRED , ORDER_EXPIRED , ORDER_CANCELLED , ORDER_SHIPPED
or ORDER_REFUNDED .
example: CHECKOUT_COMPLETE
76
5 Daily Settlement & Reporting
Settlement payments are processed daily for all orders with shipment confirmations and refunds received.
Merchant payments will be issued based on the settlement calendar agreed, taking an additional day or two
to deposit the funds into your bank account.
For each transaction, settlement reports will include:
• Zinia Order Number: Unique order identifier in the Zinia system. It is included in the field
"result.payment_details.order_id" of the checkout operation response body and of the
notifications.
• Merchant Order Number: Your identifier for the order. Order number or another identifier of this
transaction in your system. This was informed as “order_id” in the create-checkout request body
and included as “reference” in the response bodies of all the operations.
• Transaction: Either PAYMENT or REFUND.
• Date Created: Date when the transaction was carried out (YYYY-MM-DD).
• Site: Useful when setting up different e-commerce websites.
• First Name: Customer’s first name.
• Last Name: Customer’s last name.
• Net Amount: Amount of the reported transaction.
• Cost Fee: Incurred cost for the Zinia transaction.
• Currency: Currency in which the transaction was carried out (Alpha-3 Currency Code ISO-4217).
• Processing Date: Date when the transaction was processed (YYYY-MM-DD).
The settlement file will be sent to you via SFTP and/or email. In order to do that, we need you to email the
following information Merchant IT Support ([email protected]):
• Email address where you want the report to be sent.
• SFTP location where you want the file to be stored.
• The credentials to connect to the SFTP. These can be sent in a different email or using any other
secure process.
77