curl --request POST \
--url https://api.app.lastaccountingcompany.com/portal/adyen-connections/api-key \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"merchant_account": "<string>",
"api_key": "<string>",
"customer_id": "<string>"
}
'import requests
url = "https://api.app.lastaccountingcompany.com/portal/adyen-connections/api-key"
payload = {
"merchant_account": "<string>",
"api_key": "<string>",
"customer_id": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({merchant_account: '<string>', api_key: '<string>', customer_id: '<string>'})
};
fetch('https://api.app.lastaccountingcompany.com/portal/adyen-connections/api-key', 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://api.app.lastaccountingcompany.com/portal/adyen-connections/api-key",
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([
'merchant_account' => '<string>',
'api_key' => '<string>',
'customer_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://api.app.lastaccountingcompany.com/portal/adyen-connections/api-key"
payload := strings.NewReader("{\n \"merchant_account\": \"<string>\",\n \"api_key\": \"<string>\",\n \"customer_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://api.app.lastaccountingcompany.com/portal/adyen-connections/api-key")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"merchant_account\": \"<string>\",\n \"api_key\": \"<string>\",\n \"customer_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.app.lastaccountingcompany.com/portal/adyen-connections/api-key")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"merchant_account\": \"<string>\",\n \"api_key\": \"<string>\",\n \"customer_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"customer_id": "<string>",
"connection": {
"id": "<string>",
"provider": "<string>",
"status": "connected",
"attention_required": true,
"reauth_required": true,
"recheck_available": true,
"display_name": "<string>",
"customer_visible_status": "<string>",
"backfill_status": "<string>",
"key_last4": "<string>",
"external_company_id": "<string>",
"merchant_account": "<string>",
"last_error_code": "<string>",
"last_error_message": "<string>",
"credential_check": {
"state": "verified",
"checked_at": "2023-11-07T05:31:56Z",
"message": "<string>"
}
},
"event_id": "<string>",
"credential_check": {
"state": "verified",
"checked_at": "2023-11-07T05:31:56Z",
"message": "<string>"
}
}{
"error": "<string>",
"detail": "<string>"
}{
"error": "<string>",
"detail": "<string>"
}{
"error": "<string>",
"detail": "<string>"
}{
"error": "<string>",
"detail": "<string>"
}{
"error": "<string>",
"detail": "<string>"
}Connect an Adyen merchant account
Connects one Adyen merchant account with the API key of a Report user that has the Merchant Report Download role. LAC stores a well-formed key server side first, then checks it with Adyen and returns the result as credential_check. A key Adyen refuses, or one LAC could not check, is kept on a connection that needs attention: it carries Adyen’s own message and claims no merchant account and imports nothing until a recheck verifies it, so fixing the setting in Adyen and calling revalidateAdyenConnection is enough; the key is not pasted again. Only a verified key claims the merchant account, and one merchant account belongs to one company. A 202 does not mean the connection is healthy; read credential_check and the connection’s status. Requires a write-scoped key.
curl --request POST \
--url https://api.app.lastaccountingcompany.com/portal/adyen-connections/api-key \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"merchant_account": "<string>",
"api_key": "<string>",
"customer_id": "<string>"
}
'import requests
url = "https://api.app.lastaccountingcompany.com/portal/adyen-connections/api-key"
payload = {
"merchant_account": "<string>",
"api_key": "<string>",
"customer_id": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({merchant_account: '<string>', api_key: '<string>', customer_id: '<string>'})
};
fetch('https://api.app.lastaccountingcompany.com/portal/adyen-connections/api-key', 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://api.app.lastaccountingcompany.com/portal/adyen-connections/api-key",
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([
'merchant_account' => '<string>',
'api_key' => '<string>',
'customer_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://api.app.lastaccountingcompany.com/portal/adyen-connections/api-key"
payload := strings.NewReader("{\n \"merchant_account\": \"<string>\",\n \"api_key\": \"<string>\",\n \"customer_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://api.app.lastaccountingcompany.com/portal/adyen-connections/api-key")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"merchant_account\": \"<string>\",\n \"api_key\": \"<string>\",\n \"customer_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.app.lastaccountingcompany.com/portal/adyen-connections/api-key")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"merchant_account\": \"<string>\",\n \"api_key\": \"<string>\",\n \"customer_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"customer_id": "<string>",
"connection": {
"id": "<string>",
"provider": "<string>",
"status": "connected",
"attention_required": true,
"reauth_required": true,
"recheck_available": true,
"display_name": "<string>",
"customer_visible_status": "<string>",
"backfill_status": "<string>",
"key_last4": "<string>",
"external_company_id": "<string>",
"merchant_account": "<string>",
"last_error_code": "<string>",
"last_error_message": "<string>",
"credential_check": {
"state": "verified",
"checked_at": "2023-11-07T05:31:56Z",
"message": "<string>"
}
},
"event_id": "<string>",
"credential_check": {
"state": "verified",
"checked_at": "2023-11-07T05:31:56Z",
"message": "<string>"
}
}{
"error": "<string>",
"detail": "<string>"
}{
"error": "<string>",
"detail": "<string>"
}{
"error": "<string>",
"detail": "<string>"
}{
"error": "<string>",
"detail": "<string>"
}{
"error": "<string>",
"detail": "<string>"
}Authorizations
Portal API key minted in portal Settings → API access. Scope read or write; pinned to one company. Send as Authorization: Bearer lac_sk_....
Body
Response
The key is stored and the connection is registered. A verified key starts the first import; a refused or unchecked one leaves the connection waiting for a recheck. The response carries only the key's last four characters.
A connection created from a pasted credential. A connection waiting for verification has status reauth_required, attention_required and reauth_required true, last_error_code credential_rejected (the provider refused the credential) or credential_unverified (the provider could not be reached), the provider's message in last_error_message, and no external_company_id until a recheck verifies it.
Show child attributes
Show child attributes
The last check of a stored credential with its provider. rejected: the provider refused it; unverified: the provider could not be reached to check it; not_checked: the provider offers no check. Absent on connections that predate credential checks.
Show child attributes
Show child attributes