Mondido.js

A Javascript library where you safely can create payments directly from your checkout page to the mondido API without going through your backend.

To send credit card information from your checkout page we need to encrypt the sensitive data using mondido.js. Instead of having "name" attributes you need to use the attribute "data-encrypt-attribute", mondido.js will then ease your burden by encrypting the data and adding the name attribute before it's being sent to our API. No need for you the roll your own encryption implementation, the library will automatically encrypt the values just before the form is submitted.

Mondido.js is Card Payments Only!

At the moment Mondido.js does only support card payments. If you are looking for alternative payment methods, we suggest to implement the Hosted Window version

The hash and merchant secret

The hash should be calculated in your backend where your secret is not revealed. In these examples the secret is public which is just for demo purposes.

Page character encoding

You should use UTF8 as encoding on your form page to ensure proper values

JavaScript libraries

Our standard JS library can be found on our GitHub page: https://github.com/Mondido/mondido-js

If you are into Angular check out the GitHub page at: https://github.com/Mondido/mondido-angular

Mondido understands the need to incorporate best business practices in security. That's why we've made it easy for merchants to implement 3D Secure or “3 Domain Secure” as the industry standard identity check solution to minimize chargebacks from fraudulent credit cards, all included in our simple pricing. 3D-Secure refers to second authentication factor products such as Verified by Visa, MastercardⓇSecureCode™, American Express SafekeyⓇ, and JCB J/Secure™.

NOTE: While you can create your own payment experience, We strongly recommend using our Hosted Window or Mondido.js solution to save time in implementing 3D-Secure and client side encryption to your checkout procedure.

What you can send

card_holder string

The name on the charged credit card

card_number string

A masked card number ex. 411111****1111

card_expiry string

MMYY ex. 0120

card_type string

VISA, MASTERCARD, etc. (STORED_CARD if the transaction is done with stored card)

amount decimal * required

The transaction amount ex. 12.00, NOTE: must always include two decimals.

We are following ISO 4217 standard so correct format for decimals will vary depending on which currency is being used. Some currencies like JPY doesn’t support amount with decimals (ex .50 or .05, in accordance with ISO 4217), for such currencies it is mandatory to use .00 for decimals with payment methods Card or PayPal. If decimal format is sent in incorrectly, the transaction will not fail upon creation, but rather when the user tries to complete the payment. If currency supports more than 2 decimals only the first 2 can be used (KWD ex. 1.23 but not 1.234). Not following ISO 4217 standard may also cause issues for refund and/or capture under some circumstances.

vat_amount decimal

The vat amount for the transaction ex. 3.00

merchant_id string * required

Your unique id. Can be found in the admin console.

currency string * required

Payment currency (sek, cad, cny, cop, czk, dkk, hkd, huf, isk, inr, ils, jpy, kes, krw, kwd, lvl, myr, mxn, mad, omr, nzd, nok, pab, qar, rub, sar, sgd, zar, chf, thb, ttd, aed, gbp, usd, twd, vef, ron, try, eur, uah, pln, brl)

customer_ref string

A unique customer/user ID from the merchant system, used to identify a customer i different transactions and for stored cards.

payment_ref string* required

A unique order ID from the merchant internal order/payment data (length 1-12)

hash
Loading...
success_url string * required

Not used in AJAX requests. An URL to the page where the user is redirected after a successful transaction. Can contain Liquid.

error_url * required

Not used in AJAX requests. A URL to the page where the user is redirected after a unsuccessful transaction. Can contain Liquid.

metadata string

Your own custom data for example:

<input type="hidden" name="metadata" value="{'user_name':'john doe','email':'jd@mail.com','shoe_size':'42'}">

test boolean

Sets the transaction to be live or in test mode. test = true, only allows test card numbers, test = false, only allow real card numbers.

store_card boolean

true/false if you want to store the card for token based transactions. *

plan_id integer

An ID of a subscription plan in Mondido. The plans are defined in the Admin console. *

subscription_quantity int

A number that says how many times the cost of the subscription plan that should processed. This could be used as a licence factor when the plan cost A amount and the customer want to subscribe to A * the number of licenses (the multiplier) for each period.

webhook object

You can specify a custom Webhook for a transaction. For example sending e-mail or POST to your backend.

authorize boolean

authorize = true, means that the transaction should be reserved (Authorized).

subscription_items object

An array of subscription unique items

* Important when storing a card/subscribing to a plan

In some cases the card can not be stored, but we will still try to charge it. This means that the transaction might be successful even though the card can not be stored.

Always check the response to see if there is a stored_card (or subscription), which will be missing if the card could not be stored.

Example

After having jQuery, include the JavaScript library and pass your personal merchant ID. It is important to have the same merchant_id in the JavaScript and in the input parameter in the form.

<script src="https://cdn-web01.mondido.com/v2/mondido.js?merchant_id={merchant_id}"> </script>

The way you encrypt card data is by using data-encrypt-attribute instead of name html attribute on the input tags.

<input type="text" data-encrypt-attribute="card_holder" value="John Doe"/>

If you don't want to encrypt a value then use the "name" attribute as a normal form POST

<input type="text" name="card_holder" value="John Doe"/>

The action attribute of the form tag should be: https://api.mondido.com/v1/transactions

Try the code pen example:

