Hosted Window

You need to POST the outgoing params to: https://pay.mondido.com/v1/form from the merchants checkout page to a secure web page hosted at mondido that you can design the way you want to by using the default template or your customized page using your favourite CSS and JS frameworks.

After a payment is done the customer will be redirected to either a success_url or a error_url (callback pages) where you can finalize or cancel the order in your backend. You can also send your own custom data in these callback URLs such as: https://mywebsite.com/payment_success?data=value&data2=value2

Page character encoding

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

Params to send

amount decimal * required

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

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 in 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 string * required

success_url string * required

A URL to the page where the user is redirected after a successful transaction.

error_url string * required

A URL to the page where the user is redirected after a unsuccessful transaction.

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.

template_id integer

An ID of a Hosted Window Template on Mondido. If this param is sent, the filter function is not used.

webhook object

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

plan_id integer

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

subscription_quantity

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.

authorize integer

authorize = true info: "means that the transaction should be reserved (Authorized).

Items Array of items objects * required if payment_method is invoice

You can specify items for a transaction.

payment_details object * required if payment_method is invoice

You can specify Payment details for a transaction.

payment_method String * required if payment_method is invoice

invoice

subscription_items object

An array of subscription unique items

segmentation String * required if invoice is of type business to business (b2b)

You can specify segmentation type by sending b2b or b2c.

Example HTML

Where is this form located?

This HTML form should be located in your checkout page as the last step in the order process, before the payment.

<form action="https://pay.mondido.com/v1/form" method="post">
  <input type="hidden" name="payment_ref" value="123">
  <input type="hidden" name="customer_ref" value="123">
  <input type="hidden" name="amount" value="100.00">
  <input type="hidden" name="currency" value="sek">
  <input type="hidden" name="hash" value="9q837iuwydkwie7yi7">
  <input type="text" name="merchant_id" value="1">
  <input type="text" name="success_url" value="https://mywebsite.com/payment_success?data=value&data2=value2">
  <input type="text" name="error_url" value="https://mywebsite.com/payment_fail?data=value&data2=value2">
  <input type="hidden" name="test" value="true">
  <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"}}'>
  <input type="submit" value="Pay" class="btn">
</form> 

Params you'll get back

In the callback URL you will get back the data you need to update your order data and connect the transaction to your order. The data you get is: transcation_id (generated from mondido), payment_ref (merchant order id), hash, token (if the card is stored you will get this to make future transactions), and your own custom params in the callback URL.

Ex: https://mysite.com/orderok?hash=44037b5f9088fcb2b29b58028790acc2&payment_ref=4977&transaction_id=584&token=1234&stored_card_id=2

transaction_id int

ID of transaction from Mondido

payment_ref string

The merchant order/payment ID

hash string

A security token; MD5(merchant id + payment_ref + customer_ref + amount + currency + status + secret)

error_name string

A description of the error if the transaction failed

status string

approved, authorized, declined, pending, failed

token string

A unique string that you can use to make API transaction if the card is stored

stored_card_id int

If card is stored this value will be the ID you use to make API requests on the the stored card. *

subscription_id int

If a subscription is created this value will be the ID you use to make API requests on the the subscription. *

* 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 id (or subscription_id), which will be missing if the card could not be stored.

The hash is validated by doing this:

MD5(merchant id + payment_ref + customer_ref + amount + currency + status + secret)

currency and status must be lower case:

Else the MD5 check will fail

Compare the calculated hash with the hash value sent in the URL to see that it matches.

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.

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 %}

Payment Form

