curl --request POST \
--url https://sandbox.api.mnai.com/v1/virtual-accounts/sessions \
--header 'Content-Type: application/json' \
--header 'X-Meridian-Api-Key: <x-meridian-api-key>' \
--header 'X-Meridian-Signature: <api-key>' \
--header 'X-Meridian-Timestamp: <x-meridian-timestamp>' \
--data '
{
"customerId": "<string>",
"receiver": {
"firstName": "<string>",
"lastName": "<string>",
"phoneNumber": "<string>",
"accountInstitution": "Bank of Example",
"accountNumber": "1234567890"
},
"redirectUrl": "<string>",
"customer": {
"addressLine1": "<string>",
"addressLine2": "<string>",
"city": "<string>",
"countryCode": "<string>",
"dateOfBirth": "<string>",
"email": "<string>",
"employmentStatus": "<string>",
"employmentStatusDescription": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"monthlyDepositVolume": "<string>",
"monthlyDepositVolumeCurrency": "<string>",
"occupation": "<string>",
"phoneNumber": "<string>",
"postalCode": "<string>",
"primarySourceOfFunds": "<string>",
"primarySourceOfFundsDescription": "<string>",
"stateProvince": "<string>"
}
}
'import requests
url = "https://sandbox.api.mnai.com/v1/virtual-accounts/sessions"
payload = {
"customerId": "<string>",
"receiver": {
"firstName": "<string>",
"lastName": "<string>",
"phoneNumber": "<string>",
"accountInstitution": "Bank of Example",
"accountNumber": "1234567890"
},
"redirectUrl": "<string>",
"customer": {
"addressLine1": "<string>",
"addressLine2": "<string>",
"city": "<string>",
"countryCode": "<string>",
"dateOfBirth": "<string>",
"email": "<string>",
"employmentStatus": "<string>",
"employmentStatusDescription": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"monthlyDepositVolume": "<string>",
"monthlyDepositVolumeCurrency": "<string>",
"occupation": "<string>",
"phoneNumber": "<string>",
"postalCode": "<string>",
"primarySourceOfFunds": "<string>",
"primarySourceOfFundsDescription": "<string>",
"stateProvince": "<string>"
}
}
headers = {
"X-Meridian-Api-Key": "<x-meridian-api-key>",
"X-Meridian-Timestamp": "<x-meridian-timestamp>",
"X-Meridian-Signature": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Meridian-Api-Key': '<x-meridian-api-key>',
'X-Meridian-Timestamp': '<x-meridian-timestamp>',
'X-Meridian-Signature': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
customerId: '<string>',
receiver: {
firstName: '<string>',
lastName: '<string>',
phoneNumber: '<string>',
accountInstitution: 'Bank of Example',
accountNumber: '1234567890'
},
redirectUrl: '<string>',
customer: {
addressLine1: '<string>',
addressLine2: '<string>',
city: '<string>',
countryCode: '<string>',
dateOfBirth: '<string>',
email: '<string>',
employmentStatus: '<string>',
employmentStatusDescription: '<string>',
firstName: '<string>',
lastName: '<string>',
monthlyDepositVolume: '<string>',
monthlyDepositVolumeCurrency: '<string>',
occupation: '<string>',
phoneNumber: '<string>',
postalCode: '<string>',
primarySourceOfFunds: '<string>',
primarySourceOfFundsDescription: '<string>',
stateProvince: '<string>'
}
})
};
fetch('https://sandbox.api.mnai.com/v1/virtual-accounts/sessions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://sandbox.api.mnai.com/v1/virtual-accounts/sessions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'customerId' => '<string>',
'receiver' => [
'firstName' => '<string>',
'lastName' => '<string>',
'phoneNumber' => '<string>',
'accountInstitution' => 'Bank of Example',
'accountNumber' => '1234567890'
],
'redirectUrl' => '<string>',
'customer' => [
'addressLine1' => '<string>',
'addressLine2' => '<string>',
'city' => '<string>',
'countryCode' => '<string>',
'dateOfBirth' => '<string>',
'email' => '<string>',
'employmentStatus' => '<string>',
'employmentStatusDescription' => '<string>',
'firstName' => '<string>',
'lastName' => '<string>',
'monthlyDepositVolume' => '<string>',
'monthlyDepositVolumeCurrency' => '<string>',
'occupation' => '<string>',
'phoneNumber' => '<string>',
'postalCode' => '<string>',
'primarySourceOfFunds' => '<string>',
'primarySourceOfFundsDescription' => '<string>',
'stateProvince' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Meridian-Api-Key: <x-meridian-api-key>",
"X-Meridian-Signature: <api-key>",
"X-Meridian-Timestamp: <x-meridian-timestamp>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sandbox.api.mnai.com/v1/virtual-accounts/sessions"
payload := strings.NewReader("{\n \"customerId\": \"<string>\",\n \"receiver\": {\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"accountInstitution\": \"Bank of Example\",\n \"accountNumber\": \"1234567890\"\n },\n \"redirectUrl\": \"<string>\",\n \"customer\": {\n \"addressLine1\": \"<string>\",\n \"addressLine2\": \"<string>\",\n \"city\": \"<string>\",\n \"countryCode\": \"<string>\",\n \"dateOfBirth\": \"<string>\",\n \"email\": \"<string>\",\n \"employmentStatus\": \"<string>\",\n \"employmentStatusDescription\": \"<string>\",\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"monthlyDepositVolume\": \"<string>\",\n \"monthlyDepositVolumeCurrency\": \"<string>\",\n \"occupation\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"primarySourceOfFunds\": \"<string>\",\n \"primarySourceOfFundsDescription\": \"<string>\",\n \"stateProvince\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Meridian-Api-Key", "<x-meridian-api-key>")
req.Header.Add("X-Meridian-Timestamp", "<x-meridian-timestamp>")
req.Header.Add("X-Meridian-Signature", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://sandbox.api.mnai.com/v1/virtual-accounts/sessions")
.header("X-Meridian-Api-Key", "<x-meridian-api-key>")
.header("X-Meridian-Timestamp", "<x-meridian-timestamp>")
.header("X-Meridian-Signature", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"customerId\": \"<string>\",\n \"receiver\": {\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"accountInstitution\": \"Bank of Example\",\n \"accountNumber\": \"1234567890\"\n },\n \"redirectUrl\": \"<string>\",\n \"customer\": {\n \"addressLine1\": \"<string>\",\n \"addressLine2\": \"<string>\",\n \"city\": \"<string>\",\n \"countryCode\": \"<string>\",\n \"dateOfBirth\": \"<string>\",\n \"email\": \"<string>\",\n \"employmentStatus\": \"<string>\",\n \"employmentStatusDescription\": \"<string>\",\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"monthlyDepositVolume\": \"<string>\",\n \"monthlyDepositVolumeCurrency\": \"<string>\",\n \"occupation\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"primarySourceOfFunds\": \"<string>\",\n \"primarySourceOfFundsDescription\": \"<string>\",\n \"stateProvince\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.api.mnai.com/v1/virtual-accounts/sessions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Meridian-Api-Key"] = '<x-meridian-api-key>'
request["X-Meridian-Timestamp"] = '<x-meridian-timestamp>'
request["X-Meridian-Signature"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"customerId\": \"<string>\",\n \"receiver\": {\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"accountInstitution\": \"Bank of Example\",\n \"accountNumber\": \"1234567890\"\n },\n \"redirectUrl\": \"<string>\",\n \"customer\": {\n \"addressLine1\": \"<string>\",\n \"addressLine2\": \"<string>\",\n \"city\": \"<string>\",\n \"countryCode\": \"<string>\",\n \"dateOfBirth\": \"<string>\",\n \"email\": \"<string>\",\n \"employmentStatus\": \"<string>\",\n \"employmentStatusDescription\": \"<string>\",\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"monthlyDepositVolume\": \"<string>\",\n \"monthlyDepositVolumeCurrency\": \"<string>\",\n \"occupation\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"primarySourceOfFunds\": \"<string>\",\n \"primarySourceOfFundsDescription\": \"<string>\",\n \"stateProvince\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"expiresAt": "<string>",
"sessionKey": "<string>"
}{
"hasValidationErrors": true,
"message": "<string>",
"validationErrors": [
{
"type": "InvalidFormat",
"fieldRef": "<string>",
"message": "<string>"
}
],
"errorCode": "<string>"
}Create a Session
Create a Virtual Account Session to launch the hosted Meridian onboarding experience.
curl --request POST \
--url https://sandbox.api.mnai.com/v1/virtual-accounts/sessions \
--header 'Content-Type: application/json' \
--header 'X-Meridian-Api-Key: <x-meridian-api-key>' \
--header 'X-Meridian-Signature: <api-key>' \
--header 'X-Meridian-Timestamp: <x-meridian-timestamp>' \
--data '
{
"customerId": "<string>",
"receiver": {
"firstName": "<string>",
"lastName": "<string>",
"phoneNumber": "<string>",
"accountInstitution": "Bank of Example",
"accountNumber": "1234567890"
},
"redirectUrl": "<string>",
"customer": {
"addressLine1": "<string>",
"addressLine2": "<string>",
"city": "<string>",
"countryCode": "<string>",
"dateOfBirth": "<string>",
"email": "<string>",
"employmentStatus": "<string>",
"employmentStatusDescription": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"monthlyDepositVolume": "<string>",
"monthlyDepositVolumeCurrency": "<string>",
"occupation": "<string>",
"phoneNumber": "<string>",
"postalCode": "<string>",
"primarySourceOfFunds": "<string>",
"primarySourceOfFundsDescription": "<string>",
"stateProvince": "<string>"
}
}
'import requests
url = "https://sandbox.api.mnai.com/v1/virtual-accounts/sessions"
payload = {
"customerId": "<string>",
"receiver": {
"firstName": "<string>",
"lastName": "<string>",
"phoneNumber": "<string>",
"accountInstitution": "Bank of Example",
"accountNumber": "1234567890"
},
"redirectUrl": "<string>",
"customer": {
"addressLine1": "<string>",
"addressLine2": "<string>",
"city": "<string>",
"countryCode": "<string>",
"dateOfBirth": "<string>",
"email": "<string>",
"employmentStatus": "<string>",
"employmentStatusDescription": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"monthlyDepositVolume": "<string>",
"monthlyDepositVolumeCurrency": "<string>",
"occupation": "<string>",
"phoneNumber": "<string>",
"postalCode": "<string>",
"primarySourceOfFunds": "<string>",
"primarySourceOfFundsDescription": "<string>",
"stateProvince": "<string>"
}
}
headers = {
"X-Meridian-Api-Key": "<x-meridian-api-key>",
"X-Meridian-Timestamp": "<x-meridian-timestamp>",
"X-Meridian-Signature": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Meridian-Api-Key': '<x-meridian-api-key>',
'X-Meridian-Timestamp': '<x-meridian-timestamp>',
'X-Meridian-Signature': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
customerId: '<string>',
receiver: {
firstName: '<string>',
lastName: '<string>',
phoneNumber: '<string>',
accountInstitution: 'Bank of Example',
accountNumber: '1234567890'
},
redirectUrl: '<string>',
customer: {
addressLine1: '<string>',
addressLine2: '<string>',
city: '<string>',
countryCode: '<string>',
dateOfBirth: '<string>',
email: '<string>',
employmentStatus: '<string>',
employmentStatusDescription: '<string>',
firstName: '<string>',
lastName: '<string>',
monthlyDepositVolume: '<string>',
monthlyDepositVolumeCurrency: '<string>',
occupation: '<string>',
phoneNumber: '<string>',
postalCode: '<string>',
primarySourceOfFunds: '<string>',
primarySourceOfFundsDescription: '<string>',
stateProvince: '<string>'
}
})
};
fetch('https://sandbox.api.mnai.com/v1/virtual-accounts/sessions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://sandbox.api.mnai.com/v1/virtual-accounts/sessions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'customerId' => '<string>',
'receiver' => [
'firstName' => '<string>',
'lastName' => '<string>',
'phoneNumber' => '<string>',
'accountInstitution' => 'Bank of Example',
'accountNumber' => '1234567890'
],
'redirectUrl' => '<string>',
'customer' => [
'addressLine1' => '<string>',
'addressLine2' => '<string>',
'city' => '<string>',
'countryCode' => '<string>',
'dateOfBirth' => '<string>',
'email' => '<string>',
'employmentStatus' => '<string>',
'employmentStatusDescription' => '<string>',
'firstName' => '<string>',
'lastName' => '<string>',
'monthlyDepositVolume' => '<string>',
'monthlyDepositVolumeCurrency' => '<string>',
'occupation' => '<string>',
'phoneNumber' => '<string>',
'postalCode' => '<string>',
'primarySourceOfFunds' => '<string>',
'primarySourceOfFundsDescription' => '<string>',
'stateProvince' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Meridian-Api-Key: <x-meridian-api-key>",
"X-Meridian-Signature: <api-key>",
"X-Meridian-Timestamp: <x-meridian-timestamp>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sandbox.api.mnai.com/v1/virtual-accounts/sessions"
payload := strings.NewReader("{\n \"customerId\": \"<string>\",\n \"receiver\": {\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"accountInstitution\": \"Bank of Example\",\n \"accountNumber\": \"1234567890\"\n },\n \"redirectUrl\": \"<string>\",\n \"customer\": {\n \"addressLine1\": \"<string>\",\n \"addressLine2\": \"<string>\",\n \"city\": \"<string>\",\n \"countryCode\": \"<string>\",\n \"dateOfBirth\": \"<string>\",\n \"email\": \"<string>\",\n \"employmentStatus\": \"<string>\",\n \"employmentStatusDescription\": \"<string>\",\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"monthlyDepositVolume\": \"<string>\",\n \"monthlyDepositVolumeCurrency\": \"<string>\",\n \"occupation\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"primarySourceOfFunds\": \"<string>\",\n \"primarySourceOfFundsDescription\": \"<string>\",\n \"stateProvince\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Meridian-Api-Key", "<x-meridian-api-key>")
req.Header.Add("X-Meridian-Timestamp", "<x-meridian-timestamp>")
req.Header.Add("X-Meridian-Signature", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://sandbox.api.mnai.com/v1/virtual-accounts/sessions")
.header("X-Meridian-Api-Key", "<x-meridian-api-key>")
.header("X-Meridian-Timestamp", "<x-meridian-timestamp>")
.header("X-Meridian-Signature", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"customerId\": \"<string>\",\n \"receiver\": {\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"accountInstitution\": \"Bank of Example\",\n \"accountNumber\": \"1234567890\"\n },\n \"redirectUrl\": \"<string>\",\n \"customer\": {\n \"addressLine1\": \"<string>\",\n \"addressLine2\": \"<string>\",\n \"city\": \"<string>\",\n \"countryCode\": \"<string>\",\n \"dateOfBirth\": \"<string>\",\n \"email\": \"<string>\",\n \"employmentStatus\": \"<string>\",\n \"employmentStatusDescription\": \"<string>\",\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"monthlyDepositVolume\": \"<string>\",\n \"monthlyDepositVolumeCurrency\": \"<string>\",\n \"occupation\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"primarySourceOfFunds\": \"<string>\",\n \"primarySourceOfFundsDescription\": \"<string>\",\n \"stateProvince\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.api.mnai.com/v1/virtual-accounts/sessions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Meridian-Api-Key"] = '<x-meridian-api-key>'
request["X-Meridian-Timestamp"] = '<x-meridian-timestamp>'
request["X-Meridian-Signature"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"customerId\": \"<string>\",\n \"receiver\": {\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"accountInstitution\": \"Bank of Example\",\n \"accountNumber\": \"1234567890\"\n },\n \"redirectUrl\": \"<string>\",\n \"customer\": {\n \"addressLine1\": \"<string>\",\n \"addressLine2\": \"<string>\",\n \"city\": \"<string>\",\n \"countryCode\": \"<string>\",\n \"dateOfBirth\": \"<string>\",\n \"email\": \"<string>\",\n \"employmentStatus\": \"<string>\",\n \"employmentStatusDescription\": \"<string>\",\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"monthlyDepositVolume\": \"<string>\",\n \"monthlyDepositVolumeCurrency\": \"<string>\",\n \"occupation\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"primarySourceOfFunds\": \"<string>\",\n \"primarySourceOfFundsDescription\": \"<string>\",\n \"stateProvince\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"expiresAt": "<string>",
"sessionKey": "<string>"
}{
"hasValidationErrors": true,
"message": "<string>",
"validationErrors": [
{
"type": "InvalidFormat",
"fieldRef": "<string>",
"message": "<string>"
}
],
"errorCode": "<string>"
}Authorizations
Meridian HMAC header authentication.
Required headers:
- X-Meridian-Api-Key
- X-Meridian-Timestamp
- X-Meridian-Signature
X-Meridian-Signature is the HMAC SHA-256 signature of the canonical request string, computed per request as HMAC-SHA256(apiKey + timestamp + method + path + body). See Authentication for how to construct it.
Headers
API key issued by Meridian during provisioning.
Current time in milliseconds since the Unix epoch. Must be within 10 seconds of the request.
Body
Request body to create a Virtual Account Session
A non-sensitive string that uniquely identifies your customer across all Meridian sessions. Must be consistent and never change — Meridian uses this to detect whether to route a customer to onboarding or Account Home. Note: this value is case-sensitive; inconsistent casing will cause a returning customer to be treated as new.
This data is separate from KYC information, as this will not be changed by the customer during onboarding. All details provided here must match the information associated with the receiver of funds withdrawn from the virtual account.
Show child attributes
Show child attributes
Deprecated. Any valid URL is still required here, but the value is ignored. This field will be removed in a future release.
All fields in this data structure should be populated on a best-efforts basis. No field is required but this data helps to provide a seamless user experience for the customer so that they don’t need to re-enter information already provided to the partner.
Show child attributes
Show child attributes