payment
POST  - Create a levy
| Argument | Description | Type - Length | Example | Mandatory |
|---|---|---|---|---|
| amount | Guaranteed amount in cents | String - 18 | YES | |
| due_date | Direct debit due date | String - 10 | DD/MM/YYYY | YES |
| sdd_reference | SDD reference | String - 35 | YES | |
| motif ** | Reason of levy | String - 128 | NO | |
| umr | Unique mandate reference | String - 35 | NO | |
| safedebit_consumer_reference | Safedebit consumer reference | String - 35 | YES | |
| beneficiary_reference *** | Unique reference of beneficiary | String - 32 | NO | |
| url_callback | Callback URL | String - 128 | NO | |
SNCF
| Argument | Description | Type - Length | Example | Mandatory |
|---|---|---|---|---|
| url_callback_status | field.url_callback_status.label is missing | String - 128 | NO | |
| account_data | field.account_data.label is missing | JSON Object | {"ref_lettrage":"xxxxxxxxxxx","pdv_emetteur_ventes":"87111222","postes_de_ventes":"001","type_operation":"1","date":"20210401","montant":"200.00","signe":"E/D"} | NO |
*** MB reserved field.
Request
POST /xxxx/payment HTTP/1.1
Host: xxx.xxxxxxxx.fr
Authorization: Basic JQheySHkalSNuakkmSmm==
Content-Type: application/json
Accept: application/json
{
"safedebit_consumer_reference": "XXXXXX",
"amount": "1000",
"due_date": "01/01/2018",
"sdd_reference": "REF_xxxx",
"motif": "Prélèvement facture 1",
"umr": "UMR_XXXXX",
"url_callback": "https://mondomaine.fr/lien"}
If levy successfully created (levy is validated)
Response
HTTP/1.1 200 OK
Content-Type: application/json
{
"result" : true,
"status" : "CREATED",
"sdd_reference": "REF-xxxx",
"due_date" : "DD/MM/YYYY",
"payment_reference" : "XXXXXXX"
}
If levy successfully created (waiting for validation)
Response
HTTP/1.1 200 OK
Content-Type: application/json
{
"result" : true,
"validation_type":"OTP",
"status" : "PENDING",
"sdd_reference": "REF_xxxx",
"due_date" : "DD/MM/YYYY"
}
If levy creation failed
Response
HTTP/1.1 200 OK
Content-Type: application/json
{
"result" : false,
"code" : "XXXX"
}
| Argument | Description |
|---|---|
| result | true or false : true : action succeeded false : action failed |
| sdd_reference | sdd reference |
| due_date | Direct debit due date (DD/MM/YYYY) |
| validation_type | Type of validation : OTP (sms) PIN (PIN code) FCID (FaceId) TCID(TouchId) |
| code | See (error codes in annex). |
Request
HTTP/1.1 200 OK
POST /ssp/payment HTTP/1.1
Host: xxx.safedebit.fr
Authorization: Basic JQheySHkalSNuakkmSmm==
Content-Type: application/json
Accept: application/json