See the Pen Mondido.JS by Robert (@robertpohl) on CodePen.

  
<!DOCTYPE html>
<html>
    <head>
        <meta content="text/html;charset=utf-8" http-equiv="Content-Type">
        <meta content="utf-8" http-equiv="encoding">
        <title>Mondido.js</title>
    </head>
    <body>
        <form id="mondidopayform" action="https://api.mondido.com/v1/transactions" method="post">
            <label>
            Card holder name
            <input type="text" name="card_holder" value="John Doe"/>
            </label>
            <label>
            Card number
            <input type="text" data-encrypted-attribute="card_number" value="4111111111111111"/>
            </label>
            <label>
            Card type
            <input type="text" name="card_type" value="VISA"/>
            </label>
            <label>
            Card expiry (MMYY)
            <input type="text" name="card_expiry" value="0918"/>
            </label>
            <label>
            CVV
            <input type="text" data-encrypted-attribute="card_cvv" value="200"/>
            </label>
            <label>
            Order ID
            <input type="hidden" name="payment_ref" value="123">
            </label>
            <label>
            Amount
            <input type="hidden" name="amount" value="1.00">
            </label>
            <label>
            Currency
            <input type="hidden" name="currency" value="sek">
            </label>
            <label>
            Hash
            <input type="hidden" name="hash" value="">
            </label>
            <label>
            Merchant ID
            <input type="text" name="merchant_id" value="3">
            </label>
            <label>
            Store Card
            <input type="text" name="store_card" value="true">
            </label>

            <label>
            Webhook
            <input type="text" name="webhook" value='{"url":"https://mybackend.com/confirmOrderFromMondido","trigger":"payment_success","http_method":"post","data_format":"form_data"}'>
            </label>

            <label>
            Metadata
            <input type="text" name="metadata" value='{"products":[{"id":"1","name":"Nice Shoe","price":"100.00","qty":"1","url":"https://mysite.com/product/1"}],"user":{"email":"jd@email.com"}}'>
            </label>

            <input type="hidden" name="customer_ref" value="1">
            <input type="hidden" name="test" value="true">
            <input type="hidden" name="encrypted" value="card_number,card_cvv">

            <input type="submit" value="Pay" class="btn">
        </form>
        <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
        <script src="https://blueimp.github.io/JavaScript-MD5/js/md5.js"></script>
        <script src="https://cdn-web01.mondido.com/v2/mondido.js?merchant_id=3"> </script>
        <script>
            var onSuccess = function (transaction) {
                if(window.mondido.hasCallback){
                    return;
                }
                alert('Thank you for the payment!');
                window.mondido.hasCallback = true;
            };
            var onError = function (error,data) {
                if(window.mondido.hasCallback){
                    return;
                }
                if (data != null) {
                    alert(data.description);
                }
                window.mondido.hasCallback = true;
            };

            var onBefore = function(){
                window.mondido = {hasCallback: false};
            };

            $('#mondidopayform')
                .mondido({type:"ajax"})
                .on('payment:before', onBefore)
                .on('payment:success', onSuccess)
                .on('payment:fail', onError);

            var payment_ref = Math.floor((Math.random() * 10000) + 1).toString(); //random payment reference
            var secret = "$2a$10$k/wS5qecZLyMmqo0e8GV9."; // ssshhh, this is the secret.
            var merchant_id = "3";
            var customer_ref = "customer1";
            var amount = "1.00";
            var h_str = merchant_id+payment_ref+amount+customer_ref+"sek"+"test"+secret;
            var hash = md5(h_str);

            $('input[name="customer_ref"]').val(customer_ref);
            $('input[name="merchant_id"]').val(merchant_id);
            $('input[name="payment_ref"]').val(payment_ref);
            $('input[name="hash"]').val(hash);
            $('input[name="amount"]').val(amount);
        </script>
    </body>
</html>
  

If you are not using AJAX but POST instead, then change:

<input type="hidden" name="success_url" value="https://mysite.com/payment/success">
<input type="hidden" name="error_url" value="https://mysite.com/payment/error">

And POST to the URL: https://pay.mondido.com/v1/form instead.

Options:

  • type: ajax/post
  • success: success callback, sends a transactions object
  • error: error callback, sends an error object

Events
Mondido.js also provides a few events that you can hook in to with the jQuery.on method. See these examples to learn how to use them.

  • mpi:open (event)
    Triggered when the MPI/3D Secure window opens.
    Might be used to for example pop an overlay while the user goes through the MPI flow.

    Called with the event as an argument

  • mpi:close (event)
    Triggered when the MPI/3D Secure window closes.

    Called with the event as an argument

  • payment:success (event, transaction)
    Triggered after a successful payment.

    Called with the event and the transaction as arguments

  • payment:fail (event, error)
    Triggered after a failed payment.

    Called with the event and an error object as arguments

  • payment:before ()
    Triggered before a payment is processed.

    Return false to halt the event chain and prevent the payment from being processed.

Error object:

For example:

error: {
  name: 'errors.card_number.missing',
  code: 118,
  description: 'Card number is missing'
}

Items

Items makes it possible to send product info about the items into a payment. This items array is required for invoice payments and can also be used in subscriptions to add additional product charges intop of the Plan amount.

This data is required if the transaction is of type invoice

artno string (maxlength 50) * required

Article number

description string (maxlength 150) * required

Description about the item

amount integer * required

The total price of all the items

qty string * required

The item quantity

vat string * required

VAT rate, ex 25 (No verification or or calculation is made)

discount string

Discount of the products (No verification or or calculation is made)

Example

[{"artno": "001", "amount": 1, "description": "user license2", "qty": 1, "vat": 25, "discount": 0}]

Metadata

Metadata is custom schemaless information that you can choose to send in to Mondido. It can be information about the customer, the product or about campaigns or offers.

The metadata can be used to customize your hosted payment window or sending personalized receipts to your customers in a webhook.

Example of metadata:

{
  "products":[
  {
    "id":"1",
    "name":"Nice Shoe",
    "price":"100.00",
    "qty":"1",
    "url":"http://mysite.com/product/1"
  }
  ],
  "user":{
    "email":"jd@email.com"
  }
}

