Getting Started

You need an API key to interact with our API. Sign-up here.

The API key is what you pay for so keep it secret.

API endpoint

https://mpi.3dsecure.io      # live accounts
https://mpi.test.3dsecure.io # test accounts

Authentication

Authentication is done via HTTP Basic Auth. Simply provide your API key as the username and a blank string as password. When using cURL, have just a : after the username to specify an empty password.

curl -i https://mpi.3dsecure.io \
     -u <your-api-key>:

You will get this response when you provide an invalid API key:

HTTP/1.1 401 Not Authorized

Response format

Responses are in JSON format.

HTTP response codes are used to indicate API response status:

Number  Text
200     OK
400     Bad Request
401     Unauthorized
500     Internal Server Error

Examples

Get enrollment status

This method is used to verify if a given card is enrolled for 3-D Secure authentication. The important responses from this method are a PAReq (Payment Authentication Request) and URL, which is passed onto the ACS (Access Control Server) of the issuing bank (or other ACS provider) via the cardholders browser.

The following will check 3-D Secure for a given card:

curl -X POST https://mpi.3dsecure.io/enrolled \
     -u <your-api-key>: \
     -d "amount=2050"   \
     -d "currency=EUR"  \
     -d "order_id=1234567890" \
     -d "card[number]=4111111111111111" \
     -d "card[expire_month]=12" \
     -d "card[expire_year]=2020" \
     -d "merchant[id]=123456789012345" \
     -d "merchant[name]=Best Merchant Inc" \
     -d "merchant[acquirer_bin]=411111" \
     -d "merchant[country]=DK" \
     -d "merchant[url]=http://www.bestmerchantinc.com/" \
     -d "cardholder_ip=8.8.8.8"

Example response (snippet):

{
    "acs_url":"https://secure5.arcot.com/acspage/cap?RID=35325&VAA=B",
    "pareq":"eNpdU8tymzAU3ecrvMumYz1AgD2yZnDsTpMZx06TRdudLK5skhiIgNjust/Tr+qXVMIm4DDDoHvuOdKZexB/2hqA2SOo2oC4Ggz4AspSbmCQJpPrSELAZKApSOyFkWYaY+brJAq0pzTQa6ewmlX8Hd4aRZDoKMIs8WXiK2/NvIAFDPwwoRrCkV6fFVbzDqZM80yQIR5SjtqybRcyE4xFPmUhoZiGhPkRRw5tGQswaiuzqgUsJNXb9PZeMBpYFUfnsuvvwNzOBKa4fTg6QR0lkzsQ84PcFa/AUVN1TZXXWWWOgmLrpS26dm1exbaqijFC+/1+CKddhrnZII5cs7WOPnvnq9oBZf+wQ5qIxSzed+/8uPj9QO6flb98iiccOUbHT2QF1hlhmODRgARj6o0Z46jBezPaOd/i35+/hH7x7ATOQMconJf4hBLqKH2kN43aGMjUUYxCN4626ghwKPIMrMbm+7HuGYZSCevPfT4m83kQ/ObbRcCqsnHls7V++fVAHoPlnb/9eVMuVz+m8fzrNN5MXOwN6cJHaoMiETkZSbvUOGr3t0e7v7i5A+h8CcQVR5cX5D/FxN2u",
    "enrolled":"Y",
    "eci":"2",
    "error":null
}

Check PARes

This method is used to validate the PARes response from the ACS.

