Import an Existing Mandate
It’s possible you’ve already collected the bank account information of your customers through paper mandates or by using another payment service provider in the past. In either case, you can import these mandates into our system and use them for collecting payments.
Mandate importing is only available for user acceptance testing and live accounts and must be activated by SlimPay.
Please note
This guide does not cover the basics of API authentication or the format of requests and responses. Please review these sections if you are unfamiliar with these concepts.
All of the code examples in our guides are written in PHP and are based on our HAPI Client, developed by SlimPay to reduce the code complexity of interfacing with our API. Please refer to our HTTP client page for more details on using these libraries.
To get started, you will need:
- your creditor reference
- the reference of your subscriber
- the customer's first name, last name, billing address and IBAN
The table below lists all of the parameters that you need to import an existing mandate. Be sure to include all the properties that are mandatory, as well as any optional ones you wish.
All of the data you provide must conform to the constraints outlined in our comprehensive API reference.
Parameter | Mandatory | Format | Max length |
---|---|---|---|
creditor » reference | Alphanumeric | 35 | |
subscriber » reference | Alphanumeric | 35 | |
reference The unique mandate reference. |
Alphanumeric | 35 | |
paymentScheme
|
Alphanumeric | 35 | |
dateSigned The exact date and time at which the mandate was signed. |
A date, formatted to ISO 8601 standard E.g. 2016-11-03T00:00:00.000+0100 | 28 | |
signatory » honorificPrefixMr , Miss or Mrs |
Alphabetic | 4 | |
signatory » givenName Are forbidden:
|
Alphabetic | 32 | |
signatory » familyName Are forbidden: see list above. |
Alphabetic | 70 | |
signatory » companyName The company legal name. |
Alphanumeric | 70 | |
signatory » organizationName The unique identifier of the company. |
Alphanumeric | 24 | |
signatory » email | Alphanumeric | 70 | |
signatory » telephone | E.164 standard E.g. +33612345678 | 16 | |
signatory » billingAddress » street1 | Alphanumeric | 70 | |
signatory » billingAddress » street2 | Alphanumeric | 70 | |
signatory » billingAddress » city | Alphanumeric | 35 | |
signatory » billingAddress » postalCode | Alphanumeric | 15 | |
signatory » billingAddress » country | ISO 3166-2 E.g. FR for France | 2 | |
signatory » bankAccount » iban | Alphanumeric | 34 |
Now let's create the mandate using the create-mandates relation:
$rel = new Hal\CustomRel('https://api.slimpay.net/alps#create-mandates');
$follow = new Http\Follow($rel, 'POST', null, new Http\JsonBody(
[
'creditor' => [
'reference' => 'yourCreditorReference'
],
'subscriber' => [
'reference' => 'theSubscriberReference'
],
'reference' => 'theMandateReference',
'paymentScheme' => 'SEPA.DIRECT_DEBIT.CORE',
'dateSigned' => '2016-08-24T17:27:48.000+0100',
'signatory' => [
'honorificPrefix' => 'Mr',
'givenName' => 'John',
'familyName' => 'Doe',
'email' => 'change.me@slimpay.com',
'telephone' => '+33612345678',
'companyName' => null,
'organizationName' => null,
'billingAddress' => [
'street1' => '27 rue des fleurs',
'street2' => 'Bat 2',
'city' => 'Paris',
'postalCode' => '75008',
'country' => 'FR'
],
'bankAccount' => [
'iban' => 'theIban'
]
]
]
));
$mandate = $hapiClient->sendFollow($follow);
$mandateReference = $mandate->getState()['reference'];
And it’s as easy as that! Be sure to store the mandate reference for future operations.