The values like products, 1, name, are optional and can be named freely by the merchant. These will be shown in the transaction lists so you can analyze transactions based on metadata and get a comprehensive understanding of your sales.

Why Metadata?

One of the most important benefits of using Mondido is the power of the data that you can send with the payment. The more data you send in the more parameters you have to create custom payment flows and analyze transaction data to see what are your best selling items, services and products.

Popular parameters are:
  • Order information (price, vat, categories, materials, tags)
  • Platform specs (iPhone/Android, OS version, screen size, locale)
  • Application specs (version number, tokens, sessions)
  • Customer information (location, language)

All sent in data can be visualized in your dashboard in graphs or charts so that you easy can follow up and analyze your sales. Mondido understands that making relevant and important business decisions starts with knowing your customers habits, likes and preferences. Incorporating metadata into the payment gives you the best chance to optimize your checkout, A/B test and bring intelligence into your business.

Updating the transaction with shop order ID

By using the API, you can update the Metadata property of an already processed transaction by passing metadata and process = false.

The submitted data will be merged with existing Metadata for that transaction.

By sending, for example: {"shop_order": {"id": "123123"}} as Metadata to the update method, you can connect your internal shop order ID to the Mondido admin view.

Liquid and Metadata

Liquid is an open-source, Ruby-based template language created by Shopify. It is a well-known framework and is used to load dynamic content on storefronts.

Liquid uses a combination of tags, objects, and filters to load dynamic content. They are used inside the Mondido Hosted Window Payment Form to display information from the payment data and make the template dynamic for each customer, product or transaction.

The official documentation can be found here: https://github.com/Shopify/liquid/wiki/Liquid-for-Designers

You can output information in your metadata to your Hosted Windows Form or in a Receipt Webhook using Liquid syntax. Using the example above, this is the way to output it:

Product name: {{ transaction.metadata['products'].first.name }}
Product quantity: {{ transaction.metadata['products'].first.qty }}

To loop all products:

{%for item in transaction.metadata['products']%}
<li>
  Name: {{ item['name'] }},
  Price: {{ item['price'] }} {{transaction.amount | upcase }},
  Quantity {{ item['qty'] }}
</li>
{% endfor %}

Supported Card Types

Where are they used?

You need to POST the card type name as card_type parameter

Default card types that you will have access to are VISA and Mastercard, but the other such as AMEX, JCB and Diners are on separate contracts. Contact support for more information about card types.

visa

Visa

mastercard

MasterCard

maestro

Maestro

electron

Electron

debit_mastercard

Debit MasterCard

visa_debit

Visa Debit

laser

Laser

solo

Solo

amex

American Express

diners

Diners

uk_maestro

UK Maestro

jcb

JCB

ukash_neo

Ukash NEO

discover

Discover

stored_card

Stored Card

Accepted Currencies

sek

Swedish Krona

cad

Canadian Dollar

cny

Chinese Yuan

cop

Colombian Peso

czk

Czech Republic Koruna

dkk

Danish Krone

hkd

Hong Kong Dollar

huf

Hungarian Forint

isk

Icelandic Króna

inr

Indian Rupee

ils

Israeli New Sheqel

jpy

Japanese Yen

kes

Kenyan Shilling

krw

South Korean Won

kwd

Kuwaiti Dinar

lvl

Latvian Lats

myr

Malaysian Ringgit

mxn

Mexican Peso

mad

Moroccan Dirham

omr

Omani Rial

nzd

New Zealand Dollar

nok

Norwegian Krone

pab

Panamanian Balboa

qar

Qatari Rial

rub

Russian Ruble

sar

Saudi Riyal

sgd

Singapore Dollar

zar

South African Rand

chf

Swiss Franc

thb

Thai Baht

ttd

Trinidad and Tobago Dollar

aed

United Arab Emirates Dirham

gbp

British Pound Sterling

usd

US Dollar

twd

New Taiwan Dollar

vef

Venezuelan Bolívar

ron

Romanian Leu

try

Turkish Lira

eur

Euro

uah

Ukrainian Hryvnia

pln

Polish Zloty

brl

Brazilian Real

Webhooks

A webhook is a messaging service that is executed before or after a transaction. You can add one or more webhooks in the Admin console or specify a custom webhook for a transaction. The data that sent varies depending on the context, read more under triggers to see what data to expect.

id int

Webhook ID

created_at datetime

Ex. 2014-04-25T10:36:33Z (UTC)

type string

Webhook type, ex: CustomHttp

response object

The http response, ex: { "code":"400", "body":"Bad request (GET and HEAD requests may not contain a request body)", "message":"Bad Request", "error":"Net::HTTPBadRequest" }

http_method string

Which method that were used, ex. POST, GET

email string

Sender address in a e-mail Webhook

url string

URL in a Custom Http Webhook

trigger string

What event to trigger Webhook, ex. payment_error

data_format string

JSON, form_data or XML

Show Webhooks

To show a webhook with ID 1 you need to GET the following url https://api.mondido.com/v1/webhooks/1

List Webhooks

To show a list of webhooks you need to GET the following url https://api.mondido.com/v1/webhooks

Creating Webhooks in a transaction

Webhooks can either be created from a template in the Admin console, or custom attached to each transaction call from the merchant shop. When creating custom Webhooks you define it using JSON described in the examples below:

