Top up by direct debit

Resources

The recovery of direct debit top-up can be done through:

- /api/[domaine_partenaire]/users/AppUserId/payins/directdebits
OR
- /api/[domaine_partenaire]/users/AppUserId/mandates/mandateid/directdebits

1.DirectDebits

Contains the information about a direct debit top-up

Property Type Example Description
Id Long 123 Top-up ID
OrderId String xh02 Payment identifier in the third-party application
CreationDate DateTime 2014-01-10T15:49:58. 791121+02:00 Top-up creation date
PaymentDate DateTime 2014-01-13T00:00:00. 000000+02:00 Expected date of a top-up (between 3 and 6 business days from the creation date)
Amount Long 2350 Top-up amount (in cents)
Fee Long Fee amount (the property "amount" does not include the fee amount)
Status Int 1 Top-up status
0 = Waiting
1 = Completed
2 = Refunded
3 = Failed
4 = Waiting for validation
5 = Cancelled
Beneficiary SubAccountRef Item containg the details of the recipient sub-account. If not precised, it is the main account of the connected user which is used
IsMine Bool True Vrai si le titulaire du compte est également le titulaire du compte bancaire (il s’agit d’un chargement du compte et non pas d’un paiement)
Message String Payment message (limité à 140 caractères)
Mandate MandateRef Mandate reference used for direct debit
Schedules PaymentSchedule Table of installments (more installments for direct debit)
Motif String echeance-avril Motif du prélèvement

2.SubaccountRef

This item allows to identify the accounts between which the operations are made.

Property Type Example Description
Id Long 98 Account identifier
AppAccountId String "123" Account identifier provided by the third-party application
DisplayName String "Jean Dupont" Display account name
Href Uri "/api/[domainePartenaire] /accounts/123" Uri for the account details

3.BankAccountRef

This item allows to identify the user’s bank account.

Property Type Example Description
Id Long 98 Bank account identifier
Href Uri "/api/[domainePartenaire]
/bankaccounts/98"
Uri for details of the bank account

4.MandateRef

This item allows to identify a direct debit mandate

Property Type Example Description
Id Long 45 Mandate ID
Href Uri "/api/[domainePartenaire]
/mandates/45"
Uri for mandate details

Create a direct debit top-up

To create a direct debit top-up, please have a look at the example in the right margin.

The mandatory parameters are:
- orderid
- mandate
- amout
-  ismine

Précision : Prévoir un délai bancaire entre le débit du compte bancaire du payeur, et le crédit du compte utilisateur bénéficiaire

Send the data of the top-up made by a third-party server

The third-party server needs to provide the S-money server with an url server, so that the S-money server can communicate the direct debit top-up validation (within 3 to 6 business days).

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

The parameters of the HTTP request are:

Parameters Type Description
id string Transfer operation reference in the third-party application (orderid)
error Int Error code for failed payments, 0, if no errors.
type Int Operation type
7 = direct debit top-up
status Int Operation status
-1 = unknown
0 = en attente
1 = completed
2 = refunded
3 = refused
4 = waiting for validation
sequencenumber Int Direct debit sequence number (if multiple direct debit)
userid String User identifier in the third-party application
userstatus Int User status
0 = Not confirmed
1 = OK
2 = Frozen
3 = On the fly
4 = Being closed
5 = Closed

Retrieve the list of direct debit top-ups

To retrieve the list of direct debit top-ups, please have a look at the example in the right margin.

Pour récupérer la liste des chargements par prélèvement au niveau du domaine, l’URL sera : GET /api/[domaine_partenaire]/payins/directdebits

Pour récupérer la liste des chargements par prélèvement d’un utilisateur, l’URL sera : GET /api/[domaine_partenaire]/users/appuserid/payins/directdebits

Retrieve a direct debit top-up

To retrieve a direct debit top-up, please have a look at the example in the right margin.

Pour récupérer un chargement par prélèvement au niveau du domaine, l’URL sera : GET /api/[domaine_partenaire]/payins/directdebits

Pour récupérer le chargement par prélèvement d’un utilisateur, l’URL sera : GET /api/[domaine_partenaire]/users/appuserid/payins/directdebits

Error cases:

HTTP code Error code Explication
404 356 Operation cannot be found

Cancel a direct debit

To cancel a direct debit, please have a look at the example in the right margin.

Error cases

HTTP codeError codeExplication
404 356 Operation cannot be found

Modify a direct debit

To modify a direct debit, please have a look at the example in the right margin.

Error cases

HTTP codeError codeExplication
404 356 Operation cannot be found