GET
/
v2.01
/
{ClientId}
/
mandates
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"
    }
]  

Query parameters

BeforeDate
timestamp

The date before which the object was created (based on the object’s CreationDate parameter). You can filter on a specific time range by using both the AfterDate and BeforeDate query parameters.

AfterDate
timestamp

The date after which the object was created (based on the object’s CreationDate parameter). You can filter on a specific time range by using both the AfterDate and BeforeDate query parameters.

Path parameters

MandateId
string
required

The unique identifier of the mandate.

Responses

[
    {
        "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()