When you POST to a Hosted Window the customer will end up in a Payment Form at Mondido where you can design using your own HTML/JS/CSS code. When you sign up as a merchant you can log in to the admin system and go to the page where you handle the payment forms for your merchant account (https://admin.mondido.com/en/templates)

You can also GET a Hosted Window payment form for an existing payment that has not been finished using the HREF attribute on the transaction.

The payment form will show the customers input fields where they can enter credit card information as well as information about the order such as amount and currency.

Where is this Payment Form located?

This form is in the hosted page located in the Mondido admin pages and NOT on your website.

You will get templates for this that you can modify to suit your own needs.

The important fields you need to have are:
<input type="text" name="card_holder" placeholder="Firstname Lastname"/>
<input type="text" name="card_number" placeholder="Card Number"/>
<input type="text" name="card_type" placeholder="VISA / MASTERCARD">
<input type="text" name="card_cvv" placeholder="XXX"/>
<input type="text" name="card_expiry" placeholder="YYMM"/>
Optional: If you want to store the card for token based transactions
<input type="hidden" name="store_card" value="true"/>

A possible solution would also be to have store_card as a checkbox so the customer can choose to store the card for future purchases.

When subscribing to a subscription plan

If you want to add a subscription plan to the payment you will need to add a plan_id to the form. The plans are defined in the admin console.

<input type="hidden" name="plan_id" value="1"/>
A full example of a payment form:

Note that all external files should be served from a HTTPS url in order to not be blocked in some browsers. All parameters you send in can also be outputted in the HTML code such as: {{ amount }} {{ currency }}

You can find a full example of a payment form at
https://github.com/Mondido/payment-templates/blob/master/html/pay-out.html

You can find the payment form repository at
https://github.com/Mondido/payment-templates

Liquid Syntax

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 or product.

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

Any information sent in to a Mondido Hosted Window Payment can be displayed in the Liquid tag format and can be displayed like this:

{{ transaction.amount }}
{{ transaction.currency }}

All properties available in the Hosted Window are:

Used for Hosted Window and Webhooks Recommeded Usage: Most commonly used in Custom Payment templates and receipt emails.

{{ transaction.amount }} int

Ex 10.00

{{ transaction.currency }} string

Ex: USD

{{ transaction.payment_ref }} string

Your order reference

{{ transaction.metadata }} string

Your metadata accessible like: {{ transaction.metadata['products'][0]['name'] }}

{{ transaction.created_at }} datetime

Ex: 2014-04-25T10:20:48Z (UTC)

{{ transaction.id }} int

Ex: 1231

{{ transaction.test }} string

bool: 'test'

{{ transaction.success_url }} string

Ex: https://yourdomain.com/success

{{ transaction.error_url }} string

Ex: https://yourdomain.com/success

{{ transaction.merchant.name }} string

Ex: MyWebShop

{{ transaction.client_info['browser'] }} string

From user agent, ex: Chrome

{{ transaction.client_info['version'] }} string

From user agent, ex: 39.0.2171.95

{{ transaction.client_info['platform'] }} string

From user agent, ex: Macintosh

{{ transaction.client_info['ip'] }} string

From user agent, ex: 127.0.0.1

{{ transaction.client_info['accept_language'] }} string

From user agent, ex: en-US,en;q=0.8,sv;q=0.6

{{ transaction.transaction_type }} string

Type of payment, ex: Bank or Credit card

{{ transaction.request_hash }} string

The hash that was sent in by the merchant

{{ transaction.response_hash }} string

The hash that was sent to the merchant by Mondido

{{ transaction.link_payment }} bool

true/false if transaction was made by a payment link

{{ transaction.cost }} object

The cost of transaction {"percentual_fee":0,"fixed_fee":0,"percentual_exchange_fee":0,"total":"0.0", "vat_rate": 0.25}

Subscription liquid syntax is ideal for returning information about the newly purchased or trialed service.

{{ subscription.id }} int

Ex: 14

{{ subscription.plan }} object

Ex: Monthly Premium Subscription

{{ subscription.status }} string

Active Subscription

{{ subscription.price }} decimal

Ex: 100.00

{{ subscription.interval_unit }} string

days / months

{{ subscription.interval }} int

Ex: 30 (days)

{{ subscription.total_periods }} int

Ex: 12 (months)

{{ subscription.period_count }} int

Ex: 5

{{ subscription.created_at }} datetime

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

{{ subscription.updated_at }} datetime

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

{{ subscription.next_at }} datetime

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

{{ subscription.customer }} object

Customer that is connected to the transaction

{{ subscription.periods_left }} int

Number of transactions before the subscription ends.

{{ subscription.metadata }} object

Merchant specific Metadata

{{ subscription.debt }} decimal

A positive value if you want to add an amount for the next transaction, or negative if you want to subtract an amount

{{ subscription.multiplier }} string

How many times you want to withdraw the amount. For example in a licence scenario

{{ subscription.retry_count }} int

How many times the subscription has failed. This is zeroed after a successful transaction.

Usual information that goes with a subscription, stored card liquid syntax is great for upselling on services or attaching a previous customer to a card for better conversion of second time buyers.

{{ stored_card.id }} int

The ID of the stored card

{{ stored_card.ref }} string

Ex: 14

{{ stored_card.merchant }} int

he merchant ID

{{ stored_card.created_at }} datetime

Ex: 2014-04-25T10:20:48Z (UTC)

{{ stored_card.updated_at }} datetime

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

{{ stored_card.expires }} datetime

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

{{ stored_card.card_type }} string

VISA, MASTERCARD, STORED_CARD

{{ stored_card.currency }} string

The 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)

