create_consumer
POST  -- New consumer creation
| Argument | Description | Type - Length | Example | Mandatory |
|---|---|---|---|---|
| consumer_type | Consumer type | String - 1 | 0 : Physical person 1 : Company 2 : Non-profit organization | YES |
| consumer_reference | Consumer reference | String - 64 | NO | |
| consumer_store | Safedebit store reference | String - 32 | NO | |
| consumer_gender | Gender | Char - 1 | M : Male F : Female | NO |
| consumer_last_name | Consumer last name | String - 70 | YES | |
| consumer_first_name | Consumer first name | String - 70 | YES | |
| consumer_other_last_name | Other names | String - 70 | NO | |
| identity_type | Identification type | Char - 1 | 1 : ID Card 2 : driving licence 3 : passport 4 : residence card 5 : work permit | YES * |
| id_number | ID number | String - 18 | YES * | |
| emission_date | Identification issuance date | String - 10 | DD/MM/YYYY | YES * |
| expire_date | Identification expiration date | String - 10 | DD/MM/YYYY | YES * |
| consumer_birth_date | Date of birth | String - 10 | DD/MM/YYYY | NO |
| consumer_birth_city | City/place of birth | String - 35 | NO | |
| nationality | Nationality | String - 2 | FR,ES,IT... | NO |
| consumer_address_street_number | Consumer address: number | String - 16 | YES | |
| consumer_address_street_type | Consumer address: road type | String - 16 | YES | |
| consumer_address_street_name | Consumer address: road name | String - 70 | YES | |
| consumer_address_complement | Consumer address: additional information | String - 70 | NO | |
| consumer_zip_code | Zip code | String - 16 | YES | |
| consumer_city | Town/place | String - 35 | YES | |
| consumer_country | Country | String - 35 | NO | |
| consumer_email | Consumer e-mail | String - 70 | YES | |
| consumer_phone_number | Consumer phone | String - 16 | YES | |
| consumer_ip | Consumer's IP address | String - 16 | NO | |
| iban | Consumer's IBAN bank account | String - 34 | YES | |
| beneficiary_reference | Unique reference of beneficiary | String - 32 | YES * |
Company (consumer_type = 1)
| Argument | Description | Type - Length | Mandatory |
|---|---|---|---|
| social_reference | Corporate name | String - 32 | YES |
| siren | Company's SIREN | String - 9 | YES |
| nic | Company's NIC | String - 5 | NO |
| naf | Company's NAF | String - 32 | NO |
| tva_interco | International VAT number | String - 32 | NO |
Non-profit organisation (consumer_type = 2)
| Argument | Description | Type - Length | Mandatory |
|---|---|---|---|
| social_reference | Corporate name | String - 32 | NO |
| siren | Company's SIREN | String - 9 | YES |
| nic | Company's NIC | String - 5 | NO |
| naf | Company's NAF | String - 32 | NO |
| tva_interco | International VAT number | String - 32 | NO |
| waldec | Unique national number of NPO | String - 10 | YES |
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"}
Response
HTTP/1.1 200 OK
Content-Type: application/json
{
"result" : true,
"safedebit_consumer_reference":"123456789"
}
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). |
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