curl -X POST https://mpi.3dsecure.io/check \
     -u <your-api-key>: \
     --data-urlencode "pares=eJzVWFmvo0iyfu9f0ep5tLrYsd1yHSmTzdgGzGrgjX0Hm8Usv37wObXdutWjufdlNJYsJ0FEZCwZX4TzYKRtFLF6FAxt9HaQoq7zkuj3LPz8R7TzQo+gsO2Wxrw9hRIxvo8IL45wP6LokP7j7XAFWtS9M1dd8omk9/h++6nLkjoK17fPqO2ypn7DPqGf8APy9XHdpA1Sr+7fDl7wgKL8RuE0tcUOyJfHQxW1IvuG4ujXzwH5IB2Q77LX4bXqVqOnLHyTWDB+/3KztKiYnAekYoDPB+TFcQi9PnrDUYxCcYz+HUP/wrZ/keuu7/TD/aUOVM2w6l7fo+uLH0mHNT5tVAfzqmF3QL49HaLp3tTRS+iAfFsfkO/W3b36Df3hg1HkquBFPRj226HPqv9lFU4ckHf6oeu9fujenAPyZXUIvOfzLReJEywKT8XuOwYCAOCMMkdzXby8fWc5REG2hnA1av19lwJl0rRZn1ZvxAfPd8IBeZmCvKfz7aCvCVw3a6Pfp6qsu89/pH1//wtBxnH8NBKfmjZBXqlB0D2yMoRrvv/xx4dUFIp13PyfxBivbuos8Mps8fr1eEhRnzbh799s+5UaQ3tpwhCNY/5cVf0ZYGT954uCEhi16kR+rfQHz/6dXX42tu28P7vUw14b/KTo7aBFcfQ6EdHvpiZ+/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Ad1oLnQWLYvmiD55x6u+ne8MoBYbUI33b1CfuNrO2GTDIbD263s3CQBFoIMVnk+QYaoEyd3EZIcbmWsLLTTI+i4A1n6SDRz1SI/JDPMNlHgVdKfomNyoPLY5+ASL6ntMZTRn3kUu4+zxaJYU2UiWfnzYrS0vdAoHW90O3UY5s3tRKWVXzrVInOzQxaRnD83LNj/FYbtYxA64WtsMx5wK5m7ZXvDWNCoE9od9u2JncWbEsp5aH3ILecIUT01qEm5c02P+6VSDf7zGQb3cb32893q9H3+9vXxd6P97r/hNAOzNG"

Example response (snippet):

{
    "amount":"21601",
    "currency":"DKK",
    "cavv":"jI3JBkkaQ1p8CBAAABy0CHUAAAA=",
    "cavv_algorithm":"3",
    "eci":"2",
    "merchant_id":"02000000000",
    "last4":"1548",
    "status":"Y",
    "xid":"MDAwMDAwMDAwMDEyMzQ2Njc4OTA="
}

API Reference

Enrolled

This method is used to verify if a given card is enrolled for 3-D Secure authentication. The important responses from this method are a PAReq (Payment Authentication Request) and url, which is parsed onto the ACS (Access Control Server) of the issuing bank (or other ACS provider) via the user’s browser.

POST https://mpi.3dsecure.io/enrolled

Parameters

amount
[0-9]{1,12}
Amount in minor units of given currency (e.g. cents if in Euro).
currency
[A-Z]{3}
ISO 4217 3-letter currency code.
order_id
[:print:]{1,20}
Order ID or other unique transaction identifier
cardholder_ip
[0-9.a-fA-F:]{3,39}
Cardholder’s IP address (v4 or v6).
card[number]
[0-9]{12,19}
Primary account number of card to charge.
card[expire_month]
[0-9]{2}
Expiry month of card to charge.
card[expire_year]
[0-9]{4}
Expiry year of card to charge.
merchant[acquirer_bin]
[0-9]{6,11}
Acquiring institution identification code.
Typically this is a 6-digit BIN assigned to the acquirer by Visa or MasterCard.
merchant[country]
[A-Z]{2}
ISO 3166-1 2-letter country code
merchant[id]
[:print:]{1,24}
Merchant account ID or Card Acceptor ID provided by the acquiring bank.
The Merchant ID must be the value registered to Visa and MasterCard
merchant[name]
[:print:]{1,25}
Text that will be shown to the cardholder during authentication at the ACS.
merchant[url]
http[s]://[:print:]{1,2048}
Valid URL, E.g. http://www.example.org/

Notice: Getting the correct Acquirer BIN number and the Merchant ID from the acquiring bank is always a hassle the first time.

Check

This method is used to validate the PARes response from the ACS.

POST https://mpi.3dsecure.io/check

Parameters

pares
[:base64:]
Base64 encoded PARes

Notice: The “`pares”` should be url-encoded to garantee that valid base64 reaches the endpoint. For curl use “`–data-urlencode”`.

Response status codes

Electronic Commerce Indicator (ECI) Values

ECI Visa ECI MC Status
5 2 Authentication Successful
6 1 Attempts Processing Performed
7 0 Authentication Failed
7 1 Authentication Could Not Be Performed
7 0 Error

Test card numbers

Not available yet.