{{ stored_card.customer }} object

Customer that is connected to the transaction

{{ stored_card.card_number }} string

The masked version of the credit card number.

{{ stored_card.status }} string

Ex: active, cancelled

{{ stored_card.card_holder }} string

The name on the charged credit card

{{ stored_card.test }} bool

Wether or not the stored_card is a test card

A new feature allowing the tracking of information beyond the normal card content.

{{ payment_details.id }} int

Id of the transaction.

{{ payment_details.type }} string

Ex: Credit Card/stored card/recurring)

{{ payment_details.card_number }} string

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

{{ payment_details.card_holder }} string

Id of the transaction.

{{ payment_details.card_type }} string

Ex: VISA, MASTERCARD etc...

{{ payment_details.created_at }} datetime

Ex. 2014-04-25T10:20:48Z (UTC)

{{ payment_details.updated_at }} string

Ex. 2014-04-25T10:20:48Z (UTC)

{{ payment_details.customer_number }} string

Customer that is connected to the transaction

{{ payment_details.first_name }} string

Ex: Robert

{{ payment_details.last_name }} string

Ex: Pohl

{{ payment_details.zip }} int

Ex: 17070

{{ payment_details.country_code }} string

Ex: SE, US

{{ payment_details.address }} string

Ex: 123 Main Street

{{ payment_details.city }} string

Ex: San Francisco

{{ paymentdetail.personal_number }} string

Ex: 195603041111

{{ payment_details.mask_first_name }} string

Ex: Robert

{{ payment_details.mask_last_name }} string

Ex: O*******

{{ payment_details.mask_zip }} string

Ex: 170**

{{ payment_details.mask_address_1 }} string

**öjel Stora Hajdes 7**

{{ payment_details.mask_address_2 }} string

**öjel Stora Hajdes 7**

{{ payment_details.mask_city }} string

Spån**

Best used for businesses that are Sass based or sell their product on a service basis.

{{ plan.id }} int

Ex: 10

{{ plan.prices }} object

Price for each subscription transaction

{"eur":"10","sek":"100"}

{{ plan.interval_unit }} string

days / months

{{ plan.interval }} int

Ex. 1 month

{{ plan.periods }} int

Ex: 0 = forever, 1 = 1 period

{{ plan.setup_fees }} object

Starts costs of a plan

{"eur":"0","sek":"0"}

{{ plan.name }} string

Ex: Name of Plan

{{ plan.description }} string

Description of Plan

{{ plan.trial_length }} int

Amount of days before the first transaction. 0 = no trial.

{{ plan.merchant }} int

Id of merchant account

{{ plan.created_at }} datetime

Ex: 2014-04-25T10:20:48Z (UTC)

{{ plan.updated_at }} string

Ex: 2014-04-25T10:20:48Z (UTC)

{{ plan.status }} string

active, cancelled

Best to put {{ transaction.merchant.name }} if your retreiving the merchant name through the transaction object.

{{ merchant.name }} string

Ex: My Webshop

{{ merchant.plans }} array

Ex: List of subscription plans

{{ refund.amount }} decimal

Ex: 100.00

{{ refund.reason }} string

The reason for refunding the card holder

Go here to learn about how to parse and display your Metadata

Link Payment

The Links Payment provides a simple method for suggesting payments by sharing a simple URL. Every transaction that is not finished will have a HREF attribute which is a HTTP link that can be sent to customers using e-mail or instant messaging. The link is a useful tool to have customers complete an unfinished payment that was abandoned or one that the merchant has prepared earlier.