Sending E-mail:
{"trigger":"payment_success","email":"myname@domain.com"}
Custom HTTP:
{"url":"https://mybackend.com/confirmOrderFromMondido","trigger":"payment_success","http_method":"post","data_format":"form_data"}
Or as an Array:
[{"trigger":"payment_success","email":"myname@domain.com"},{"url":"https://mybackend.com/confirmOrderFromMondido","trigger":"payment_success","http_method":"post","data_format":"form_data"}]
trigger can be:
  • recurring_error - (after unsuccessful recurring transaction)
  • recurring_success - (after successful recurring transaction)
  • refund_error - (after a failed refund)
  • capture - (after a successful capture)
  • payment_success - (after a successful transaction, data sent: a transaction object)
  • payment_error - (after a failed transaction, data sent: a transaction object)
  • payment_form - (when an hosted window is loaded, data sent: a transaction object)
  • payment - (after any transaction regardless of status, data sent: a transaction object)
  • refund - (after a refund, data sent: a transaction object)
  • subscription_started - (when a new subscription is created, data sent: a subscription object)
  • card_stored - (when a new card is stored, data sent: a stored_card object)
  • card_updated - (when a card is updated, data sent: a stored_card object)
  • webhook_exhausted - (when a Webhook didn't reach it's destination after retries, data sent: a webhook object)
  • change_address - (after a shipping address is changed, data sent: a transaction object)
  • none - (manual execution in the Mondido Rule Engine)
http_method can be:
  • post
  • get
  • put
  • patch
  • delete
data_format can be:
  • json
  • xml
  • form_data

Important

Custom http webhooks will not follow redirects. Make sure to point them directly at your endpoint.

If you are using the https protocol, your SSL certificate must be valid for the webhook to work.

If the webhook encounters a "500 error" from your endpoint it will retry 20 times for approximately 2 days. If it doesn't succeed during this timeframe you will receive a warning in the dashboard. Any other error will create a notification in the dashboard immediately.

NOTE: When notifications are created in the dashboard you will also be receiving an alert email. Opt-out is possible by unchecking "Get Email Alerts" in Settings > Administrators.

Copy
file not found
//Fetching the incoming transaction data

$transaction = webhook::get($path);
// Fetches and parses the incoming transaction.
// This example is coming from a WebAPI Post action and uses the ControllerContext for data

var transaction = Webhook.GetWebhook(this.ControllerContext.Request);

Automatic job retry

Webhooks will retry failures up to 20 times, with an exponential backoff using the formula (retry_count ** 4) + 15 + (rand(30) * (retry_count + 1)) (i.e. 15, 16, 31, 96, 271, ... seconds + a random amount of time).

It will perform 20 retries over approximately 3 days. Assuming you deploy a bug fix within that time, the job will get retried and successfully processed. After 20 times, Webhooks will move that job to the Dead Job queue, and create a notification on the merchant dashboard.

Liquid and Receipt Webhooks

Liquid is an open-source, Ruby-based template language created by Shopify. It is a well-known framework and is used to load dynamic content on storefronts.

Liquid uses a combination of tags, objects, and filters to load dynamic content. They are used inside the Mondido Hosted Window Payment Form to display information from the payment data and make the template dynamic for each customer, product or transaction.

The official documentation can be found here: https://github.com/Shopify/liquid/wiki/Liquid-for-Designers

You can output information in your receipt Webhook using Liquid syntax. Using the example above, this is the way to output it:

Product name: {{ transaction.metadata['products'].first.name }}
Product quantity: {{ transaction.metadata['products'].first.qty }}  %p

To loop all products:
{%for item in transaction.metadata['products']%}
  <li>
    Name: {{ item['name'] }},
    Price: {{ item['price'] }} {{transaction.amount | upcase }},
    Quantity {{ item['qty'] }}
  </li>
{% endfor %}  %strong For Refunds

You can send a refund confirmation using the After Refund event with the Receipt webhook. There you can output the refunded amount like this:

Hi, here is your refund confirmation for order: {{ transaction.payment_ref }}
Amount: {{ transaction.refunds.last.amount }}
Reason: {{ transaction.refunds.last.reason }}

Test Cards

To create test transactions you need to send in a test card number, and also a CVV code that can simulate different responses

Test card numbers:
VISA 4111111111111111
VISA 4012888888881881
VISA 4222222222222
MASTERCARD 5555555555554444
MASTERCARD 5105105105105100
DINERS 30569309025904
DISCOVER 6011111111111117
JCB 3530111333300000
AMEX 378282246310005
Test CVV codes:

When in test mode (test=true) you can use CVV codes to simulate different responses. Anything else will lead to Approved.

200 ACCEPTED
201 DECLINED
202 CVV INVALID
203 EXPIRED
Test Expiry dates:

When in test mode (test=true) you can use specific expiry dates to simulate failed recurring card payments

0137 errors.payment.declined
0237 errors.card.expired

Error messages

We aim to send as many insightful and helpful error messages to you as possible, both in numeric, data and human readable.

{
  name: 'errors.card_number.missing',
  code: 118,
  description: 'Card number is missing'
}

Simulate errors:

To simulate error messages send this json in your metadata. Use one of the following formats:

{
  "mondido_instructions": {
    "fail_as_code":"errors.invoice.address_not_found"
   }
}
{
  "mondido_instructions": {
    "fail_as_message":"do not honour"
  }
}

List of error messages:

1 errors.credit_card.missing

Credit card is missing.

2 errors.credit_card_details.missing

Credit card details are missing.

3 errors.terminal_id.invalid

Terminal ID is invalid.

4 errors.provider_ref.processed

Provider reference processed.

101 errors.order_id.processed

Order has already been processed.

102 errors.order_id.invalid

Order has already been processed.

103 errors.template.not_found

Could not find template.

104 errors.merchant.not_found

Could not find merchant.

105 errors.merchant_id.missing

Required parameter merchant_id is missing.

106 errors.hash.missing

Hash is missing.

107 errors.hash.invalid

Hash is invalid.

108 errors.amount.missing

Amount error – amount missing or negative.

109 errors.amount.invalid

Amount error – the amount of an item is missing, negative or zero.

1090 errors.amount.invalid_format

Amount error - amount format is invalid.

