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_type | Consumer type | String - 1 | 0 : Physical person 1 : Company 2 : Non-profit organization | NO |
| consumer_reference | Consumer reference | String - 64 | NO | |
| consumer_store | Safedebit store reference | String - 32 | 373222055 | NO * |
| beneficiary_reference | Unique reference of beneficiary | String - 32 | field.beneficiary_reference.example is missing | NO |
| consumer_first_name | Consumer first name | String - 70 | NO | |
| consumer_last_name | Consumer last name | String - 70 | NO | |
| consumer_address_street_number | Consumer address: number | String - 16 | NO | |
| consumer_address_street_type | Consumer address: road type | String - 16 | NO | |
| consumer_address_street_name | Consumer address: road name | String - 70 | NO | |
| consumer_zip_code | Zip code | String - 16 | NO | |
| consumer_city | Town/place | String - 35 | NO | |
| consumer_country | Country | String - 35 | NO | |
| consumer_email | Consumer e-mail | String - 70 | NO | |
| consumer_phone_number | Consumer phone | String - 16 | NO | |
| sms_option | SMS format sending options | String - 1 | NO | |
| email_option | e-mail format sending options | String - 1 | NO | |
| url_ok | Confirmation URL (manual) | String - 256 | https:// | NO |
| url_ko | Error URL (manual) | String - 256 | https:// | NO |
| url_cancel | Cancellation URL (manual) | String - 256 | https:// | NO |
| url_callback | Automated notification URL | String - 256 | https:// | NO |
| consumer_data | Consumer data | String - 145 | YES | |
| consumer_gender | Gender | Char- 1 | M : Male F : Female | NO |
| 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 6 : Other 7 : Residence permit | NO |
| id_number | ID number | String - 18 | NO | |
| emission_date | Identification issuance date | String - 10 | DD/MM/YYYY | NO |
| expire_date | Identification expiration date | String - 10 | DD/MM/YYYY | NO |
| consumer_birth_day | Birth date | String - 10 | DD/MM/YYYY | NO |
| consumer_birth_city | City/place of birth | String - 35 | NO | |
| nationality | Nationality | String - 3 | FR,ES,IT... | NO |
| consumer_address_complement | Consumer address: additional information | String - 70 | NO | |
| consumer_ip | Consumer's IP address | String - 16 | NO | |
| iban | Consumer's IBAN bank account | String - 34 | NO | |
| sequence_type | Mandate sending sequence | String - 4 | Possible values : "OOFF" "RCUR" | NO |
Company (consumer_type = 1)
| 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 |
Non-profit organisation (consumer_type = 2)
| Argument | Description | Type - Length | Mandatory |
|---|---|---|---|
| social_reference | Corporate name | String - 32 | NO |
| siren | Company's SIREN | String - 9 | NO |
| 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 - 16 | NO |
Manual and automatic return parameters
| Argument | Description | Type - Length | Example |
|---|---|---|---|
| safedebit_consumer_reference | Safedebit consumer reference | String - 35 | |
| umr | Unique mandate reference | String - 35 | |
| status | Mandate statut | String - 10 | "OK" ,"CANCEL", "ERROR" |
- umr : characters allowed : A-Z letters (uppercase recommended), numbers 0-9, / - ? : ( ) . , ' + (avoid if possible)
- sequence_type : OOFF = single-use mandate / RCUR = recurring levy
- status : initial status defined for the mandate after signing (See status list : here )
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"}
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). |
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