Send an Authorization Request
curl --request POST \
--url https://test-api.ext-uat1-sandbox.mycore.enfuce.com/test-api/v1/authorizations/request \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"card": {
"cardId": "abc123"
},
"transactionData": {
"transactionAmount": {
"amount": 25,
"currency": "EUR"
},
"transactionType": "RETAIL",
"cardEntryMode": "CONTACTLESS"
},
"merchantData": {
"merchantId": "123456789012345",
"merchantName": "Coffee Shop",
"merchantCity": "Helsinki",
"merchantCountry": "FIN",
"merchantCategoryCode": "5812",
"acquirerId": "12345678901",
"acquirerCountry": "FIN",
"terminalId": "TERM0001",
"partialApprovalCapable": false
}
}
'import requests
url = "https://test-api.ext-uat1-sandbox.mycore.enfuce.com/test-api/v1/authorizations/request"
payload = {
"card": { "cardId": "abc123" },
"transactionData": {
"transactionAmount": {
"amount": 25,
"currency": "EUR"
},
"transactionType": "RETAIL",
"cardEntryMode": "CONTACTLESS"
},
"merchantData": {
"merchantId": "123456789012345",
"merchantName": "Coffee Shop",
"merchantCity": "Helsinki",
"merchantCountry": "FIN",
"merchantCategoryCode": "5812",
"acquirerId": "12345678901",
"acquirerCountry": "FIN",
"terminalId": "TERM0001",
"partialApprovalCapable": False
}
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
card: {cardId: 'abc123'},
transactionData: {
transactionAmount: {amount: 25, currency: 'EUR'},
transactionType: 'RETAIL',
cardEntryMode: 'CONTACTLESS'
},
merchantData: {
merchantId: '123456789012345',
merchantName: 'Coffee Shop',
merchantCity: 'Helsinki',
merchantCountry: 'FIN',
merchantCategoryCode: '5812',
acquirerId: '12345678901',
acquirerCountry: 'FIN',
terminalId: 'TERM0001',
partialApprovalCapable: false
}
})
};
fetch('https://test-api.ext-uat1-sandbox.mycore.enfuce.com/test-api/v1/authorizations/request', 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://test-api.ext-uat1-sandbox.mycore.enfuce.com/test-api/v1/authorizations/request",
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([
'card' => [
'cardId' => 'abc123'
],
'transactionData' => [
'transactionAmount' => [
'amount' => 25,
'currency' => 'EUR'
],
'transactionType' => 'RETAIL',
'cardEntryMode' => 'CONTACTLESS'
],
'merchantData' => [
'merchantId' => '123456789012345',
'merchantName' => 'Coffee Shop',
'merchantCity' => 'Helsinki',
'merchantCountry' => 'FIN',
'merchantCategoryCode' => '5812',
'acquirerId' => '12345678901',
'acquirerCountry' => 'FIN',
'terminalId' => 'TERM0001',
'partialApprovalCapable' => false
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"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://test-api.ext-uat1-sandbox.mycore.enfuce.com/test-api/v1/authorizations/request"
payload := strings.NewReader("{\n \"card\": {\n \"cardId\": \"abc123\"\n },\n \"transactionData\": {\n \"transactionAmount\": {\n \"amount\": 25,\n \"currency\": \"EUR\"\n },\n \"transactionType\": \"RETAIL\",\n \"cardEntryMode\": \"CONTACTLESS\"\n },\n \"merchantData\": {\n \"merchantId\": \"123456789012345\",\n \"merchantName\": \"Coffee Shop\",\n \"merchantCity\": \"Helsinki\",\n \"merchantCountry\": \"FIN\",\n \"merchantCategoryCode\": \"5812\",\n \"acquirerId\": \"12345678901\",\n \"acquirerCountry\": \"FIN\",\n \"terminalId\": \"TERM0001\",\n \"partialApprovalCapable\": false\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
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://test-api.ext-uat1-sandbox.mycore.enfuce.com/test-api/v1/authorizations/request")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"card\": {\n \"cardId\": \"abc123\"\n },\n \"transactionData\": {\n \"transactionAmount\": {\n \"amount\": 25,\n \"currency\": \"EUR\"\n },\n \"transactionType\": \"RETAIL\",\n \"cardEntryMode\": \"CONTACTLESS\"\n },\n \"merchantData\": {\n \"merchantId\": \"123456789012345\",\n \"merchantName\": \"Coffee Shop\",\n \"merchantCity\": \"Helsinki\",\n \"merchantCountry\": \"FIN\",\n \"merchantCategoryCode\": \"5812\",\n \"acquirerId\": \"12345678901\",\n \"acquirerCountry\": \"FIN\",\n \"terminalId\": \"TERM0001\",\n \"partialApprovalCapable\": false\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://test-api.ext-uat1-sandbox.mycore.enfuce.com/test-api/v1/authorizations/request")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"card\": {\n \"cardId\": \"abc123\"\n },\n \"transactionData\": {\n \"transactionAmount\": {\n \"amount\": 25,\n \"currency\": \"EUR\"\n },\n \"transactionType\": \"RETAIL\",\n \"cardEntryMode\": \"CONTACTLESS\"\n },\n \"merchantData\": {\n \"merchantId\": \"123456789012345\",\n \"merchantName\": \"Coffee Shop\",\n \"merchantCity\": \"Helsinki\",\n \"merchantCountry\": \"FIN\",\n \"merchantCategoryCode\": \"5812\",\n \"acquirerId\": \"12345678901\",\n \"acquirerCountry\": \"FIN\",\n \"terminalId\": \"TERM0001\",\n \"partialApprovalCapable\": false\n }\n}"
response = http.request(request)
puts response.read_body{
"metadata": {
"mti": "0110",
"id": "<string>"
},
"transactionData": {
"authResponseCode": "00",
"retrievalReferenceNumber": "<string>"
}
}{
"code": "<string>",
"message": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"errorCode": "<string>",
"errorType": "STATIC_VALIDATION_ERROR",
"errorReason": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"message": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"errorCode": "<string>",
"errorType": "STATIC_VALIDATION_ERROR",
"errorReason": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"message": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"errorCode": "<string>",
"errorType": "STATIC_VALIDATION_ERROR",
"errorReason": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"message": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"errorCode": "<string>",
"errorType": "STATIC_VALIDATION_ERROR",
"errorReason": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"message": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"errorCode": "<string>",
"errorType": "STATIC_VALIDATION_ERROR",
"errorReason": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}Test API
Send an Authorization Request
Send a request to this endpoint to create an initial authorisation request.
The communications between the card Schemes and the processor are in ISO 8583 format.
POST
/
v1
/
authorizations
/
request
Send an Authorization Request
curl --request POST \
--url https://test-api.ext-uat1-sandbox.mycore.enfuce.com/test-api/v1/authorizations/request \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"card": {
"cardId": "abc123"
},
"transactionData": {
"transactionAmount": {
"amount": 25,
"currency": "EUR"
},
"transactionType": "RETAIL",
"cardEntryMode": "CONTACTLESS"
},
"merchantData": {
"merchantId": "123456789012345",
"merchantName": "Coffee Shop",
"merchantCity": "Helsinki",
"merchantCountry": "FIN",
"merchantCategoryCode": "5812",
"acquirerId": "12345678901",
"acquirerCountry": "FIN",
"terminalId": "TERM0001",
"partialApprovalCapable": false
}
}
'import requests
url = "https://test-api.ext-uat1-sandbox.mycore.enfuce.com/test-api/v1/authorizations/request"
payload = {
"card": { "cardId": "abc123" },
"transactionData": {
"transactionAmount": {
"amount": 25,
"currency": "EUR"
},
"transactionType": "RETAIL",
"cardEntryMode": "CONTACTLESS"
},
"merchantData": {
"merchantId": "123456789012345",
"merchantName": "Coffee Shop",
"merchantCity": "Helsinki",
"merchantCountry": "FIN",
"merchantCategoryCode": "5812",
"acquirerId": "12345678901",
"acquirerCountry": "FIN",
"terminalId": "TERM0001",
"partialApprovalCapable": False
}
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
card: {cardId: 'abc123'},
transactionData: {
transactionAmount: {amount: 25, currency: 'EUR'},
transactionType: 'RETAIL',
cardEntryMode: 'CONTACTLESS'
},
merchantData: {
merchantId: '123456789012345',
merchantName: 'Coffee Shop',
merchantCity: 'Helsinki',
merchantCountry: 'FIN',
merchantCategoryCode: '5812',
acquirerId: '12345678901',
acquirerCountry: 'FIN',
terminalId: 'TERM0001',
partialApprovalCapable: false
}
})
};
fetch('https://test-api.ext-uat1-sandbox.mycore.enfuce.com/test-api/v1/authorizations/request', 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://test-api.ext-uat1-sandbox.mycore.enfuce.com/test-api/v1/authorizations/request",
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([
'card' => [
'cardId' => 'abc123'
],
'transactionData' => [
'transactionAmount' => [
'amount' => 25,
'currency' => 'EUR'
],
'transactionType' => 'RETAIL',
'cardEntryMode' => 'CONTACTLESS'
],
'merchantData' => [
'merchantId' => '123456789012345',
'merchantName' => 'Coffee Shop',
'merchantCity' => 'Helsinki',
'merchantCountry' => 'FIN',
'merchantCategoryCode' => '5812',
'acquirerId' => '12345678901',
'acquirerCountry' => 'FIN',
'terminalId' => 'TERM0001',
'partialApprovalCapable' => false
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"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://test-api.ext-uat1-sandbox.mycore.enfuce.com/test-api/v1/authorizations/request"
payload := strings.NewReader("{\n \"card\": {\n \"cardId\": \"abc123\"\n },\n \"transactionData\": {\n \"transactionAmount\": {\n \"amount\": 25,\n \"currency\": \"EUR\"\n },\n \"transactionType\": \"RETAIL\",\n \"cardEntryMode\": \"CONTACTLESS\"\n },\n \"merchantData\": {\n \"merchantId\": \"123456789012345\",\n \"merchantName\": \"Coffee Shop\",\n \"merchantCity\": \"Helsinki\",\n \"merchantCountry\": \"FIN\",\n \"merchantCategoryCode\": \"5812\",\n \"acquirerId\": \"12345678901\",\n \"acquirerCountry\": \"FIN\",\n \"terminalId\": \"TERM0001\",\n \"partialApprovalCapable\": false\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
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://test-api.ext-uat1-sandbox.mycore.enfuce.com/test-api/v1/authorizations/request")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"card\": {\n \"cardId\": \"abc123\"\n },\n \"transactionData\": {\n \"transactionAmount\": {\n \"amount\": 25,\n \"currency\": \"EUR\"\n },\n \"transactionType\": \"RETAIL\",\n \"cardEntryMode\": \"CONTACTLESS\"\n },\n \"merchantData\": {\n \"merchantId\": \"123456789012345\",\n \"merchantName\": \"Coffee Shop\",\n \"merchantCity\": \"Helsinki\",\n \"merchantCountry\": \"FIN\",\n \"merchantCategoryCode\": \"5812\",\n \"acquirerId\": \"12345678901\",\n \"acquirerCountry\": \"FIN\",\n \"terminalId\": \"TERM0001\",\n \"partialApprovalCapable\": false\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://test-api.ext-uat1-sandbox.mycore.enfuce.com/test-api/v1/authorizations/request")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"card\": {\n \"cardId\": \"abc123\"\n },\n \"transactionData\": {\n \"transactionAmount\": {\n \"amount\": 25,\n \"currency\": \"EUR\"\n },\n \"transactionType\": \"RETAIL\",\n \"cardEntryMode\": \"CONTACTLESS\"\n },\n \"merchantData\": {\n \"merchantId\": \"123456789012345\",\n \"merchantName\": \"Coffee Shop\",\n \"merchantCity\": \"Helsinki\",\n \"merchantCountry\": \"FIN\",\n \"merchantCategoryCode\": \"5812\",\n \"acquirerId\": \"12345678901\",\n \"acquirerCountry\": \"FIN\",\n \"terminalId\": \"TERM0001\",\n \"partialApprovalCapable\": false\n }\n}"
response = http.request(request)
puts response.read_body{
"metadata": {
"mti": "0110",
"id": "<string>"
},
"transactionData": {
"authResponseCode": "00",
"retrievalReferenceNumber": "<string>"
}
}{
"code": "<string>",
"message": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"errorCode": "<string>",
"errorType": "STATIC_VALIDATION_ERROR",
"errorReason": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"message": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"errorCode": "<string>",
"errorType": "STATIC_VALIDATION_ERROR",
"errorReason": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"message": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"errorCode": "<string>",
"errorType": "STATIC_VALIDATION_ERROR",
"errorReason": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"message": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"errorCode": "<string>",
"errorType": "STATIC_VALIDATION_ERROR",
"errorReason": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"message": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"errorCode": "<string>",
"errorType": "STATIC_VALIDATION_ERROR",
"errorReason": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}Authorizations
HTTP Basic Auth. Credentials must carry the CAT2_API_ALL role.
Query Parameters
Identifier of the user performing the action, used for audit logging.
Body
application/json
Request payload of initial authorisation request.
Card used in the transaction.
Show child attributes
Show child attributes
Transaction details.
Show child attributes
Show child attributes
Merchant and acquirer data (ISO 8583 DE18, DE32, DE41–43).
Show child attributes
Show child attributes
3DS authentication data to include in the authorization.
Show child attributes
Show child attributes
Was this page helpful?
⌘I