1091 errors.transaction.amount

The amount may exceed the total invoice amount, or the number of decimals has more than two digits after decimal (Can only have two digits after decimal).

110 errors.success_url.missing

Success URL is missing.

1100 errors.success_url.not_valid_uri

Is not a valid success URL.

1101 errors.error_url.not_valid_uri

Is not a valid error URL.

1102 errors.success_url.forbidden_uri

URL contains forbidden params.

1103 errors.error_url.forbidden_uri

URL contains forbidden params.

111 errors.success_url.reserved

Reserved parameter in success URL.

112 errors.error_url.missing

Success URL is missing.

113 errors.error_url.reserved

Reserved parameter in success URL.

115 errors.currency.invalid

Currency is invalid.

116 errors.currency.missing

Currency is missing.

117 errors.currency.unsupported

Currency is unsupported.

118 errors.card_number.missing

Card number is missing.

119 errors.card_number.invalid

Card number is invalid.

120 errors.card_type.missing

Card type is invalid.

121 errors.card_type.unsupported

Card type is unsupported.

122 errors.card_holder.missing

Card type is missing.

123 errors.card_holder.invalid

Card holder is invalid.

124 errors.card_cvv.missing

Card CVV is missing.

125 errors.card_cvv.invalid

Card CVV is invalid.

126 errors.card_expiry.missing

Card expiry is missing.

127 errors.card_expiry.invalid

Card expiry is invalid.

128 errors.transaction.not_found

Transaction could not be found.

1280 errors.transaction.timeout

This payment resource is expired.

129 errors.payment.declined

Payment is declined.

1290 errors.payment.failed

Payment is failed.

1290 errors.payment.canceled

Payment is canceled.

1292 errors.payment.amount_low

Amount value is too low.

130 errors.card.expired

Card is expired.

131 errors.card_currency.unsupported

Currency is not supported for card type.

132 errors.reason.missing

Reason is missing.

133 errors.unexpected

An unexpected error occurred.

134 errors.amount.excess

Amount is too much.

135 errors.plan.not_found

The Plan wasn't found.

1300 errors.plan.missing

Price is missing.

1301 errors.supported_card.not_found

Supported card could not be found.

1302 errors.card.do_not_honour

Card payment was declined by customers bank.

1303 errors.plan.invalid

Plan is invalid.

1304 errors.plan.deactivated

Plan is deactivated.

136 errors.price.missing

Price is missing.

137 errors.stored_card.not_found

Stored card not found.

138 errors.unauthorized

Unauthorized.

139 errors.merchant.missing

The merchant could not be find.

140 errors.transaction.missing

Transaction could not be found.

141 errors.subscription.not_found

Subscription not found.

142 errors.customer.not_found

Customer not found.

143 errors.customer.missing

Customer is missing.

144 errors.generic

Generic error.

145 errors.payment_ref.invalid

Payment_ref is invalid.

146 errors.payment_ref.processed

Payment_ref processed.

147 errors.file_type.unsupported

File type is not supported.

1470 errors.onboarding.failed_to_save

An error occurred while saving.

148 errors.status.invalid

Status must be active or cancelled.

149 errors.json.malformed

JSON is malformed.

150 errors.stored_card.not_active

Stored card not active.

151 errors.webhook.invalid

Invalid webhook data.

1510 errors.webhook_template.invalid

Webhook template is invalid.

1511 errors.webhook_template.not_found

Could not find webhook.

152 errors.transaction_id.missing

Transaction ID is missing.

153 errors.transaction.processed

Transaction is already processed.

1531 errors.transaction.locked

The Payment is being processed, please don’t make another payment at this time.

154 errors.invoice.not_purchable

An invoice can’t be found.

155 errors.reservation.not_approved

Reservation is not approved.

156 errors.personal_number.missing

Social Security number missing.

157 errors.customer_number.missing

Customer number is missing.

158 errors.zip.missing

Zip code is missing or too long.

159 errors.first_name.missing

First name is missing or too long.

160 errors.last_name.missing

Last name is missing or too long.

161 errors.country_code.missing

Country code is missing or invalid.

162 errors.address.missing

Address is missing or too long

163 errors.city.missing

City is missing or too long

164 errors.payment_details.missing

Payment details is missing.

165 errors.customer_ref.invalid

Customer ref is not allowed.

1600 errors.company_name.missing

Company name is missing.

1601 errors.payment_details.invalid

Payment details is invalid

1602 errors.invitation.not_found

Invitation not found.

166 errors.items.missing

Missing items.

167 errors.stored_card.not_test

Stored card is not valid for test transactions.

168 errors.stored_card.is_test

Stored card is only valid for test transactions.

1680 errors.stored_card.recurring

Stored card is only for recurring transactions.

169 errors.mpi.not_approved

3D-Secure was not approve.

1690 errors.mpi.invalid

3D-Secure information is not valid.

1691 errors.mpi.disabled

MPI status disabled.

170 errors.subscription.status_invalid

Status must be active or cancelled.

1700 errors.subscription.paid

General error.

171 errors.customer_ref.taken

Customer ref already in use.

172 errors.item.amount.missing

Items are missing.

173 errors.item.quantity.missing

Item quantity is missing or not valid.

174 errors.item.vat_rate.missing

Item vat_rate is missing or not valid.

175 errors.item.vat_amount.missing

Item vat_amount is missing or not valid.

176 errors.item.id.missing

Item ID is missing.

177 errors.item.unit_code.missing

Item unit code is missing.

178 errors.item.price.missing

Item price is missing.

179 errors.item.line_number.missing

Item line number is missing.

180 errors.item.description.missing

Description error – the description of an item is missing or is too long.

181 errors.merchant.invoice.not_configured

Merchant invoice not configured.

182 errors.authentication.failed

