Deliver receipt enrichment
curl --request POST \
--url https://api.opencard.io/api/v1/service/marcet/callback/{referenceId} \
--header 'X-Data-Signature: <x-data-signature>' \
--header 'X-Event: <x-event>'const options = {
method: 'POST',
headers: {'X-Event': '<x-event>', 'X-Data-Signature': '<x-data-signature>'}
};
fetch('https://api.opencard.io/api/v1/service/marcet/callback/{referenceId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.opencard.io/api/v1/service/marcet/callback/{referenceId}"
headers = {
"X-Event": "<x-event>",
"X-Data-Signature": "<x-data-signature>"
}
response = requests.post(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.opencard.io/api/v1/service/marcet/callback/{referenceId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"X-Data-Signature: <x-data-signature>",
"X-Event: <x-event>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}Callback
Deliver receipt enrichment
HMAC-SHA256 via X-Data-Signature header.
POST
/
v1
/
service
/
marcet
/
callback
/
{referenceId}
Deliver receipt enrichment
curl --request POST \
--url https://api.opencard.io/api/v1/service/marcet/callback/{referenceId} \
--header 'X-Data-Signature: <x-data-signature>' \
--header 'X-Event: <x-event>'const options = {
method: 'POST',
headers: {'X-Event': '<x-event>', 'X-Data-Signature': '<x-data-signature>'}
};
fetch('https://api.opencard.io/api/v1/service/marcet/callback/{referenceId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.opencard.io/api/v1/service/marcet/callback/{referenceId}"
headers = {
"X-Event": "<x-event>",
"X-Data-Signature": "<x-data-signature>"
}
response = requests.post(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.opencard.io/api/v1/service/marcet/callback/{referenceId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"X-Data-Signature: <x-data-signature>",
"X-Event: <x-event>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}⌘I

