const mangopayInstance = require("mangopay2-nodejs-sdk");
const mangopay = new mangopayInstance({
clientId: "client-id",
clientApiKey: "api-key",
});
let idempotencyKey = "045896dd-2547-4f91-a352-5303bb2c258c";
const viewApiResponse = async (idempotencyKey) => {
return await mangopay.Idempotency.get(idempotencyKey)
.then((response) => {
console.info(response);
return response;
})
.catch((err) => {
console.log(err);
return false;
});
};
viewApiResponse(idempotencyKey);
{
"StatusCode": "200",
"ContentLength": "591",
"ContentType": "application/json; charset=utf-8",
"Date": "Tue, 19 Jul 2022 08:47:59 GMT",
"RequestURL": "https://api.mangopay.com/V2.01/clientId/users/natural",
"Resource": {
"Address": {
"AddressLine1": "Rue des plantes",
"AddressLine2": "The Oasis",
"City": "Paris",
"Region": "Ile de France",
"PostalCode": "75001",
"Country": "FR"
},
"FirstName": "Jane",
"LastName": "Doe",
"Birthday": null,
"Nationality": null,
"CountryOfResidence": null,
"Occupation": null,
"IncomeRange": null,
"ProofOfIdentity": null,
"ProofOfAddress": null,
"Capacity": "NORMAL",
"Id": "146476890",
"Tag": "test doc july 2022",
"CreationDate": 1658220479,
"PersonType": "NATURAL",
"Email": "[email protected]",
"KYCLevel": "LIGHT",
"TermsAndConditionsAccepted": true,
"TermsAndConditionsAcceptedDate": 1658220479,
"UserCategory": "PAYER"
}
}
const mangopayInstance = require("mangopay2-nodejs-sdk");
const mangopay = new mangopayInstance({
clientId: "client-id",
clientApiKey: "api-key",
});
let idempotencyKey = "045896dd-2547-4f91-a352-5303bb2c258c";
const viewApiResponse = async (idempotencyKey) => {
return await mangopay.Idempotency.get(idempotencyKey)
.then((response) => {
console.info(response);
return response;
})
.catch((err) => {
console.log(err);
return false;
});
};
viewApiResponse(idempotencyKey);
{
"StatusCode": "200",
"ContentLength": "591",
"ContentType": "application/json; charset=utf-8",
"Date": "Tue, 19 Jul 2022 08:47:59 GMT",
"RequestURL": "https://api.mangopay.com/V2.01/clientId/users/natural",
"Resource": {
"Address": {
"AddressLine1": "Rue des plantes",
"AddressLine2": "The Oasis",
"City": "Paris",
"Region": "Ile de France",
"PostalCode": "75001",
"Country": "FR"
},
"FirstName": "Jane",
"LastName": "Doe",
"Birthday": null,
"Nationality": null,
"CountryOfResidence": null,
"Occupation": null,
"IncomeRange": null,
"ProofOfIdentity": null,
"ProofOfAddress": null,
"Capacity": "NORMAL",
"Id": "146476890",
"Tag": "test doc july 2022",
"CreationDate": 1658220479,
"PersonType": "NATURAL",
"Email": "[email protected]",
"KYCLevel": "LIGHT",
"TermsAndConditionsAccepted": true,
"TermsAndConditionsAcceptedDate": 1658220479,
"UserCategory": "PAYER"
}
}
200
{
"StatusCode": "200",
"ContentLength": "591",
"ContentType": "application/json; charset=utf-8",
"Date": "Tue, 19 Jul 2022 08:47:59 GMT",
"RequestURL": "https://api.mangopay.com/V2.01/clientId/users/natural",
"Resource": {
"Address": {
"AddressLine1": "Rue des plantes",
"AddressLine2": "The Oasis",
"City": "Paris",
"Region": "Ile de France",
"PostalCode": "75001",
"Country": "FR"
},
"FirstName": "Jane",
"LastName": "Doe",
"Birthday": null,
"Nationality": null,
"CountryOfResidence": null,
"Occupation": null,
"IncomeRange": null,
"ProofOfIdentity": null,
"ProofOfAddress": null,
"Capacity": "NORMAL",
"Id": "146476890",
"Tag": "test doc july 2022",
"CreationDate": 1658220479,
"PersonType": "NATURAL",
"Email": "[email protected]",
"KYCLevel": "LIGHT",
"TermsAndConditionsAccepted": true,
"TermsAndConditionsAcceptedDate": 1658220479,
"UserCategory": "PAYER"
}
}
const mangopayInstance = require("mangopay2-nodejs-sdk");
const mangopay = new mangopayInstance({
clientId: "client-id",
clientApiKey: "api-key",
});
let idempotencyKey = "045896dd-2547-4f91-a352-5303bb2c258c";
const viewApiResponse = async (idempotencyKey) => {
return await mangopay.Idempotency.get(idempotencyKey)
.then((response) => {
console.info(response);
return response;
})
.catch((err) => {
console.log(err);
return false;
});
};
viewApiResponse(idempotencyKey);
Was this page helpful?