Could not authorize the request, check your login credentials.

183 errors.raw_amount.invalid

Amount is invalid.

184 errors.name.missing

Name must be filled.

185 errors.interval_unit.missing

You need to submit unit for the interval.

186 errors.interval_unit.invalid

Interval_unit is invalid.

187 errors.prices.missing

Prices are missing.

188 errors.interval.missing

You need to submit an interval.

189 errors.interval.invalid

Interval is invalid.

190 errors.password.missing

Password is missing.

191 errors.email.missing

Email is missing.

192 errors.terms.not_accepted

Terms are not accepted.

193 errors.webhook.failed

Webhook is failed or invalid.

194 errors.encrypted_param.missing

Expected all parameters in encrypted to exist.

195 errors.prices.invalid

Prices needs to be valid json.

196 errors.not_found

General error.

197 errors.decryption.failed

Decryption failed.

198 errors.vat_amount.missing

VAT amount is missing.

199 errors.reason.too_long

Reason is too long (255 characters allowed).

200 errors.encoding.invalid

Strings has to be UTF8 encoded.

201 errors.name.duplicate

The name already exists.

202 errors.merchant.invalid

Merchant is invalid.

203 errors.amount.mismatch

Amount does not match.

204 errors.webhook.not_found

Could not find webhook.

205 errors.filter_parameter.not_supported

You provided an unsupported filter parameter.

206 errors.filter_value.not_supported

You provided an unsupported filter value.

207 errors.account.locked

Your account is temporarily locked. Please try again in 30 minutes. You can unlock by resetting the password, or contact help@mondido.com.

208 errors.deposit.not_captured

Deposit not captured.

2080 errors.trustly.deposit_not_captured

Deposit not captured.

2081 errors.trustly.mandate_not_found

Mandate not found.

2082 errors.trustly.account_not_found

Account not found.

2083 errors.trustly.account_declined

Account declined.

2084 errors.trustly.message_id_duplicate

Message id duplicate.

2085 errors.trustly.invalid_credentials

Credentials is invalid.

2086 errors.trustly.malformed_notificationurl

The NotificationURL sent in the request is malformed. It must be a valid http(s) address.

2087 errors.trustly.invalid_ip

The IP attribute sent is invalid. Only one IP address can be sent.

2088 errors.trustly.insufficient_funds

The merchant does not have enough balance on his/her Trustly account to execute the refund.

2089 errors.trustly.disabled_user

The user account is disabled.

209 errors.ssn_or_country.missing

The country is missing.

2090 errors.ssn_token.failed

SSN token failed.

2091 errors.metadata.invalid

Metadata is invalid.

211 errors.missing_or_invalid.ssn

SSN error – missing SSN or invalid format.

212 errors.missing_or_too_long.first_name

First Name error – missing first name or first name too long.

213 errors.missing_or_too_long.last_name

Last Name error – missing last name or last name too long.

214 errors.invalid.email

E-mail error – invalid e-mail format.

215 errors.missing_or_invalid.phone_number

Cell phone number error – cell phone number missing or invalid characters.

216 errors.missing_or_too_long.address_1

Address line 1 error – missing address or address line 1 too long.

217 errors.missing.address_2

Address line 2 error – address line 2 too long.

218 errors.missing_or_too_long.city

City error – city is missing or value too long.

219 errors.missing_or_too_long.zip_code

Zip code error – zip code missing or value too long.

220 errors.missing_or_invalid.country_code

Country code error – missing or invalid country code.

221 errors.missing_or_invalid.amount_error

Amount error – missing amount or invalid value.

222 errors.too_long.transaction_id

Transaction id error – value is too long.

223 errors.must_be_submitted.ssn

SSN must be submitted.

224 errors.invoice.credit_approval_failed

Credit approval failed.

225 errors.invoice.credit_check

Credit check (SSN Not found).

226 errors.invoice.credit_not_approved

Credit not approved.

227 errors.invoice.amount.requested.lower_than_minimum_purchase_amount

Amount requested is lower than minimum purchase amount.

228 errors.invoice.amount.requested.higher_than_maximum_purchase_amount

Amount requested is higher than maximum purchase amount.

229 errors.invoice.amount.maximal_decimal

Amount value can have maximal {0} decimal places.

230 errors.item.missing_or_too_long.description

Item amount value can have maximal {0} decimal places.

2301 errors.item.missing_or_too_long.description

Description error – the description of an item is missing or is too long.

231 errors.item.total_amount_error

Total Amount error – the total amount of items must be higher than zero.

232 errors.item.notes_to_long

Notes error – notes for an item is too long.

233 errors.missing_or_too_long.order_reference

Order reference error – missing order reference or it is too long.

234 errors.invoice.account_error

Account class error – missing account class or invalid account class value.

235 errors.invoice.account_class_error

Account Class error - specified AccountNumber has a different AccountClass.

236 errors.order.reference.error

Order reference error – missing order reference or it is too long.

237 errors.invoice.credit_decision_process_failed

Credit decision process failed.

238 errors.helper.ssn.invalid_format

SSN error – invalid format.

239 errors.helper.ssn.must_be_submitted

SSN must be submitted.

240 errors.helper.ssn.for_sweden_must_be_12_digits

SSN for sweden must be 12 digits.

241 errors.helper.ssn.address_is_available

Not available – SSN is valid but no address is available.

242 errors.helper.ssn.have_a_value

Account Number or SSN must have a value.

243 errors.service_not_available

Service not available for the specified country.

244 errors.invoice.no_account_exists

No account exists – use Approve Invoice/Loan first.

245 errors.invoice.purchase_for_different_country

You are trying to make purchase for different country.

246 errors.invoice.payment_terms_error

Payment Terms error – specified payment terms code does not exist.