When a customer clicks on the link that looks like this: https://pay.mondido.com/v1/form/hrr5ssWg0y-XgcYOyNXhew, they will end up in a Hosted Window form that is set up by the merchant and prepared with all the order details like amount, currency, metadata, webhooks etc. When the customer has finished the payment he/she will be redirected to the success_url that was used in the original POST that created the transaction earlier. The same goes with an unsuccessful payment where the customer will end up in the error_url.

To find the HREF url, the merchant will need to search in the Admin console to find the transaction and then expand the panel to find the url among all the other transaction data. Another option is to prepare the transaction in the API and and the get the HREF in the API call response and pass that link to the customer.

Payment With Stored Cards

When you POST to a Hosted Window the customer will end up in a Payment Form at Mondido which you can design using your own HTML/JS/CSS code. You will be able to both store the card and make payments with previous stored cards here as well.

To make payments with stored cards you need to send in the unique customer reference from your web site so that we can connect the stored card to that customer.

The important fields you need to have in your form are:

<input type="text" name="customer_ref" value="1234"/>

When customer_ref is posted to the hosted window Mondido will be able to handle cards connected to that user. We will inject a JavaScript object in the <head> tag, that you can access in the payment form after the POST.

Example of JavaScript object where the stored cards can be found:
<script>
  Mondido = {transaction: {"id":1028,"amount":"1.0","metadata":{"user":{"email":"justmyemail@mondido.com"},"products":["awesomeness","coolness"]},"customer":{"id":5,"ref":"133752","metadata":null,"stored_cards”:[{"card_number":"41111****1111",id":5,"token":"2w67r33303d23691","expires":"2014-05-31T23:59:59Z","card_type":"VISA","currency":"sek"}]}}};
</script>

Where can I find this Injected Mondido object?

In the hosted payment form we'll make it available for you to access. Iterate the properties using plain JavaScript.

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: 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);

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 }}

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}]

Payment Details

Payment Details make it possible to send customer data. Payment data is perfect way to send specific infomation about a customer.

This data is required if the transaction is of type invoice

ssn string * required

Social Security number (Personnummer). Ex: 192803104351

phone string * required

Phone number

email string * required

Email adress

customer_number string (maxlength 150)

Your custumer number

first_name string (maxlength 150) * required

The first name of the custumer

last_name string (maxlength 150) * required

The last name of the custumer

zip string (maxlength 150) * required

ZIP code

address_1 string (maxlength 150) * required

Primary address

address_2 string (maxlength 150)

Secondary address

city string (maxlength 150) * required

City

country_code string * required

Use ISO 3166-1 alpha-3 codes, ex: SWE.

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

Test customers

To create test invoice transactions you need to send in a test ssn number. Ues different SSN numbers to simulate different responses.

Approved persons Sweden
195203198089 string

{"first_name": "Solbritt", "last_name": "Jansson", "address_1": "Danagatan 1", "address_2": nil, "city": "Trångsund", "zip_code": "14262", "country": "SWE", "ssn": "195203198089"}

192803037999 string

{"first_name": "Stig", "last_name": "Saleh", "address_1": "Lars Kaggsgatan 163 Lgh 1003", "address_2": nil, "city": "Oxie", "zip_code": "23831", "country": "SWE", "ssn": "192803037999"}

192803104351 string

{"first_name": "Erik", "last_name": "Nygren", "address_1": "Hablingbo Prästgården 151 Lgh 1203", "address_2": nil, "city": "Nynäshamn", "zip_code": "14931", "country": "SWE", "ssn": "192803104351"}

192803290853 string

{"first_name": "Erik", "last_name": "Karlsson", "address_1": "Sakrislundsvägen 45 Lgh 1001", "address_2": nil, "city": "Ytterby", "zip_code": "44205", "country": "SWE", "ssn": "192803290853"}

192805181332 string

{"first_name": "Jonas", "last_name": "Olivares", "address_1": "Fröjel Stora Hajdes 717", "address_2": nil, "city": "Spånga", "zip_code": "16345", "country": "SWE", "ssn": "192805181332"}

192806225351 string

{"first_name": "Gustaf", "last_name": "Roslin", "address_1": "Motalagatan 7 Lgh 1005", "address_2": nil, "city": "Linköping", "zip_code": "58254", "country": "SWE", "ssn": "192806225351"}

195202057674 string

