Mandates management

Resources

Retrieving madates associated with a user is made via:

/api/[domaine_partenaire]/mandates to access debit mandates associated with the connected user

/api/[domaine_partenaire]/users/appuserid/mandates to access debit mandates associated with the user "appuserid".

There are two ways to create a bank debit mandate:
- Mandate by electronic signature, validated by electronic signature
- Mandate on paper, validated by S-money Back Office.

1.Mandates
Contains details of a bank debit mandate

Parameter TypeExampleDescription
Id Long 123 Mandate ID
Date DateTime 2013-09-10T15:49:58.
791121+02:00
Mandate date of creation
BankAccount BankAccountRef Reference to the bank account
Status Int 0 Mandate status
0 = Pending
1 = Validated
2 = Dismissed
3 = Failure
UrlReturn String http://s-money.fr/returnurl URL to which the user is redirected after the signature
MandateDemands MandateDemands Request details
Href Uri URL to call in order to electronically sign the mandate
ErrorCode Int 0 Error code for failed requests,
0 = No error
1 = Session failed
2 = Session interrupted
3 = Session cancelled
UMR 30007-Sandbox-66673-14032016-0 Mandate Single Reference

2. MandateDemands
Contains details of a bank debit mandate

Parameter TypeExampleDescription
Id Long 123 Request ID
RequestDate DateTime 2013-09-10T15:49:58. 791121+02:00 Date of the creation of the request
VoucherCopies List<Attachement> List of supporting documents
Status Int Request status
0 = Incomplete
1 = Waiting
2 = Refused
3 = Accepted
Reason String Reason of refusal :
- The mandate bank account do not match the registered bank account
- The mandate is unreadable
- The mandate is not signed
- Other ( xxxxxxxx )

3. Attachement
This object identifies the user bank account

Parameter TypeExampleDescription
Id Long 98 Document ID
Name String Receipt File name
ContentType String "image/png" Image type
Size Long 523010 Size of the attached file (in octet)
Href Url Link to the attached file

4. BankAccountRef
This object identifies the user bank account

Parameter TypeExampleDescription
Id Long 98 Bank account ID
Href Uri "/api/[domaine_partenaire]/bankaccounts/98" Url to the bank account details

Sign an electronic mandate

1. Send the details of the mandate request to the S-money server

To sign a mandate, please have a look ath the example in the right margin.

The urlcallback is an optional parameter.

2. Send the details of the electronic mandate created by the third-party server

The third-party server should provide the S-money server with an url, which allows the S-money server to communicate the results of the mandate validation.

The HTTP POST method is used to invoke the S-money server.

HTTP request parametres are :

Parameter Type Description
id Long Mandate ID
error Int Error code for failed requests
0 = No error.
1 = Session failed
2 = Session interrupted
3 = Session cancelled
type Int Operation type
9 = mandate creation
status Int Mandate status
1 = Validated
2 =Dismissed
3 = Failure

3. Redirection at the end of an electronic mandate signature

The third-party server should provide the S-money server with an url allowing the S-money server to redirect the client to the third-party environment.

The url can be either associated to a web scheme (http/https) or a private scheme where the request will be made from the third-party mobile application.

These are the HTTP request parametres:

Parameter Type Description
id Long Mandate ID
type Int Operation type
9 = mandate creation
status Int Mandate status
1 = Validated
3 = Failure

Send a paper mandate to S-money

To send a paper mandate, please have a look at the example in the right margin.

If a mandate is refused for X reason, it is possible to make a new request uploading a new document on the same id of the mandate (id of a refused mandate).

If a mandate is refused for X reason, the reason is sent via « reason » parameter and the status of the mandate is 0 (waiting).

1. Sending the details of a mandate created by the third-party server
The third-party sever should provide the S-money server with an url allowing the S-money server to communicate the result of the mandate validation (within 2 business days after the receipt of the request).

The HTTP POST method is used to invoke the S-money server.
The HTTP request parameters are:

Parameter Type Description
id Long Mandate ID
type Int Operation type
9 = mandate
mandatedemandstatus Int Request status
0 = Incompleted
1 = Waiting
2 = Refused
3 = Accepted
status Int Mandate status
0 = waiting
1 = validated
2 = revoked
userid string User identifier in the third-party application
reason String Reason of refusal:
 The bank account of the mandate does not match
the registered bank account
Mandate not readable
The mandate is not signed
 Other (xxxxxxxx)

Retrieve the list of mandates

To retrieve the list of mandates, please have a look at the example in the right margin.

Retrieve a mandate

To retrieve a mandate, please have a look at the example in the right margin.

Revoke a mandate

To revoke a mandate, please refer to the example in the right margin of this page.