247 errors.invoice.account_number_error

Account number error – invalid value.

248 errors.invoice.account_was_overdrawn

Max. amount for the account was overdrawn.

249 errors.invoice.execute.against.this.account

Cannot execute return against this accoun.

250 errors.password_length

Password length must be at least 6 chars.

251 errors.customer_not_found

Customer not found! Probably reason - Customer with SSN = {0} is not client of {1}.

252 errors.request.json_error

API request error.

253 errors.request.bad_format

Bad format of request data. For example, the data is not in valid JSON format.

2502 errors.items.vat_missing

Item vat is missing or not valid.

2503 errors.items.artno_missing

Item artno is missing.

2511 errors.items.qty_missing

Item quantity is missing or not valid.

2512 errors.items.notes_too_long

Items notes are too long.

254 errors.items.not_array

Items is not an array.

255 errors.items.description_missing

Item description is missing.

256 errors.items.notes_missing

Items notes is missing.

257 errors.items.amount_missing

Amount is missing.

258 errors.items.description_too_long

Items description is too long.

259 errors.items.amount_not_valid

Items amount is not valid.

260 errors.items.transaction_amount_mismatch

Items total amounts does not match transaction amount.

261 errors.rules_parser.declined

Declined by rule engine.

2610 errors.rules_parser.skip_webhook

Rule parsers are skipped.

262 errors.request.json_errors

Something is wrong with the JSON object.

263 errors.invoice.denied_to_purchase

Customers are blocked for purchases by Collector, please contact Collector for more information.

264 errors.invoice.credit_check_denied

The credit check is not approved.

265 errors.invoice.address_not_found

Address can’t be found for the specified customer.

266 errors.invoice.reservation_not_approved

Reservation is not approved.

267 errors.invoice.invalid_registration_number

When the reg.no is not in a correct format.

268 errors.invoice.agreement_rules_validation_failed

Something with the use of the API is against the agreement with Collector, please contact Collector for information.

269 errors.invoice.unhandled_exception

If an unhandled error occurs, an unhandled exception will be thrown. In cases of these errors contact Collector for help.

270 errors.invoice.purchase_amount_greater_than_max_credit_amount

The total amount of an invoice or reservation can’t be greater than your maximum credit limit or the maximum credit limit for the country the purchase is made in.

271 errors.invoice.activation_of_invoice_denied

Activation of an invoice is denied.

274 errors.invoice.article_not_found

An Article can’t be found. Both Article Id and description specified must be the same that was used during AddInvoice. If more than one article with the same article id but different unit price is added to the invoice, the unit price of the article must be specified.

275 errors.invoice.article_not_found_based_on_unitprice

Can’t locate the specified article based on the specified unit price. Make sure an article with the specified unit price exists.

276 errors.invoice.authorization_failed

Could not authorize the request, check your login credentials. Please contact the Collector for more help.

277 errors.invoice.countrycode_mismatch_with_customer_address

The specified country code for the customer’s address doesn’t match the country code specified in the (base) request.

278 errors.invoice.countrycode_mismatch_with_delivery_address

The specified country code for the customer’s delivery address doesn’t match the country code specified in the (base) request.

279 errors.invoice.countrycode_mismatch_with_invoice_address

The specified country code for the customer’s invoice address doesn’t match the country code specified in the (base) request.

282 errors.invoice.email_is_missing

The delivery method was set to email but the Email field was not present in the request.

283 errors.invoice.invalid_countrycode

Can be thrown when you try to request an address from another country than the one you are registered in.

284 errors.invoice.invalid_credit_time_usage

Credit time can’t be used for the specific invoice type.

285 errors.invoice.invalid_currency_code

The specified currency can’t be used.This exception can be thrown if you are registered in a country where the specified currency is not allowed to be used.

286 errors.invoice.invalid_delivery_address_usage

Private customers aren’t allowed to have different invoice addresses and deliver addresses, they must be the same.

287 errors.invoice.invalid_invoice_status

When you try to cancel an pending invoice that can’t be canceled based on the stage it is in.

288 errors.invoice.invalid_product_code

The product code cannot be found or the product is inactive.

289 errors.invoice.invalid_quantity

The quantity of an article is too low or too high compared to the quantity or quantity left on the article.

291 errors.invoice.invalid_transaction_amount

The amount may exceeds the total invoice amount, or the number of decimals has more than two digits after decimal (Can only have two digits after decimal).

292 errors.invoice.invoice_duedate_already_extended

The due date of the invoice has already been extended.

293 errors.invoice.invoice_exceeds_available_reservation

The purchase sum of the invoice exceeds the available reservation amount.

294 errors.invoice.invoice_extended_date_in_past

When you try to extend a due date by specifying a date in the past.

295 errors.invoice.invoice_invalid_type

When an invoice may be of the wrong type, some actions aren’t allowed to perform on specific invoices, for example, You can’t extend the due date on an invoice that is not of type Direct invoice (delivered in the package).

296 errors.invoice.invoice_not_found

When the specified Invoice number can’t be found. When trying to credit an invoice the invoice is already credited or not activated.

297 errors.invoice.invoice_type_is_not_allowed_to_be_used

You aren’t allowed to use the specified invoice type.

298 errors.invoice.mixed_currency

The article’s currency doesn’t match the currency on the invoice.

299 errors.invoice.mobile_phone_is_missing

The mobile phone is missing, which is needed because of the chosen notification type.

300 errors.invoice.not_allowed_to_send_notification_by_email

You aren’t allowed to send the specific invoice type by email.

301 errors.invoice.not_allowed_to_send_notification_by_mail

You aren’t allowed to send the specific invoice type by postal mail.

303 errors.invoice.purchase_not_found

An invoice can’t be found.

305 errors.invoice.reservation_not_found

