Skip to content

Purchase metadata

Helena Vitásková edited this page Dec 14, 2022 · 3 revisions

The parameters in Bold are mandatory for the calls.

Notice: for all parameters of type String the following validation is performed: whitespace character (space, tab, line separator) is not allowed at the beginning or ending of the value. If so, the error response is returned:

HTTP/1.1 400 Bad request
Content-Type: application/json

{
  "resultCode": 100,
  "resultMessage": "Invalid format of email, begins/ends with whitespace"
}

customer data  

Additional purchase related data about the customer.

Item Type Description
name String Customer name, max. Length 45 characters.
email String customer e-mail, max. length 100 characters.
homePhone String Customer phone number (landline). Enter a phone number in the following form: "prefix.subscriber", separated by "." (dot), e.g. "+420.800300300". Prefix contains prefixes (international prefix, can start with "+" or "00" characters, allowed values are e.g. "420", "+420" and "00420"), subscriber contains phone number without prefixes, can contain gaps.
workPhone String Customer's telephone number ("business" telephone). The format is the same as for homePhone.
mobilePhone String Customer phone number (mobile phone). The format is the same as for homePhone.
account Object Customer account details in the merchant's e-shop. See the customer.account structure below.
login Object Details on logging in to the customer account in the merchant's e-shop. See the customer.login structure below.

customer.account data  

Customer account details in the merchant's e-shop.

Item Type Description
createdAt String Date of opening the user's customer account in the e-shop. ISO8061 format is accepted.
changedAt String The date of the last change of the customer's account in the e-shop, including the type of change of the billing or delivery address. ISO8061 format is accepted.
changedPwdAt String Date of the last change (or reset) of the user's password to the customer's account in the e-shop. ISO8061 format is accepted.
orderHistory Number The number of times the OneClick template was used for purchases on this customer account in the last 180 days. Minimum allowed value: 0, maximum: 9999.
paymentsDay Number The number of purchases (both successful and unsuccessful) on the customer's account in the last 24 hours, regardless of the payment method. Minimum allowed value: 0, maximum: 999.
paymentsYear Number The number of purchases (both successful and unsuccessful) on the customer's account in the last 365 days, regardless of the payment method. Minimum allowed value: 0, maximum: 999.
oneclickAdds Number The number of attempts to create a OneClick template in a customer's account in the last 24 hours. Minimum allowed value: 0, maximum: 999.
suspicious Boolean Indication of suspicious activity of the user or customer account in the e-shop for the entire history of the customer account, including previous (successful or stopped) fraud attempts.
false = no suspicious activity
true = suspicious activity in the e-shop.

customer.login data  

Details for logging into the customer account in the merchant's e-shop.

Item Type Description
auth String Details for logging into the customer account in the merchant's e-shop.:
guest - without login ("shopping as a guest")
account - login with your name and password into the e-shop
federated - login using the federated ID (i.e. data not directly from the e-shop but from the identity of the provider)
issuer - login using the card issuer's data
thirdparty - login using third-party authentication tools
fido - login using FIDO authenticator
fido_signed - login using FIDO authenticator (including signed data)
api - SRC (Secure Remote Commerce) Assurance Data.
authAt String Customer login date and time. ISO8061 format is accepted.
authData String Additional login details. The merchant can provide the publisher with additional data (defined by the login method) if one of the federated, fido, fido_signed or api methods was used to log in (see the auth parameter above).

Example of filled customer data:

{
  "name":"Jan Novák",
  "email":"jan.novak@example.com",
  "mobilePhone":"+420.800300300",
  "account": {
    "createdAt":"2022-01-12T12:10:37+01:00",
    "changedAt":"2022-01-15T15:10:12+01:00"
  },
  "login": {
    "auth":"account",
    "authAt":"2022-01-25T13:10:03+01:00"
  }
}

order data  

Additional purchase data related to the order.

Item Type Description
type String The type of payment that the customer makes in the e-shop:
purchase - purchase of goods and services
balance - recharge a prepaid account
prepaid - prepaid card activation; credit
cash - so called quasi-cash transaction, for example, currency exchange operations, transactions using travel cheques
check - check acceptance.
availability String Goods availability indicator:
now - goods available for immediate dispatch
preorder - goods with future availability
or it is possible to fill in the expected date of availability of pre-ordered goods in ISO8061 format, eg "YYYY-MM-DD".
delivery String Delivery method indicator. If the order contains both physical and electronic goods, use the value that best describes how the physical goods are delivered. If the order contains only electronic goods, use the value that best describes how to deliver the most expensive item. Allowed values:
shipping - if addressMatch is set to true, the goods will be delivered to the customer's billing address, if false, it will be sent to the delivery address (which in this case is different from the billing address)
shipping_verified - if addressMatch is set to true, the goods will be delivered to the customer's billing address, if false, it will be shipped to another verified address registered by the merchant
instore - pickup at the point of sale (the address of the point of sale must be filled in the delivery address)
digital - electronic goods (contains online services, electronic gift cards)
ticket - tickets, air tickets and tickets delivered electronically
other - other (e.g. games, undelivered digital services, electronic subscriptions to newspapers and magazines, etc.)
deliveryMode String Delivery time:
0 - electronic delivery
1 - same day delivery
2 - next day delivery
3 - delivery in two days or later
deliveryEmail String e-mail address to which the merchant delivers electronic goods (gift card codes, etc.), max. length 100 characters.
nameMatch Boolean The customer name (see parameter customer.name) is the same for the delivery address?
true = yes, the name is the same
false = the name is different.
addressMatch Boolean The customer's shipping and billing address is the same?
true = yes, the addresses are the same
false = the addresses are not the same.
If both addresses are exactly the same, the payment gateway will set this indicator to true even if it is not sent via the merchant's API.
billing Object Customer billing address. See the order.address structure below.
shipping Object Customer shipping address. See the order.address structure below.
shippingAddedAt String Date of adding the shipping address. ISO8061 format is accepted.
reorder Boolean An indicator of whether this customer is repeating the purchase of goods/services: false - No, the first purchase, true - yes, repeated purchase of the same goods.
giftcards Object More detailed information about gift or prepaid cards included in the purchase. See the order.giftcards structure described below.

order.address data  

Order address.

Item Type Description
address1 String The first line of the address, typically a street and house or street number, max. length 50 characters.
address2 String The second line of the address, max. length 50 characters.
address3 String The third line of the address, max. length 50 characters.
city String City, max length 50 characters.
zip String Postal code, max. length 16 characters.
state String State (territorial unit) of the given country according to ISO 3166-2.
country String Earth. Country code value according to ISO 3166-1 alpha-3, eg CZE.

order.giftcards data  

Details of the gift or prepaid cards that are included in the purchase.

Item Type Description
totalAmount Number The total sum of the values of gift or prepaid cards in minor units that are included in the purchase in the given currency.
currency String Currency related to order.giftcards.totalAmount. Allowed values: CZK, EUR, USD, GBP, HUF, PLN, RON, NOK, SEK.
quantity Number The total number of gift cards in the purchase. Set the value from 1 to 99.

Example of filled order data:

{
  "Type":"purchase",
  "availability":"now",
  "delivery":"shipping",
  "deliveryMode": "1",
  "addressMatch":true,
  "billing": {
    "address1":"Karlova 1",
    "city":"Praha",
    "zip":"11000",
    "country":"CZE",
  }
}

Example of filled order data:

{
  "type":"purchase",
  "availability":"now",
  "delivery":"digital",
  "deliveryMode": "0",
  "deliveryEmail": "delivery@example.com"
}
Clone this wiki locally