{"first_name": #RANDOM#, "last_name": #RANDOM#, "address_1": #RANDOM#, "address_2": #RANDOM#, "city": #RANDOM#, "zip_code": #RANDOM#, "country": "SWE", "ssn": "195202057674"}

197003067985 string

{"first_name": #RANDOM#, "last_name": #RANDOM#, "address_1": #RANDOM#, "address_2": #RANDOM#, "city": #RANDOM#, "zip_code": #RANDOM#, "country": "SWE", "ssn": "197003067985"}

197108262366 string

{"first_name": #RANDOM#, "last_name": #RANDOM#, "address_1": #RANDOM#, "address_2": #RANDOM#, "city": #RANDOM#, "zip_code": #RANDOM#, "country": "SWE", "ssn": "197108262366"}

Denied persons Sweden
192806281719 string

{"first_name": "Kent", "last_name": "Ludwig", "address_1": "Vindögatan 4 Lgh 1502", "address_2": nil, "city": "Gärds Köpinge", "zip_code": "29197", "country": "SWE", "ssn": "192806281719"}

192808219691 string

{"first_name": "Alex John", "last_name": "Säll", "address_1": "Arkeologvägen 52", "address_2": nil, "city": "Skillingaryd", "zip_code": "56830", "country": "SWE", "ssn": "192808219691"}

192809162536 string

{"first_name": "Erik", "last_name": "Wadman", "address_1": "Myrängsvägen 73 Lgh 1410", "address_2": nil, "city": "Höllviken", "zip_code": "23638", "country": "SWE", "ssn": "192809162536"}

192901107488 string

{"first_name": "Kristina", "last_name": "Lindell", "address_1": "Östra Skolgatan 10", "address_2": nil, "city": "Ödeshög", "zip_code": "59979", "country": "SWE", "ssn": "192901107488"}

192901197497 string

{"first_name": "Gustaf", "last_name": "Gustafsson", "address_1": "Spireav 1", "address_2": nil, "city": "Stockholm", "zip_code": "11254", "country": "SWE", "ssn": "192901197497"}

195807065627 string

{"first_name": "Anne Malin", "last_name": "Samuelsson", "address_1": "Härsbackavägen 69 Lgh 1309", "address_2": nil, "city": "Karlstad", "zip_code": "65226", "country": "SWE", "ssn": "195807065627"}

Approved persons Norway
06073910828 string

{"first_name": "Tester", "last_name": "Person", "address_1": "Startveien 56", "address_2": null, "city": "FINNSNES", "zip_code": "9300", "country": "NOR", "ssn": "06073910828"}

Approved persons Finland
071259999M string

{"first_name": "Dmitri Jonatan", "last_name": "Casimirsson", "address_1": "Sepänkatu 11 A 1", "address_2": null, "city": "KUOPIO", "zip_code": "70100", "country": "FIN", "ssn": "071259999M"}

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

trustly

Trustly

paypal

PayPal

swish

Swish

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

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

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:

101 errors.order_id.processed

102 errors.order_id.invalid

103 errors.template.not_found

104 errors.merchant.not_found

105 errors.merchant_id.missing

106 errors.hash.missing

107 errors.hash.invalid

108 errors.amount.missing

109 errors.amount.invalid

110 errors.success_url.missing

111 errors.success_url.reserved

112 errors.error_url.missing

113 errors.error_url.reserved

116 errors.currency.missing

117 errors.currency.unsupported

118 errors.card_number.missing

119 errors.card_number.invalid

120 errors.card_type.missing

121 errors.card_type.unsupported

122 errors.card_holder.missing

123 errors.card_holder.invalid

124 errors.card_cvv.missing

125 errors.card_cvv.invalid

126 errors.card_expiry.missing

127 errors.card_expiry.invalid

128 errors.transaction.not_found

129 errors.payment.declined

130 errors.card.expired

131 errors.card_currency.unsupported

132 errors.reason.missing

133 errors.unexpected

134 errors.amount.excess

135 errors.plan.not_found

136 errors.price.missing

137 errors.stored_card.not_found

138 errors.unauthorized

139 errors.merchant.missing

140 errors.transaction.missing

141 errors.subscription.not_found

142 errors.customer.not_found

143 errors.customer.missing

144 errors.generic

145 errors.payment_ref.invalid

146 errors.payment_ref.processed

147 errors.file_type.unsupported

148 errors.status.invalid

149 errors.json.malformed

150 errors.stored_card.not_active

151 errors.webhook.invalid

152 errors.transaction_id.missing

153 errors.transaction.processed

154 errors.invoice.not_purchable

155 errors.reservation.not_approved

156 errors.personal_number.missing

157 errors.customer_number.missing

158 errors.zip.missing

159 errors.first_name.missing

160 errors.last_name.missing

161 errors.country_code.missing

162 errors.address.missing

163 errors.city.missing

164 errors.payment_details.missing

165 errors.customer_ref.invalid

166 errors.items.missing

167 errors.stored_card.not_test

168 errors.stored_card.is_test

169 errors.mpi.not_approved

170 errors.subscription.status_invalid

171 errors.customer_ref.taken

172 errors.item.amount.missing

173 errors.item.quantity.missing

174 errors.item.vat_rate.missing

175 errors.item.vat_amount.missing

176 errors.item.id.missing

177 errors.item.unit_code.missing

178 errors.item.price.missing

179 errors.item.line_number.missing

180 errors.item.description.missing

181 errors.merchant.invoice.not_configured

182 errors.authentication.failed

183 errors.raw_amount.invalid

184 errors.name.missing

185 errors.interval_unit.missing

186 errors.interval_unit.invalid

187 errors.prices.missing

188 errors.interval.missing

189 errors.interval.invalid

190 errors.password.missing

191 errors.email.missing

192 errors.terms.not_accepted

193 errors.webhook.failed

194 errors.encrypted_param.missing

195 errors.prices.invalid

196 errors.not_found

197 errors.decryption.failed

198 errors.vat_amount.missing

199 errors.reason.too_long

200 errors.encoding.invalid

201 errors.name.duplicate

202 errors.merchant.invalid

203 errors.amount.mismatch

204 errors.webhook.not_found

205 errors.filter_parameter.not_supported

206 errors.filter_value.not_supported

207 errors.account.locked

208 errors.deposit.not_captured

209 errors.ssn_or_country.missing

210 errors.avarda_account.missing

211 errors.missing_or_invalid.ssn

212 errors.missing_or_too_long.first_name

213 errors.missing_or_too_long.last_name

214 errors.invalid.email

215 errors.missing_or_invalid.phone_number

216 errors.missing_or_too_long.address_1

217 errors.missing.address_2

218 errors.missing_or_too_long.city

219 errors.missing_or_too_long.zip_code

220 errors.missing_or_invalid.country_code

221 errors.missing_or_invalid.amount_error

222 errors.too_long.transaction_id

223 errors.must_be_submitted.ssn

224 errors.invoice.credit_approval_failed

225 errors.invoice.credit_check

226 errors.invoice.credit_not_approved

227 errors.invoice.amount.requested.lower_than_minimum_purchase_amount

228 errors.invoice.amount.requested.higher_than_maximum_purchase_amount

229 errors.invoice.amount.maximal_decimal

230 errors.item.missing_or_too_long.description

231 errors.item.total_amount_error

232 errors.item.notes_to_long

233 errors.missing_or_too_long.order_reference

234 errors.invoice.account_error

235 errors.invoice.account_class_error

236 errors.order.reference.error

237 errors.invoice.credit_decision_process_failed

238 errors.helper.ssn.invalid_format

239 errors.helper.ssn.must_be_submitted

240 errors.helper.ssn.for_sweden_must_be_12_digits

241 errors.helper.ssn.address_is_available

242 errors.helper.ssn.have_a_value

243 errors.service_not_available

244 errors.invoice.no_account_exists

245 errors.invoice.purchase_for_different_country

246 errors.invoice.payment_terms_error

247 errors.invoice.account_number_error

248 errors.invoice.account_was_overdrawn

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

250 errors.password_length

251 errors.customer_not_found

252 errors.request.json_error

253 errors.request.bad_format

254 errors.items.not_array

255 errors.items.description_missing

256 errors.items.notes_missing

257 errors.items.amount_missing

258 errors.items.description_too_long

259 errors.items.amount_not_valid

260 errors.items.transaction_amount_mismatch

261 errors.rules_parser.declined

262 errors.request.json_errors