There was no reservation for the specified customer.

306 errors.invoice.total_amount_must_be_positive

The amount of an invoice must be positive.

308 errors.invoice.unique_article_not_found

When an article with the same article id is found several times but has different unit prices. The unit price must be specified also to locate the specific article.

309 errors.invoice.validation_activation_option_value

The ActivationOption field was not one of its allowed values.

310 errors.invoice.validation_address1_length

The Address1 field was too long.

311 errors.invoice.validation_address2_length

The Address2 field was too long.

312 errors.invoice.validation_amount_parsing

The unit price or other kinds of amount fields could not be parsed. Make sure the amount is a decimal value and the number of decimals doesn’t have more than two digits after decimal (Can only have two digits after decimal).

313 errors.invoice.validation_amount_range

The Amount field was not within its allowed range.

314 errors.invoice.validation_amount_required

The Amount field was not present in the request.

315 errors.invoice.validation_article_id_length

The ArticleId field was too long.

316 errors.invoice.validation_article_id_required

An article is missing its ArticleId.

317 errors.invoice.validation_article_list_required

The ArticleList field was not present in the request.

318 errors.invoice.validation_cell_phone_number_length

The CellPhoneNumber field was too long.

319 errors.invoice.validation_city_length

The City field was too long.

320 errors.invoice.validation_city_required

The City field was not present in the request.

321 errors.invoice.validation_client_ip_address_length

The ClientIpAddress field was too long.

322 errors.invoice.validation_client_ip_address_required

The ClientIpAddress field was not present in the request.

323 errors.invoice.validation_coaddress_length

The CoAddress field was too long.

324 errors.invoice.validation_company_name_length

The CompanyName field was too long.

325 errors.invoice.validation_cost_center_length

The CostCenter field was too long.

326 errors.invoice.validation_country_code_length

The CountryCode field was too long.

327 errors.invoice.validation_country_code_required

The CountryCode field was not present in the request.

328 errors.invoice.validation_credit_date_required

The CreditDate field was not present in the request.

329 errors.invoice.validation_credit_time_out_of_range

Credit time is out of range, can only be between 0 and 99.

330 errors.invoice.validation_currency_length

The Currency field was too long.

331 errors.invoice.validation_currency_invalid

The specified currency may not be supported or is of an incorrect format (ISO 4217). Currency need to be at least three characters long and follow ISO 4217, e.g. SEK, DKK, NOK and EUR etc.

332 errors.invoice.validation_currency_required

The Currency field was not present in the request.

333 errors.invoice.validation_customer_number_length

The CustomerNumber field was too long.

334 errors.invoice.validation_delivery_address_required

The DeliveryAddress field was not present in the request.

335 errors.invoice.validation_description_length

The Description field was too long.

336 errors.invoice.validation_email_invalid

The e-mail address is not a valid e-mail address.

337 errors.invoice.validation_email_length

The Email field was too long. Can only be a maximum of 256 characters.

338 errors.invoice.validation_error

Input data is not correct.

339 errors.invoice.validation_first_name_length

The FirstName field was too long.

340 errors.invoice.validation_gender_value

The Gender field was not one of its allowed values.

341 errors.invoice.validation_invoice_address_required

The InvoiceAddress field was not present in the request.

342 errors.invoice.validation_invoice_delivery_method_value

The InvoiceDeliveryMethod field was not one of its allowed values.

343 errors.invoice.validation_invoice_number_length

The InvoiceNo field was too long.

344 errors.invoice.validation_invoice_number_required

The InvoiceNo field was not present in the request.

345 errors.invoice.validation_invoice_type_value

The InvoiceType field was not one of its allowed values.

346 errors.invoice.validation_last_name_length

The LastName field was too long.

347 errors.invoice.validation_order_date_required

The OrderDate field was not present in the request.

348 errors.invoice.validation_order_number_length

The OrderNo field was too long.

349 errors.invoice.validation_password_required

The Password field was not present in the request.

350 errors.invoice.validation_phone_number_length

The PhoneNumber field was too long.

351 errors.invoice.validation_postal_code_length

The PostalCode field was too long.

352 errors.invoice.validation_postal_code_required

The PostalCode field was not present in the request.

353 errors.invoice.validation_quantity_range

The Quantity field was not within its allowed range.

354 errors.invoice.validation_quantity_required

An article is missing its Quantity.

355 errors.invoice.validation_reference_length

The Reference field was too long.

356 errors.invoice.validation_registration_number_length

The RegNo field was too long.

357 errors.invoice.validation_registration_number_required

The RegNo field was not present in the request.

358 errors.invoice.validation_reserved_amount_parsing

The ReservedAmount field could not be parsed.

359 errors.invoice.validation_reserved_amount_range

The ReservedAmount field was not within its allowed range.

360 errors.invoice.validation_reserved_amount_required

The ReservedAmount field was not present in the request.

361 errors.invoice.validation_unit_price_parsing

The UnitPrice field could not be parsed.

362 errors.invoice.validation_unit_price_range

The UnitPrice field was not within its allowed range.

363 errors.invoice.validation_username_required

The Username field was not present in the request.

364 errors.invoice.validation_vat_parsing

The Vat field could not be parsed.

365 errors.invoice.validation_vat_range

The Vat field was not within its allowed range.

366 errors.invoice.validation_vat_required

The Vat field was not present in the request.

367 errors.invoice.article_exists_but_other_information

Article can’t be added because an existing article exists but with another Vat.

368 errors.invoice.customer_purchase_progress

A simultaneous purchase is already being processed for the customer.

400 errors.stored_card.expires.missing

Stored card expiration date missing.

4001 errors.stored_card.store.declined

Card could not be stored.

4002 errors.stored_card.token.invalid

Stored card token is invalid.