const mangopayInstance = require('mangopay2-nodejs-sdk')
const mangopay = new mangopayInstance({
clientId: 'your-client-id',
clientApiKey: 'your-api-key',
})
const listMandates = async () => {
return await mangopay.Mandates.getAll()
.then((response) => {
console.info(response)
return response
})
.catch((err) => {
console.log(err)
return false
})
}
listMandates()
[
{
"Id": "mdt_m_01J98YZT8AJBGWX47AA077XMKZ",
"CreationDate": 1663244376,
"Status": "FAILED",
"UserId": "user_m_01J8SY95DQ5CM7DH43NQCAS65T",
"ExecutionType": "WEB",
"MandateType": "DIRECT_DEBIT",
"Tag": "Created using the Mangopay API Postman collection",
"ResultCode": "001807",
"ResultMessage": "User has let the mandate session expire without confirming"
},
{
"Id": "mdt_m_01J999B9HSEDH9CZDEXXYZGHEZ",
"CreationDate": 1669040333,
"Status": "ACTIVE",
"UserId": "user_m_01J8SY95DQ5CM7DH43NQCAS65T",
"ExecutionType": "WEB",
"MandateType": "DIRECT_DEBIT",
"Tag": "Created using the Mangopay API Postman collection",
"ResultCode": "000000",
"ResultMessage": "Success"
}
]
const mangopayInstance = require('mangopay2-nodejs-sdk')
const mangopay = new mangopayInstance({
clientId: 'your-client-id',
clientApiKey: 'your-api-key',
})
const listMandates = async () => {
return await mangopay.Mandates.getAll()
.then((response) => {
console.info(response)
return response
})
.catch((err) => {
console.log(err)
return false
})
}
listMandates()
[
{
"Id": "mdt_m_01J98YZT8AJBGWX47AA077XMKZ",
"CreationDate": 1663244376,
"Status": "FAILED",
"UserId": "user_m_01J8SY95DQ5CM7DH43NQCAS65T",
"ExecutionType": "WEB",
"MandateType": "DIRECT_DEBIT",
"Tag": "Created using the Mangopay API Postman collection",
"ResultCode": "001807",
"ResultMessage": "User has let the mandate session expire without confirming"
},
{
"Id": "mdt_m_01J999B9HSEDH9CZDEXXYZGHEZ",
"CreationDate": 1669040333,
"Status": "ACTIVE",
"UserId": "user_m_01J8SY95DQ5CM7DH43NQCAS65T",
"ExecutionType": "WEB",
"MandateType": "DIRECT_DEBIT",
"Tag": "Created using the Mangopay API Postman collection",
"ResultCode": "000000",
"ResultMessage": "Success"
}
]
CreationDate
parameter). You can filter on a specific time range by using both the AfterDate
and BeforeDate
query parameters.CreationDate
parameter). You can filter on a specific time range by using both the AfterDate
and BeforeDate
query parameters.200
Show properties
Show properties
CREATED
, SUBMITTED
, ACTIVE
, FAILED
, EXPIRED
The status of the mandate:CREATED
– The mandate has been generated but not yet confirmed.SUBMITTED
– The mandate has been confirmed and sent to the user’s bank, and can be used to request a direct debit pay-in.ACTIVE
– The mandate has been accepted by the user’s bank or successfully used to process a direct debit direct pay-in. Further pay-ins can be requested.FAILED
– The mandate has been canceled or otherwise failed, and can no longer be used for payments.EXPIRED
– No payment has been made against the mandate in the last 24 months. It can no longer be used for payments.WEB
The execution type of the mandate.[
{
"Id": "mdt_m_01J98YZT8AJBGWX47AA077XMKZ",
"CreationDate": 1663244376,
"Status": "FAILED",
"UserId": "user_m_01J8SY95DQ5CM7DH43NQCAS65T",
"ExecutionType": "WEB",
"MandateType": "DIRECT_DEBIT",
"Tag": "Created using the Mangopay API Postman collection",
"ResultCode": "001807",
"ResultMessage": "User has let the mandate session expire without confirming"
},
{
"Id": "mdt_m_01J999B9HSEDH9CZDEXXYZGHEZ",
"CreationDate": 1669040333,
"Status": "ACTIVE",
"UserId": "user_m_01J8SY95DQ5CM7DH43NQCAS65T",
"ExecutionType": "WEB",
"MandateType": "DIRECT_DEBIT",
"Tag": "Created using the Mangopay API Postman collection",
"ResultCode": "000000",
"ResultMessage": "Success"
}
]
const mangopayInstance = require('mangopay2-nodejs-sdk')
const mangopay = new mangopayInstance({
clientId: 'your-client-id',
clientApiKey: 'your-api-key',
})
const listMandates = async () => {
return await mangopay.Mandates.getAll()
.then((response) => {
console.info(response)
return response
})
.catch((err) => {
console.log(err)
return false
})
}
listMandates()
Was this page helpful?