initiate_consumer


POST  -- Generation of new consumer form. Does not replace replace create_consumer for consumer complete creation

Argument Description Type - Length Example Mandatory
consumer_typeConsumer typeString - 10 : Physical person
1 : Company
2 : Non-profit organization
NO
consumer_referenceConsumer referenceString - 64NO
consumer_storeSafedebit store reference String - 32373222055
NO *
beneficiary_referenceUnique reference of beneficiaryString - 32field.beneficiary_reference.example is missing
NO
consumer_first_nameConsumer first nameString - 70NO
consumer_last_nameConsumer last nameString - 70NO
consumer_address_street_numberConsumer address: numberString - 16NO
consumer_address_street_typeConsumer address: road typeString - 16NO
consumer_address_street_nameConsumer address: road nameString - 70NO
consumer_zip_codeZip codeString - 16NO
consumer_cityTown/placeString - 35NO
consumer_countryCountryString - 35NO
consumer_emailConsumer e-mailString - 70NO
consumer_phone_numberConsumer phoneString - 16NO
sms_optionSMS format sending optionsString - 1NO
email_optione-mail format sending optionsString - 1NO
url_okConfirmation URL (manual)String - 256https://
NO
url_koError URL (manual)String - 256https://
NO
url_cancelCancellation URL (manual)String - 256https://
NO
url_callbackAutomated notification URLString - 256https://
NO
consumer_dataConsumer dataString - 145YES
consumer_genderGenderChar- 1M : Male
F : Female
NO
consumer_other_last_nameOther namesString - 70NO
identity_typeIdentification typeChar - 11 : ID Card
2 : driving licence
3 : passport
4 : residence card
5 : work permit
6 : Other
7 : Residence permit
NO
id_numberID numberString - 18NO
emission_dateIdentification issuance dateString - 10DD/MM/YYYY
NO
expire_dateIdentification expiration dateString - 10DD/MM/YYYY
NO
consumer_birth_dayBirth dateString - 10DD/MM/YYYY
NO
consumer_birth_cityCity/place of birthString - 35NO
nationalityNationalityString - 3FR,ES,IT...
NO
consumer_address_complementConsumer address: additional informationString - 70NO
consumer_ipConsumer's IP addressString - 16NO
ibanConsumer's IBAN bank account String - 34NO
sequence_typeMandate sending sequenceString - 4Possible values : "OOFF" "RCUR"
NO

Company (consumer_type = 1)


Argument Description Type - Length Mandatory
social_referenceCorporate nameString - 32NO
sirenCompany's SIRENString - 9YES
nicCompany's NICString - 5NO
nafCompany's NAFString - 32NO
tva_intercoInternational VAT numberString - 32NO

Non-profit organisation (consumer_type = 2)


Argument Description Type - Length Mandatory
social_referenceCorporate nameString - 32NO
sirenCompany's SIRENString - 9NO
nicCompany's NICString - 5NO
nafCompany's NAFString - 32NO
tva_intercoInternational VAT numberString - 32NO
waldecUnique national number of NPOString - 16NO

Manual and automatic return parameters


Argument Description Type - Length Example
safedebit_consumer_referenceSafedebit consumer referenceString - 35
umrUnique mandate referenceString - 35
statusMandate statutString - 10"OK" ,"CANCEL", "ERROR"



Request

POST /xxxx/initiate_consumer HTTP/1.1
Host: xxx.xxxxxxxx.fr
Authorization: Basic JQheySHkalSNuakkmSmm==
Content-Type: application/json
Accept: application/json


{
"consumer_reference": "XXXXX",
"consumer_store": "XXXXX",
"beneficiary_reference": "XXXXX",
"consumer_first_name": "Jean",
"consumer_last_name": "Dupont",
"consumer_birth_day": "21/01/2001",
"consumer_address_street_number": "98",
"consumer_address_street_type": "Route",
"consumer_address_street_name": "Avenue des pissenlits",
"consumer_zip_code": "75008",
"consumer_city": "Paris",
"consumer_country": "France",
"consumer_email": "xxx@xxx.com",
"consumer_phone_number": "0600000000",
"email_option": "1",
"sms_option": "1",
"url_ok": "https://xxxxx.xxx/ok",
"url_ko": "https://xxxxx.xxx/ko",
"url_cancel": "https://xxxxx.xxx/cancel",
"consumer_data": "7-006379-0023-0_066846419"}
                                                
If form was successfully generated

Response

HTTP/1.1 200 OK
Content-Type: application/json


{
    "result" : true,
    "link" : "https://xxxxxxxxxxxxx",
    "safedebit_consumer_reference" : "XXXXXXXXXXXX"
}
                                        

If form generation 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
link Link to customer creation form
safedebit_consumer_reference See (error codes in annex).
Thanks to fill-in all the mandatory fields

Request

HTTP/1.1 200 OK
POST /ssp/initiate_consumer HTTP/1.1
Host: xxx.safedebit.fr
Authorization: Basic JQheySHkalSNuakkmSmm==
Content-Type: application/json
Accept: application/json