create_consumer


POST  -- New consumer creation

Argument Description Type - Length Example Mandatory
consumer_typeConsumer typeString - 10 : Physical person
1 : Company
2 : Non-profit organization
YES
consumer_referenceConsumer referenceString - 64NO
consumer_storeSafedebit store reference String - 32NO
consumer_genderGenderChar - 1M : Male
F : Female
NO
consumer_last_nameConsumer last nameString - 70YES
consumer_first_nameConsumer first nameString - 70YES
consumer_other_last_nameOther namesString - 70NO
identity_typeIdentification typeChar - 11 : ID Card
2 : driving licence
3 : passport
4 : residence card
5 : work permit
YES *
id_numberID numberString - 18YES *
emission_dateIdentification issuance dateString - 10DD/MM/YYYY
YES *
expire_dateIdentification expiration dateString - 10DD/MM/YYYY
YES *
consumer_birth_dateDate of birthString - 10DD/MM/YYYY
NO
consumer_birth_cityCity/place of birthString - 35NO
nationalityNationalityString - 2FR,ES,IT...
NO
consumer_address_street_numberConsumer address: numberString - 16YES
consumer_address_street_typeConsumer address: road typeString - 16YES
consumer_address_street_nameConsumer address: road nameString - 70YES
consumer_address_complementConsumer address: additional informationString - 70NO
consumer_zip_codeZip codeString - 16YES
consumer_cityTown/placeString - 35YES
consumer_countryCountryString - 35NO
consumer_emailConsumer e-mailString - 70YES
consumer_phone_numberConsumer phoneString - 16YES
consumer_ipConsumer's IP addressString - 16NO
ibanConsumer's IBAN bank account String - 34YES
beneficiary_referenceUnique reference of beneficiaryString - 32YES *

Company (consumer_type = 1)


Argument Description Type - Length Mandatory
social_referenceCorporate nameString - 32YES
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 - 9YES
nicCompany's NICString - 5NO
nafCompany's NAFString - 32NO
tva_intercoInternational VAT numberString - 32NO
waldecUnique national number of NPOString - 10YES


Request

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


{
"consumer_type": "0",
"consumer_reference": "12345",
"consumer_gender": "M",
"consumer_last_name": "Prenom",
"consumer_first_name": "Nom",
"consumer_birth_date": "01/01/1990",
"consumer_birth_city": "Ville",
"nationality": "FR",
"consumer_address_street_number": "1",
"consumer_address_street_type": "Rue",
"consumer_address_street_name": "du test",
"consumer_address_complement": "",
"consumer_zip_code": "00000",
"consumer_city": "Ville",
"consumer_country": "FR",
"consumer_email": "test@test.com",
"consumer_phone_number": "0000000000",
"identity_type": "1",
"id_number": "92017410",
"emission_date": "01/01/2010",
"expire_date": "01/01/2020",
"iban": "FR76XXXXXXXXXXXXXXXXXXXXXXX"}
                                                
Consumer has been successfully created

Response

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


{
    "result" : true,
    "safedebit_consumer_reference":"123456789"
}
                                                

Consumer creation has failed

Response

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


{
    "result" : false,
    "code" : "XXXX"
}
                                                

Argument Description
result true or false :
true : action succeeded
false : action failed
safedebit_consumer_reference Safedebit consumer reference
code See (error codes in annex).
Thanks to fill-in all the mandatory fields

Request

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