Create Transaction
curl --request POST \
--url https://api.wellapp.ai/v1/transactions \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "transaction",
"attributes": {
"scheme": "sepa",
"external_ids": {
"transaction_id": "TXN_SEPA_20240115_001",
"payment_request_id": "PAY_REQ_001",
"end_to_end_id": "E2E_20240115_ACME_001"
},
"requested_execution_date": "2024-01-15",
"executed_at": "2024-01-15T14:30:00Z",
"booking_date": "2024-01-15",
"value_date": "2024-01-15",
"instructed_amount": {
"currency": "EUR",
"amount": 1250
},
"settlement_amount": {
"currency": "USD",
"amount": 1350.75
},
"foreign_exchange": {
"currency_rate": "1.0806",
"currency_pair": "EURUSD",
"currency_rate_source": "ECB",
"currency_rate_at": "2024-01-15T14:00:00Z"
},
"transaction_type": "transfer",
"status": "completed",
"category_purpose": "CBFF",
"purpose_code": "SALA",
"remittance_information": {
"unstructured": "Salary payment January 2024",
"structured_reference": "RF18539007547034",
"reference_type": "SCOR"
},
"fees": [
{
"type": "transfer_fee",
"amount": 2.5,
"currency": "EUR"
},
{
"type": "exchange_fee",
"amount": 5,
"currency": "EUR"
}
]
},
"relationships": {
"debtor_payment_means": {
"data": {
"type": "payment_means",
"id": "550e8400-e29b-41d4-a716-446655440000"
}
},
"creditor_payment_means": {
"data": {
"type": "payment_means",
"id": "550e8400-e29b-41d4-a716-446655440001"
}
},
"debtor": {
"data": {
"type": "company",
"id": "550e8400-e29b-41d4-a716-446655440002"
}
},
"creditor": {
"data": {
"type": "people",
"id": "550e8400-e29b-41d4-a716-446655440003"
}
},
"documents": {
"data": [
{
"type": "invoice",
"id": "550e8400-e29b-41d4-a716-446655440004"
}
]
},
"created_by": {
"data": {
"type": "people",
"id": "550e8400-e29b-41d4-a716-446655440005"
}
},
"workspaces": {
"data": [
{
"type": "workspace",
"id": "550e8400-e29b-41d4-a716-446655440006"
}
]
}
}
}
'import requests
url = "https://api.wellapp.ai/v1/transactions"
payload = {
"type": "transaction",
"attributes": {
"scheme": "sepa",
"external_ids": {
"transaction_id": "TXN_SEPA_20240115_001",
"payment_request_id": "PAY_REQ_001",
"end_to_end_id": "E2E_20240115_ACME_001"
},
"requested_execution_date": "2024-01-15",
"executed_at": "2024-01-15T14:30:00Z",
"booking_date": "2024-01-15",
"value_date": "2024-01-15",
"instructed_amount": {
"currency": "EUR",
"amount": 1250
},
"settlement_amount": {
"currency": "USD",
"amount": 1350.75
},
"foreign_exchange": {
"currency_rate": "1.0806",
"currency_pair": "EURUSD",
"currency_rate_source": "ECB",
"currency_rate_at": "2024-01-15T14:00:00Z"
},
"transaction_type": "transfer",
"status": "completed",
"category_purpose": "CBFF",
"purpose_code": "SALA",
"remittance_information": {
"unstructured": "Salary payment January 2024",
"structured_reference": "RF18539007547034",
"reference_type": "SCOR"
},
"fees": [
{
"type": "transfer_fee",
"amount": 2.5,
"currency": "EUR"
},
{
"type": "exchange_fee",
"amount": 5,
"currency": "EUR"
}
]
},
"relationships": {
"debtor_payment_means": { "data": {
"type": "payment_means",
"id": "550e8400-e29b-41d4-a716-446655440000"
} },
"creditor_payment_means": { "data": {
"type": "payment_means",
"id": "550e8400-e29b-41d4-a716-446655440001"
} },
"debtor": { "data": {
"type": "company",
"id": "550e8400-e29b-41d4-a716-446655440002"
} },
"creditor": { "data": {
"type": "people",
"id": "550e8400-e29b-41d4-a716-446655440003"
} },
"documents": { "data": [
{
"type": "invoice",
"id": "550e8400-e29b-41d4-a716-446655440004"
}
] },
"created_by": { "data": {
"type": "people",
"id": "550e8400-e29b-41d4-a716-446655440005"
} },
"workspaces": { "data": [
{
"type": "workspace",
"id": "550e8400-e29b-41d4-a716-446655440006"
}
] }
}
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
type: 'transaction',
attributes: {
scheme: 'sepa',
external_ids: {
transaction_id: 'TXN_SEPA_20240115_001',
payment_request_id: 'PAY_REQ_001',
end_to_end_id: 'E2E_20240115_ACME_001'
},
requested_execution_date: '2024-01-15',
executed_at: '2024-01-15T14:30:00Z',
booking_date: '2024-01-15',
value_date: '2024-01-15',
instructed_amount: {currency: 'EUR', amount: 1250},
settlement_amount: {currency: 'USD', amount: 1350.75},
foreign_exchange: {
currency_rate: '1.0806',
currency_pair: 'EURUSD',
currency_rate_source: 'ECB',
currency_rate_at: '2024-01-15T14:00:00Z'
},
transaction_type: 'transfer',
status: 'completed',
category_purpose: 'CBFF',
purpose_code: 'SALA',
remittance_information: {
unstructured: 'Salary payment January 2024',
structured_reference: 'RF18539007547034',
reference_type: 'SCOR'
},
fees: [
{type: 'transfer_fee', amount: 2.5, currency: 'EUR'},
{type: 'exchange_fee', amount: 5, currency: 'EUR'}
]
},
relationships: {
debtor_payment_means: {data: {type: 'payment_means', id: '550e8400-e29b-41d4-a716-446655440000'}},
creditor_payment_means: {data: {type: 'payment_means', id: '550e8400-e29b-41d4-a716-446655440001'}},
debtor: {data: {type: 'company', id: '550e8400-e29b-41d4-a716-446655440002'}},
creditor: {data: {type: 'people', id: '550e8400-e29b-41d4-a716-446655440003'}},
documents: {data: [{type: 'invoice', id: '550e8400-e29b-41d4-a716-446655440004'}]},
created_by: {data: {type: 'people', id: '550e8400-e29b-41d4-a716-446655440005'}},
workspaces: {data: [{type: 'workspace', id: '550e8400-e29b-41d4-a716-446655440006'}]}
}
})
};
fetch('https://api.wellapp.ai/v1/transactions', 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.wellapp.ai/v1/transactions",
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([
'type' => 'transaction',
'attributes' => [
'scheme' => 'sepa',
'external_ids' => [
'transaction_id' => 'TXN_SEPA_20240115_001',
'payment_request_id' => 'PAY_REQ_001',
'end_to_end_id' => 'E2E_20240115_ACME_001'
],
'requested_execution_date' => '2024-01-15',
'executed_at' => '2024-01-15T14:30:00Z',
'booking_date' => '2024-01-15',
'value_date' => '2024-01-15',
'instructed_amount' => [
'currency' => 'EUR',
'amount' => 1250
],
'settlement_amount' => [
'currency' => 'USD',
'amount' => 1350.75
],
'foreign_exchange' => [
'currency_rate' => '1.0806',
'currency_pair' => 'EURUSD',
'currency_rate_source' => 'ECB',
'currency_rate_at' => '2024-01-15T14:00:00Z'
],
'transaction_type' => 'transfer',
'status' => 'completed',
'category_purpose' => 'CBFF',
'purpose_code' => 'SALA',
'remittance_information' => [
'unstructured' => 'Salary payment January 2024',
'structured_reference' => 'RF18539007547034',
'reference_type' => 'SCOR'
],
'fees' => [
[
'type' => 'transfer_fee',
'amount' => 2.5,
'currency' => 'EUR'
],
[
'type' => 'exchange_fee',
'amount' => 5,
'currency' => 'EUR'
]
]
],
'relationships' => [
'debtor_payment_means' => [
'data' => [
'type' => 'payment_means',
'id' => '550e8400-e29b-41d4-a716-446655440000'
]
],
'creditor_payment_means' => [
'data' => [
'type' => 'payment_means',
'id' => '550e8400-e29b-41d4-a716-446655440001'
]
],
'debtor' => [
'data' => [
'type' => 'company',
'id' => '550e8400-e29b-41d4-a716-446655440002'
]
],
'creditor' => [
'data' => [
'type' => 'people',
'id' => '550e8400-e29b-41d4-a716-446655440003'
]
],
'documents' => [
'data' => [
[
'type' => 'invoice',
'id' => '550e8400-e29b-41d4-a716-446655440004'
]
]
],
'created_by' => [
'data' => [
'type' => 'people',
'id' => '550e8400-e29b-41d4-a716-446655440005'
]
],
'workspaces' => [
'data' => [
[
'type' => 'workspace',
'id' => '550e8400-e29b-41d4-a716-446655440006'
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"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.wellapp.ai/v1/transactions"
payload := strings.NewReader("{\n \"type\": \"transaction\",\n \"attributes\": {\n \"scheme\": \"sepa\",\n \"external_ids\": {\n \"transaction_id\": \"TXN_SEPA_20240115_001\",\n \"payment_request_id\": \"PAY_REQ_001\",\n \"end_to_end_id\": \"E2E_20240115_ACME_001\"\n },\n \"requested_execution_date\": \"2024-01-15\",\n \"executed_at\": \"2024-01-15T14:30:00Z\",\n \"booking_date\": \"2024-01-15\",\n \"value_date\": \"2024-01-15\",\n \"instructed_amount\": {\n \"currency\": \"EUR\",\n \"amount\": 1250\n },\n \"settlement_amount\": {\n \"currency\": \"USD\",\n \"amount\": 1350.75\n },\n \"foreign_exchange\": {\n \"currency_rate\": \"1.0806\",\n \"currency_pair\": \"EURUSD\",\n \"currency_rate_source\": \"ECB\",\n \"currency_rate_at\": \"2024-01-15T14:00:00Z\"\n },\n \"transaction_type\": \"transfer\",\n \"status\": \"completed\",\n \"category_purpose\": \"CBFF\",\n \"purpose_code\": \"SALA\",\n \"remittance_information\": {\n \"unstructured\": \"Salary payment January 2024\",\n \"structured_reference\": \"RF18539007547034\",\n \"reference_type\": \"SCOR\"\n },\n \"fees\": [\n {\n \"type\": \"transfer_fee\",\n \"amount\": 2.5,\n \"currency\": \"EUR\"\n },\n {\n \"type\": \"exchange_fee\",\n \"amount\": 5,\n \"currency\": \"EUR\"\n }\n ]\n },\n \"relationships\": {\n \"debtor_payment_means\": {\n \"data\": {\n \"type\": \"payment_means\",\n \"id\": \"550e8400-e29b-41d4-a716-446655440000\"\n }\n },\n \"creditor_payment_means\": {\n \"data\": {\n \"type\": \"payment_means\",\n \"id\": \"550e8400-e29b-41d4-a716-446655440001\"\n }\n },\n \"debtor\": {\n \"data\": {\n \"type\": \"company\",\n \"id\": \"550e8400-e29b-41d4-a716-446655440002\"\n }\n },\n \"creditor\": {\n \"data\": {\n \"type\": \"people\",\n \"id\": \"550e8400-e29b-41d4-a716-446655440003\"\n }\n },\n \"documents\": {\n \"data\": [\n {\n \"type\": \"invoice\",\n \"id\": \"550e8400-e29b-41d4-a716-446655440004\"\n }\n ]\n },\n \"created_by\": {\n \"data\": {\n \"type\": \"people\",\n \"id\": \"550e8400-e29b-41d4-a716-446655440005\"\n }\n },\n \"workspaces\": {\n \"data\": [\n {\n \"type\": \"workspace\",\n \"id\": \"550e8400-e29b-41d4-a716-446655440006\"\n }\n ]\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<authorization>")
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.wellapp.ai/v1/transactions")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"transaction\",\n \"attributes\": {\n \"scheme\": \"sepa\",\n \"external_ids\": {\n \"transaction_id\": \"TXN_SEPA_20240115_001\",\n \"payment_request_id\": \"PAY_REQ_001\",\n \"end_to_end_id\": \"E2E_20240115_ACME_001\"\n },\n \"requested_execution_date\": \"2024-01-15\",\n \"executed_at\": \"2024-01-15T14:30:00Z\",\n \"booking_date\": \"2024-01-15\",\n \"value_date\": \"2024-01-15\",\n \"instructed_amount\": {\n \"currency\": \"EUR\",\n \"amount\": 1250\n },\n \"settlement_amount\": {\n \"currency\": \"USD\",\n \"amount\": 1350.75\n },\n \"foreign_exchange\": {\n \"currency_rate\": \"1.0806\",\n \"currency_pair\": \"EURUSD\",\n \"currency_rate_source\": \"ECB\",\n \"currency_rate_at\": \"2024-01-15T14:00:00Z\"\n },\n \"transaction_type\": \"transfer\",\n \"status\": \"completed\",\n \"category_purpose\": \"CBFF\",\n \"purpose_code\": \"SALA\",\n \"remittance_information\": {\n \"unstructured\": \"Salary payment January 2024\",\n \"structured_reference\": \"RF18539007547034\",\n \"reference_type\": \"SCOR\"\n },\n \"fees\": [\n {\n \"type\": \"transfer_fee\",\n \"amount\": 2.5,\n \"currency\": \"EUR\"\n },\n {\n \"type\": \"exchange_fee\",\n \"amount\": 5,\n \"currency\": \"EUR\"\n }\n ]\n },\n \"relationships\": {\n \"debtor_payment_means\": {\n \"data\": {\n \"type\": \"payment_means\",\n \"id\": \"550e8400-e29b-41d4-a716-446655440000\"\n }\n },\n \"creditor_payment_means\": {\n \"data\": {\n \"type\": \"payment_means\",\n \"id\": \"550e8400-e29b-41d4-a716-446655440001\"\n }\n },\n \"debtor\": {\n \"data\": {\n \"type\": \"company\",\n \"id\": \"550e8400-e29b-41d4-a716-446655440002\"\n }\n },\n \"creditor\": {\n \"data\": {\n \"type\": \"people\",\n \"id\": \"550e8400-e29b-41d4-a716-446655440003\"\n }\n },\n \"documents\": {\n \"data\": [\n {\n \"type\": \"invoice\",\n \"id\": \"550e8400-e29b-41d4-a716-446655440004\"\n }\n ]\n },\n \"created_by\": {\n \"data\": {\n \"type\": \"people\",\n \"id\": \"550e8400-e29b-41d4-a716-446655440005\"\n }\n },\n \"workspaces\": {\n \"data\": [\n {\n \"type\": \"workspace\",\n \"id\": \"550e8400-e29b-41d4-a716-446655440006\"\n }\n ]\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wellapp.ai/v1/transactions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"type\": \"transaction\",\n \"attributes\": {\n \"scheme\": \"sepa\",\n \"external_ids\": {\n \"transaction_id\": \"TXN_SEPA_20240115_001\",\n \"payment_request_id\": \"PAY_REQ_001\",\n \"end_to_end_id\": \"E2E_20240115_ACME_001\"\n },\n \"requested_execution_date\": \"2024-01-15\",\n \"executed_at\": \"2024-01-15T14:30:00Z\",\n \"booking_date\": \"2024-01-15\",\n \"value_date\": \"2024-01-15\",\n \"instructed_amount\": {\n \"currency\": \"EUR\",\n \"amount\": 1250\n },\n \"settlement_amount\": {\n \"currency\": \"USD\",\n \"amount\": 1350.75\n },\n \"foreign_exchange\": {\n \"currency_rate\": \"1.0806\",\n \"currency_pair\": \"EURUSD\",\n \"currency_rate_source\": \"ECB\",\n \"currency_rate_at\": \"2024-01-15T14:00:00Z\"\n },\n \"transaction_type\": \"transfer\",\n \"status\": \"completed\",\n \"category_purpose\": \"CBFF\",\n \"purpose_code\": \"SALA\",\n \"remittance_information\": {\n \"unstructured\": \"Salary payment January 2024\",\n \"structured_reference\": \"RF18539007547034\",\n \"reference_type\": \"SCOR\"\n },\n \"fees\": [\n {\n \"type\": \"transfer_fee\",\n \"amount\": 2.5,\n \"currency\": \"EUR\"\n },\n {\n \"type\": \"exchange_fee\",\n \"amount\": 5,\n \"currency\": \"EUR\"\n }\n ]\n },\n \"relationships\": {\n \"debtor_payment_means\": {\n \"data\": {\n \"type\": \"payment_means\",\n \"id\": \"550e8400-e29b-41d4-a716-446655440000\"\n }\n },\n \"creditor_payment_means\": {\n \"data\": {\n \"type\": \"payment_means\",\n \"id\": \"550e8400-e29b-41d4-a716-446655440001\"\n }\n },\n \"debtor\": {\n \"data\": {\n \"type\": \"company\",\n \"id\": \"550e8400-e29b-41d4-a716-446655440002\"\n }\n },\n \"creditor\": {\n \"data\": {\n \"type\": \"people\",\n \"id\": \"550e8400-e29b-41d4-a716-446655440003\"\n }\n },\n \"documents\": {\n \"data\": [\n {\n \"type\": \"invoice\",\n \"id\": \"550e8400-e29b-41d4-a716-446655440004\"\n }\n ]\n },\n \"created_by\": {\n \"data\": {\n \"type\": \"people\",\n \"id\": \"550e8400-e29b-41d4-a716-446655440005\"\n }\n },\n \"workspaces\": {\n \"data\": [\n {\n \"type\": \"workspace\",\n \"id\": \"550e8400-e29b-41d4-a716-446655440006\"\n }\n ]\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"type": "transaction",
"id": "550e8400-e29b-41d4-a716-446655440010",
"attributes": {
"scheme": "sepa",
"external_ids": {
"transaction_id": "TXN_SEPA_20240115_001",
"payment_request_id": "PAY_REQ_001",
"end_to_end_id": "E2E_20240115_ACME_001"
},
"requested_execution_date": "2024-01-15",
"executed_at": "2024-01-15T14:30:00Z",
"booking_date": "2024-01-15",
"value_date": "2024-01-15",
"instructed_amount": {
"currency": "EUR",
"amount": 1250
},
"settlement_amount": {
"currency": "USD",
"amount": 1350.75
},
"foreign_exchange": {
"currency_rate": "1.0806",
"currency_pair": "EURUSD",
"currency_rate_source": "ECB",
"currency_rate_at": "2024-01-15T14:00:00Z"
},
"transaction_type": "transfer",
"status": "completed",
"category_purpose": "CBFF",
"purpose_code": "SALA",
"remittance_information": {
"unstructured": "Salary payment January 2024",
"structured_reference": "RF18539007547034",
"reference_type": "SCOR"
},
"fees": [
{
"type": "transfer_fee",
"amount": 2.5,
"currency": "EUR"
},
{
"type": "exchange_fee",
"amount": 5,
"currency": "EUR"
}
],
"created_at": "2024-01-15T14:30:00Z",
"updated_at": "2024-01-15T14:30:00Z"
},
"relationships": {
"debtor_payment_means": {
"data": {
"type": "payment_means",
"id": "550e8400-e29b-41d4-a716-446655440000"
}
},
"creditor_payment_means": {
"data": {
"type": "payment_means",
"id": "550e8400-e29b-41d4-a716-446655440001"
}
},
"debtor": {
"data": {
"type": "company",
"id": "550e8400-e29b-41d4-a716-446655440002"
}
},
"creditor": {
"data": {
"type": "people",
"id": "550e8400-e29b-41d4-a716-446655440003"
}
},
"documents": {
"data": [
{
"type": "invoice",
"id": "550e8400-e29b-41d4-a716-446655440004"
}
]
},
"created_by": {
"data": {
"type": "people",
"id": "550e8400-e29b-41d4-a716-446655440005"
}
},
"workspaces": {
"data": [
{
"type": "workspace",
"id": "550e8400-e29b-41d4-a716-446655440006"
}
]
}
}
},
"included": [
{
"type": "payment_means",
"id": "550e8400-e29b-41d4-a716-446655440000",
"attributes": {
"type": "account_details",
"status": "active",
"nickname": "Debtor Business Account",
"description": "Primary SEPA account for outgoing payments"
}
},
{
"type": "payment_means",
"id": "550e8400-e29b-41d4-a716-446655440001",
"attributes": {
"type": "account_details",
"status": "active",
"nickname": "Creditor Salary Account",
"description": "Employee salary receiving account"
}
},
{
"type": "company",
"id": "550e8400-e29b-41d4-a716-446655440002",
"attributes": {
"name": "Acme Corporation",
"description": "Leading technology solutions provider (debtor)"
}
},
{
"type": "people",
"id": "550e8400-e29b-41d4-a716-446655440003",
"attributes": {
"first_name": "John",
"last_name": "Doe",
"job_title": "Software Engineer"
}
},
{
"type": "invoice",
"id": "550e8400-e29b-41d4-a716-446655440004",
"attributes": {
"invoice_number": "INV-2024-0115",
"amount": 1250,
"currency": "EUR"
}
},
{
"type": "people",
"id": "550e8400-e29b-41d4-a716-446655440005",
"attributes": {
"first_name": "Marie",
"last_name": "Martin",
"job_title": "Finance Manager"
}
},
{
"type": "workspace",
"id": "550e8400-e29b-41d4-a716-446655440006",
"attributes": {
"name": "Finance Operations",
"description": "Financial operations and treasury management"
}
}
]
}{
"errors": [
{
"id": "invalid_amount",
"status": "400",
"code": "INVALID_AMOUNT",
"title": "Invalid Amount",
"detail": "Transaction amount must be positive and cannot exceed limits",
"source": {
"pointer": "/data/attributes/instructed_amount/amount"
}
}
]
}{
"errors": [
{
"id": "unauthorized",
"status": "401",
"code": "UNAUTHORIZED",
"title": "Unauthorized",
"detail": "Valid authentication credentials are required"
}
]
}Transactions
Create Transaction
Create a new financial transaction record with comprehensive payment details, foreign exchange information, remittance data, fees, and relationship associations.
POST
/
v1
/
transactions
Create Transaction
curl --request POST \
--url https://api.wellapp.ai/v1/transactions \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "transaction",
"attributes": {
"scheme": "sepa",
"external_ids": {
"transaction_id": "TXN_SEPA_20240115_001",
"payment_request_id": "PAY_REQ_001",
"end_to_end_id": "E2E_20240115_ACME_001"
},
"requested_execution_date": "2024-01-15",
"executed_at": "2024-01-15T14:30:00Z",
"booking_date": "2024-01-15",
"value_date": "2024-01-15",
"instructed_amount": {
"currency": "EUR",
"amount": 1250
},
"settlement_amount": {
"currency": "USD",
"amount": 1350.75
},
"foreign_exchange": {
"currency_rate": "1.0806",
"currency_pair": "EURUSD",
"currency_rate_source": "ECB",
"currency_rate_at": "2024-01-15T14:00:00Z"
},
"transaction_type": "transfer",
"status": "completed",
"category_purpose": "CBFF",
"purpose_code": "SALA",
"remittance_information": {
"unstructured": "Salary payment January 2024",
"structured_reference": "RF18539007547034",
"reference_type": "SCOR"
},
"fees": [
{
"type": "transfer_fee",
"amount": 2.5,
"currency": "EUR"
},
{
"type": "exchange_fee",
"amount": 5,
"currency": "EUR"
}
]
},
"relationships": {
"debtor_payment_means": {
"data": {
"type": "payment_means",
"id": "550e8400-e29b-41d4-a716-446655440000"
}
},
"creditor_payment_means": {
"data": {
"type": "payment_means",
"id": "550e8400-e29b-41d4-a716-446655440001"
}
},
"debtor": {
"data": {
"type": "company",
"id": "550e8400-e29b-41d4-a716-446655440002"
}
},
"creditor": {
"data": {
"type": "people",
"id": "550e8400-e29b-41d4-a716-446655440003"
}
},
"documents": {
"data": [
{
"type": "invoice",
"id": "550e8400-e29b-41d4-a716-446655440004"
}
]
},
"created_by": {
"data": {
"type": "people",
"id": "550e8400-e29b-41d4-a716-446655440005"
}
},
"workspaces": {
"data": [
{
"type": "workspace",
"id": "550e8400-e29b-41d4-a716-446655440006"
}
]
}
}
}
'import requests
url = "https://api.wellapp.ai/v1/transactions"
payload = {
"type": "transaction",
"attributes": {
"scheme": "sepa",
"external_ids": {
"transaction_id": "TXN_SEPA_20240115_001",
"payment_request_id": "PAY_REQ_001",
"end_to_end_id": "E2E_20240115_ACME_001"
},
"requested_execution_date": "2024-01-15",
"executed_at": "2024-01-15T14:30:00Z",
"booking_date": "2024-01-15",
"value_date": "2024-01-15",
"instructed_amount": {
"currency": "EUR",
"amount": 1250
},
"settlement_amount": {
"currency": "USD",
"amount": 1350.75
},
"foreign_exchange": {
"currency_rate": "1.0806",
"currency_pair": "EURUSD",
"currency_rate_source": "ECB",
"currency_rate_at": "2024-01-15T14:00:00Z"
},
"transaction_type": "transfer",
"status": "completed",
"category_purpose": "CBFF",
"purpose_code": "SALA",
"remittance_information": {
"unstructured": "Salary payment January 2024",
"structured_reference": "RF18539007547034",
"reference_type": "SCOR"
},
"fees": [
{
"type": "transfer_fee",
"amount": 2.5,
"currency": "EUR"
},
{
"type": "exchange_fee",
"amount": 5,
"currency": "EUR"
}
]
},
"relationships": {
"debtor_payment_means": { "data": {
"type": "payment_means",
"id": "550e8400-e29b-41d4-a716-446655440000"
} },
"creditor_payment_means": { "data": {
"type": "payment_means",
"id": "550e8400-e29b-41d4-a716-446655440001"
} },
"debtor": { "data": {
"type": "company",
"id": "550e8400-e29b-41d4-a716-446655440002"
} },
"creditor": { "data": {
"type": "people",
"id": "550e8400-e29b-41d4-a716-446655440003"
} },
"documents": { "data": [
{
"type": "invoice",
"id": "550e8400-e29b-41d4-a716-446655440004"
}
] },
"created_by": { "data": {
"type": "people",
"id": "550e8400-e29b-41d4-a716-446655440005"
} },
"workspaces": { "data": [
{
"type": "workspace",
"id": "550e8400-e29b-41d4-a716-446655440006"
}
] }
}
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
type: 'transaction',
attributes: {
scheme: 'sepa',
external_ids: {
transaction_id: 'TXN_SEPA_20240115_001',
payment_request_id: 'PAY_REQ_001',
end_to_end_id: 'E2E_20240115_ACME_001'
},
requested_execution_date: '2024-01-15',
executed_at: '2024-01-15T14:30:00Z',
booking_date: '2024-01-15',
value_date: '2024-01-15',
instructed_amount: {currency: 'EUR', amount: 1250},
settlement_amount: {currency: 'USD', amount: 1350.75},
foreign_exchange: {
currency_rate: '1.0806',
currency_pair: 'EURUSD',
currency_rate_source: 'ECB',
currency_rate_at: '2024-01-15T14:00:00Z'
},
transaction_type: 'transfer',
status: 'completed',
category_purpose: 'CBFF',
purpose_code: 'SALA',
remittance_information: {
unstructured: 'Salary payment January 2024',
structured_reference: 'RF18539007547034',
reference_type: 'SCOR'
},
fees: [
{type: 'transfer_fee', amount: 2.5, currency: 'EUR'},
{type: 'exchange_fee', amount: 5, currency: 'EUR'}
]
},
relationships: {
debtor_payment_means: {data: {type: 'payment_means', id: '550e8400-e29b-41d4-a716-446655440000'}},
creditor_payment_means: {data: {type: 'payment_means', id: '550e8400-e29b-41d4-a716-446655440001'}},
debtor: {data: {type: 'company', id: '550e8400-e29b-41d4-a716-446655440002'}},
creditor: {data: {type: 'people', id: '550e8400-e29b-41d4-a716-446655440003'}},
documents: {data: [{type: 'invoice', id: '550e8400-e29b-41d4-a716-446655440004'}]},
created_by: {data: {type: 'people', id: '550e8400-e29b-41d4-a716-446655440005'}},
workspaces: {data: [{type: 'workspace', id: '550e8400-e29b-41d4-a716-446655440006'}]}
}
})
};
fetch('https://api.wellapp.ai/v1/transactions', 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.wellapp.ai/v1/transactions",
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([
'type' => 'transaction',
'attributes' => [
'scheme' => 'sepa',
'external_ids' => [
'transaction_id' => 'TXN_SEPA_20240115_001',
'payment_request_id' => 'PAY_REQ_001',
'end_to_end_id' => 'E2E_20240115_ACME_001'
],
'requested_execution_date' => '2024-01-15',
'executed_at' => '2024-01-15T14:30:00Z',
'booking_date' => '2024-01-15',
'value_date' => '2024-01-15',
'instructed_amount' => [
'currency' => 'EUR',
'amount' => 1250
],
'settlement_amount' => [
'currency' => 'USD',
'amount' => 1350.75
],
'foreign_exchange' => [
'currency_rate' => '1.0806',
'currency_pair' => 'EURUSD',
'currency_rate_source' => 'ECB',
'currency_rate_at' => '2024-01-15T14:00:00Z'
],
'transaction_type' => 'transfer',
'status' => 'completed',
'category_purpose' => 'CBFF',
'purpose_code' => 'SALA',
'remittance_information' => [
'unstructured' => 'Salary payment January 2024',
'structured_reference' => 'RF18539007547034',
'reference_type' => 'SCOR'
],
'fees' => [
[
'type' => 'transfer_fee',
'amount' => 2.5,
'currency' => 'EUR'
],
[
'type' => 'exchange_fee',
'amount' => 5,
'currency' => 'EUR'
]
]
],
'relationships' => [
'debtor_payment_means' => [
'data' => [
'type' => 'payment_means',
'id' => '550e8400-e29b-41d4-a716-446655440000'
]
],
'creditor_payment_means' => [
'data' => [
'type' => 'payment_means',
'id' => '550e8400-e29b-41d4-a716-446655440001'
]
],
'debtor' => [
'data' => [
'type' => 'company',
'id' => '550e8400-e29b-41d4-a716-446655440002'
]
],
'creditor' => [
'data' => [
'type' => 'people',
'id' => '550e8400-e29b-41d4-a716-446655440003'
]
],
'documents' => [
'data' => [
[
'type' => 'invoice',
'id' => '550e8400-e29b-41d4-a716-446655440004'
]
]
],
'created_by' => [
'data' => [
'type' => 'people',
'id' => '550e8400-e29b-41d4-a716-446655440005'
]
],
'workspaces' => [
'data' => [
[
'type' => 'workspace',
'id' => '550e8400-e29b-41d4-a716-446655440006'
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"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.wellapp.ai/v1/transactions"
payload := strings.NewReader("{\n \"type\": \"transaction\",\n \"attributes\": {\n \"scheme\": \"sepa\",\n \"external_ids\": {\n \"transaction_id\": \"TXN_SEPA_20240115_001\",\n \"payment_request_id\": \"PAY_REQ_001\",\n \"end_to_end_id\": \"E2E_20240115_ACME_001\"\n },\n \"requested_execution_date\": \"2024-01-15\",\n \"executed_at\": \"2024-01-15T14:30:00Z\",\n \"booking_date\": \"2024-01-15\",\n \"value_date\": \"2024-01-15\",\n \"instructed_amount\": {\n \"currency\": \"EUR\",\n \"amount\": 1250\n },\n \"settlement_amount\": {\n \"currency\": \"USD\",\n \"amount\": 1350.75\n },\n \"foreign_exchange\": {\n \"currency_rate\": \"1.0806\",\n \"currency_pair\": \"EURUSD\",\n \"currency_rate_source\": \"ECB\",\n \"currency_rate_at\": \"2024-01-15T14:00:00Z\"\n },\n \"transaction_type\": \"transfer\",\n \"status\": \"completed\",\n \"category_purpose\": \"CBFF\",\n \"purpose_code\": \"SALA\",\n \"remittance_information\": {\n \"unstructured\": \"Salary payment January 2024\",\n \"structured_reference\": \"RF18539007547034\",\n \"reference_type\": \"SCOR\"\n },\n \"fees\": [\n {\n \"type\": \"transfer_fee\",\n \"amount\": 2.5,\n \"currency\": \"EUR\"\n },\n {\n \"type\": \"exchange_fee\",\n \"amount\": 5,\n \"currency\": \"EUR\"\n }\n ]\n },\n \"relationships\": {\n \"debtor_payment_means\": {\n \"data\": {\n \"type\": \"payment_means\",\n \"id\": \"550e8400-e29b-41d4-a716-446655440000\"\n }\n },\n \"creditor_payment_means\": {\n \"data\": {\n \"type\": \"payment_means\",\n \"id\": \"550e8400-e29b-41d4-a716-446655440001\"\n }\n },\n \"debtor\": {\n \"data\": {\n \"type\": \"company\",\n \"id\": \"550e8400-e29b-41d4-a716-446655440002\"\n }\n },\n \"creditor\": {\n \"data\": {\n \"type\": \"people\",\n \"id\": \"550e8400-e29b-41d4-a716-446655440003\"\n }\n },\n \"documents\": {\n \"data\": [\n {\n \"type\": \"invoice\",\n \"id\": \"550e8400-e29b-41d4-a716-446655440004\"\n }\n ]\n },\n \"created_by\": {\n \"data\": {\n \"type\": \"people\",\n \"id\": \"550e8400-e29b-41d4-a716-446655440005\"\n }\n },\n \"workspaces\": {\n \"data\": [\n {\n \"type\": \"workspace\",\n \"id\": \"550e8400-e29b-41d4-a716-446655440006\"\n }\n ]\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<authorization>")
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.wellapp.ai/v1/transactions")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"transaction\",\n \"attributes\": {\n \"scheme\": \"sepa\",\n \"external_ids\": {\n \"transaction_id\": \"TXN_SEPA_20240115_001\",\n \"payment_request_id\": \"PAY_REQ_001\",\n \"end_to_end_id\": \"E2E_20240115_ACME_001\"\n },\n \"requested_execution_date\": \"2024-01-15\",\n \"executed_at\": \"2024-01-15T14:30:00Z\",\n \"booking_date\": \"2024-01-15\",\n \"value_date\": \"2024-01-15\",\n \"instructed_amount\": {\n \"currency\": \"EUR\",\n \"amount\": 1250\n },\n \"settlement_amount\": {\n \"currency\": \"USD\",\n \"amount\": 1350.75\n },\n \"foreign_exchange\": {\n \"currency_rate\": \"1.0806\",\n \"currency_pair\": \"EURUSD\",\n \"currency_rate_source\": \"ECB\",\n \"currency_rate_at\": \"2024-01-15T14:00:00Z\"\n },\n \"transaction_type\": \"transfer\",\n \"status\": \"completed\",\n \"category_purpose\": \"CBFF\",\n \"purpose_code\": \"SALA\",\n \"remittance_information\": {\n \"unstructured\": \"Salary payment January 2024\",\n \"structured_reference\": \"RF18539007547034\",\n \"reference_type\": \"SCOR\"\n },\n \"fees\": [\n {\n \"type\": \"transfer_fee\",\n \"amount\": 2.5,\n \"currency\": \"EUR\"\n },\n {\n \"type\": \"exchange_fee\",\n \"amount\": 5,\n \"currency\": \"EUR\"\n }\n ]\n },\n \"relationships\": {\n \"debtor_payment_means\": {\n \"data\": {\n \"type\": \"payment_means\",\n \"id\": \"550e8400-e29b-41d4-a716-446655440000\"\n }\n },\n \"creditor_payment_means\": {\n \"data\": {\n \"type\": \"payment_means\",\n \"id\": \"550e8400-e29b-41d4-a716-446655440001\"\n }\n },\n \"debtor\": {\n \"data\": {\n \"type\": \"company\",\n \"id\": \"550e8400-e29b-41d4-a716-446655440002\"\n }\n },\n \"creditor\": {\n \"data\": {\n \"type\": \"people\",\n \"id\": \"550e8400-e29b-41d4-a716-446655440003\"\n }\n },\n \"documents\": {\n \"data\": [\n {\n \"type\": \"invoice\",\n \"id\": \"550e8400-e29b-41d4-a716-446655440004\"\n }\n ]\n },\n \"created_by\": {\n \"data\": {\n \"type\": \"people\",\n \"id\": \"550e8400-e29b-41d4-a716-446655440005\"\n }\n },\n \"workspaces\": {\n \"data\": [\n {\n \"type\": \"workspace\",\n \"id\": \"550e8400-e29b-41d4-a716-446655440006\"\n }\n ]\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wellapp.ai/v1/transactions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"type\": \"transaction\",\n \"attributes\": {\n \"scheme\": \"sepa\",\n \"external_ids\": {\n \"transaction_id\": \"TXN_SEPA_20240115_001\",\n \"payment_request_id\": \"PAY_REQ_001\",\n \"end_to_end_id\": \"E2E_20240115_ACME_001\"\n },\n \"requested_execution_date\": \"2024-01-15\",\n \"executed_at\": \"2024-01-15T14:30:00Z\",\n \"booking_date\": \"2024-01-15\",\n \"value_date\": \"2024-01-15\",\n \"instructed_amount\": {\n \"currency\": \"EUR\",\n \"amount\": 1250\n },\n \"settlement_amount\": {\n \"currency\": \"USD\",\n \"amount\": 1350.75\n },\n \"foreign_exchange\": {\n \"currency_rate\": \"1.0806\",\n \"currency_pair\": \"EURUSD\",\n \"currency_rate_source\": \"ECB\",\n \"currency_rate_at\": \"2024-01-15T14:00:00Z\"\n },\n \"transaction_type\": \"transfer\",\n \"status\": \"completed\",\n \"category_purpose\": \"CBFF\",\n \"purpose_code\": \"SALA\",\n \"remittance_information\": {\n \"unstructured\": \"Salary payment January 2024\",\n \"structured_reference\": \"RF18539007547034\",\n \"reference_type\": \"SCOR\"\n },\n \"fees\": [\n {\n \"type\": \"transfer_fee\",\n \"amount\": 2.5,\n \"currency\": \"EUR\"\n },\n {\n \"type\": \"exchange_fee\",\n \"amount\": 5,\n \"currency\": \"EUR\"\n }\n ]\n },\n \"relationships\": {\n \"debtor_payment_means\": {\n \"data\": {\n \"type\": \"payment_means\",\n \"id\": \"550e8400-e29b-41d4-a716-446655440000\"\n }\n },\n \"creditor_payment_means\": {\n \"data\": {\n \"type\": \"payment_means\",\n \"id\": \"550e8400-e29b-41d4-a716-446655440001\"\n }\n },\n \"debtor\": {\n \"data\": {\n \"type\": \"company\",\n \"id\": \"550e8400-e29b-41d4-a716-446655440002\"\n }\n },\n \"creditor\": {\n \"data\": {\n \"type\": \"people\",\n \"id\": \"550e8400-e29b-41d4-a716-446655440003\"\n }\n },\n \"documents\": {\n \"data\": [\n {\n \"type\": \"invoice\",\n \"id\": \"550e8400-e29b-41d4-a716-446655440004\"\n }\n ]\n },\n \"created_by\": {\n \"data\": {\n \"type\": \"people\",\n \"id\": \"550e8400-e29b-41d4-a716-446655440005\"\n }\n },\n \"workspaces\": {\n \"data\": [\n {\n \"type\": \"workspace\",\n \"id\": \"550e8400-e29b-41d4-a716-446655440006\"\n }\n ]\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"type": "transaction",
"id": "550e8400-e29b-41d4-a716-446655440010",
"attributes": {
"scheme": "sepa",
"external_ids": {
"transaction_id": "TXN_SEPA_20240115_001",
"payment_request_id": "PAY_REQ_001",
"end_to_end_id": "E2E_20240115_ACME_001"
},
"requested_execution_date": "2024-01-15",
"executed_at": "2024-01-15T14:30:00Z",
"booking_date": "2024-01-15",
"value_date": "2024-01-15",
"instructed_amount": {
"currency": "EUR",
"amount": 1250
},
"settlement_amount": {
"currency": "USD",
"amount": 1350.75
},
"foreign_exchange": {
"currency_rate": "1.0806",
"currency_pair": "EURUSD",
"currency_rate_source": "ECB",
"currency_rate_at": "2024-01-15T14:00:00Z"
},
"transaction_type": "transfer",
"status": "completed",
"category_purpose": "CBFF",
"purpose_code": "SALA",
"remittance_information": {
"unstructured": "Salary payment January 2024",
"structured_reference": "RF18539007547034",
"reference_type": "SCOR"
},
"fees": [
{
"type": "transfer_fee",
"amount": 2.5,
"currency": "EUR"
},
{
"type": "exchange_fee",
"amount": 5,
"currency": "EUR"
}
],
"created_at": "2024-01-15T14:30:00Z",
"updated_at": "2024-01-15T14:30:00Z"
},
"relationships": {
"debtor_payment_means": {
"data": {
"type": "payment_means",
"id": "550e8400-e29b-41d4-a716-446655440000"
}
},
"creditor_payment_means": {
"data": {
"type": "payment_means",
"id": "550e8400-e29b-41d4-a716-446655440001"
}
},
"debtor": {
"data": {
"type": "company",
"id": "550e8400-e29b-41d4-a716-446655440002"
}
},
"creditor": {
"data": {
"type": "people",
"id": "550e8400-e29b-41d4-a716-446655440003"
}
},
"documents": {
"data": [
{
"type": "invoice",
"id": "550e8400-e29b-41d4-a716-446655440004"
}
]
},
"created_by": {
"data": {
"type": "people",
"id": "550e8400-e29b-41d4-a716-446655440005"
}
},
"workspaces": {
"data": [
{
"type": "workspace",
"id": "550e8400-e29b-41d4-a716-446655440006"
}
]
}
}
},
"included": [
{
"type": "payment_means",
"id": "550e8400-e29b-41d4-a716-446655440000",
"attributes": {
"type": "account_details",
"status": "active",
"nickname": "Debtor Business Account",
"description": "Primary SEPA account for outgoing payments"
}
},
{
"type": "payment_means",
"id": "550e8400-e29b-41d4-a716-446655440001",
"attributes": {
"type": "account_details",
"status": "active",
"nickname": "Creditor Salary Account",
"description": "Employee salary receiving account"
}
},
{
"type": "company",
"id": "550e8400-e29b-41d4-a716-446655440002",
"attributes": {
"name": "Acme Corporation",
"description": "Leading technology solutions provider (debtor)"
}
},
{
"type": "people",
"id": "550e8400-e29b-41d4-a716-446655440003",
"attributes": {
"first_name": "John",
"last_name": "Doe",
"job_title": "Software Engineer"
}
},
{
"type": "invoice",
"id": "550e8400-e29b-41d4-a716-446655440004",
"attributes": {
"invoice_number": "INV-2024-0115",
"amount": 1250,
"currency": "EUR"
}
},
{
"type": "people",
"id": "550e8400-e29b-41d4-a716-446655440005",
"attributes": {
"first_name": "Marie",
"last_name": "Martin",
"job_title": "Finance Manager"
}
},
{
"type": "workspace",
"id": "550e8400-e29b-41d4-a716-446655440006",
"attributes": {
"name": "Finance Operations",
"description": "Financial operations and treasury management"
}
}
]
}{
"errors": [
{
"id": "invalid_amount",
"status": "400",
"code": "INVALID_AMOUNT",
"title": "Invalid Amount",
"detail": "Transaction amount must be positive and cannot exceed limits",
"source": {
"pointer": "/data/attributes/instructed_amount/amount"
}
}
]
}{
"errors": [
{
"id": "unauthorized",
"status": "401",
"code": "UNAUTHORIZED",
"title": "Unauthorized",
"detail": "Valid authentication credentials are required"
}
]
}⌘I