Menu

Conformité (KYC)

1)Création de l'enrolement

  • Cette étape consiste à créer un enrolement.

    Exemple de code Curl :

        
        curl -v POST 'https://test-onboarding-api.centralpay.net/api/merchant-enrollment/' \
        -h 'Content-Type: application/x-www-form-urlencoded' \
        -u 'doctest:4I9HJRTd' \
        -d 'profileWorkflowDefinition=17d3e285-6bed-440b-9eb3-b1be71d54a5f' \
        -d 'workflowDefinition=6841b2a8-c9ee-4095-99bd-de0f7e3b12a3' \
        -d 'profile[firstname][value]=Carla' \
        -d 'profile[lastname][value]=Mauru' \
        -d 'profile[email][value]=carlamauru@gmail.com' \
        -d 'profile[phone][value]=+33712345678' \
        -d 'language=fr' \
        -d 'accountType=BASIC' \
        -d 'activitySector=6fbce0bd-7659-4d4e-bb66-d7aa1251c173' \
        -d 'feeSchedule=216e19cf-88a5-4708-acca-1f9edcde08b9' \
        -d 'walletId=5b2307be-66f1-4b53-a7b1-9fc5fe22ba76' \
        -d 'workflowMode=SEQUENTIAL'
        -d 'activityAge=6394b905-3851-45ef-97a7-42e0534a9127' \
        -d 'type=INDIVIDUAL' \
        -d 'turnover=aed57921-81d8-4f22-8b13-b2f150503800'
        
        

Réponse :

  • 
    {
        "workflow": {
            "uuid": "32c5ba0f-c81c-490a-96e1-2579f67a2a2e",
            "status": "ON_GOING",
            "activities": [
                {
                    "step_elements": [],
                    "uuid": "d2d16e0d-419d-4b5c-8e03-9f5dc75ac04c",
                    "name": "ContractValiA",
                    "state": "TODO",
                    "category": "validation",
                    "created_at": "2023-02-01T12:09:12"
                }
            ],
            "additional_documents": []
        },
        "identity_badge": null,
        "representatives_list": null,
        "infogreffe_identity": null,
        "language": "fr",
        "risk_score": {
            "activity": 2,
            "activity_age": null,
            "turnover": 1,
            "bank_account": 0,
            "total": null
        },
        "uuid": "7566b13e-def7-4bb0-8ee4-e4c861f33787",
        "risk_points": null,
        "created_at": "2023-02-01T12:09:12",
        "last_updated_at": null,
        "turnover_is_fixed": false,
        "workflow_mode": "SEQUENTIAL",
        "risk_level": "LOW",
        "type": "INDIVIDUAL",
        "is_canceled": false,
        "enrollment_account": null,
        "profile": {
            "uuid": "7797c5bb-d4ab-4c8c-9a93-1a201875be9b",
            "workflow": {
                "uuid": "57a92a2b-0af2-4acd-8836-09f6131ff771",
                "status": "ON_GOING",
                "activities": [
                    {
                        "step_elements": [
                            {
                                "status": "COMPLETED",
                                "uuid": "966a5cdd-d28c-4742-ba8d-b55f3d91ac90",
                                "value": "Carla",
                                "element-type": "firstname"
                            },
                            {
                                "status": "COMPLETED",
                                "uuid": "c648d594-63cf-4302-97f9-378386a99d92",
                                "value": "Mauru",
                                "element-type": "lastname"
                            },
                            {
                                "status": "COMPLETED",
                                "uuid": "efc69af4-25fc-4ac1-9ae1-1980a190541b",
                                "value": "carlamauru@gmail.com",
                                "element-type": "email"
                            },
                            {
                                "status": "COMPLETED",
                                "uuid": "5517896b-1e37-4f8d-9d56-68ce96f2bf89",
                                "value": "+33712345678",
                                "element-type": "phone"
                            }
                        ],
                        "uuid": "c001263d-5b25-4152-89d9-301441a435b3",
                        "name": "identityInfos",
                        "state": "TODO",
                        "category": "identity",
                        "created_at": "2023-02-01T12:09:12"
                    }
                ],
                "additional_documents": []
            },
            "firstname": {
                "status": "COMPLETED",
                "uuid": "966a5cdd-d28c-4742-ba8d-b55f3d91ac90",
                "value": "Carla",
                "element-type": "firstname"
            },
            "lastname": {
                "status": "COMPLETED",
                "uuid": "c648d594-63cf-4302-97f9-378386a99d92",
                "value": "Mauru",
                "element-type": "lastname"
            },
            "email": {
                "status": "COMPLETED",
                "uuid": "efc69af4-25fc-4ac1-9ae1-1980a190541b",
                "value": "carlamauru@gmail.com",
                "element-type": "email"
            },
            "language": {
                "status": "ON_GOING",
                "uuid": "4c97a5d3-7eb4-4784-9670-ae052aee02f8",
                "locale": {
                    "identifier": "fr"
                },
                "element-type": "language"
            },
            "phone": {
                "status": "COMPLETED",
                "uuid": "5517896b-1e37-4f8d-9d56-68ce96f2bf89",
                "value": "+33712345678",
                "element-type": "phone"
            },
            "birthday": null,
            "login": null,
            "bo_user_uuid": null
        },
        "activity_sector": {
            "name": "Evenements & billeterie"
        },
        "data": {
            "type": "PARTICULAR",
            "company_name": null,
            "turnover": {
                "name": "Moins de 20k EUR"
            },
            "activity_age": null
        },
        "custom_reference": null,
        "is_converted": false,
        "conformity_status": "ON_GOING",
        "conformity_status_level_two": null,
        "comments_level_two": null,
        "validator_level_one": null,
        "validator_level_two": null,
        "merchant_uuid": null,
        "validation_date": null,
        "validation_date_level_two": null,
        "sub_type": null,
        "api_infogreffe_attempt": 0,
        "next_step": 0
    }
    

    Cette réponse est renvoyée quand l'enrolement a bien été créé.

2)Compléter le profil

  • Dans la réponse de l'etape "Création de l'enrolement" ci-dessus, vous pourrez remarquer que certaines activitées dont en "TODO", il faut commencer par completer celle du profil :
        
                        "uuid": "c001263d-5b25-4152-89d9-301441a435b3",
                        "name": "identityInfos",
                        "state": "TODO",
                        "category": "identity",
                        "created_at": "2023-02-01T12:09:12"
        
        

    La première étape est d'identifier les éléments demandés, nous allons donc faire un appel GET :

        
    curl -v GET 'https://test-onboarding-api.centralpay.net/api/nauth/profile/c001263d-5b25-4152-89d9-301441a435b3/activity' \
    -h 'Content-Type: application/x-www-form-urlencoded' \
    -u 'doctest:4I9HJRTd' \
        
    

    Dans l'URL à la place de "c001263d-5b25-4152-89d9-301441a435b3" il faudra mettre l'uuid de l'activité souhaitée

Réponse :


{
    "type": "FORM",
    "form": {
        "children": {
            "firstname": {
                "extra_data_to_pass": {
                    "default": "Carla"
                },
                "children": {
                    "value": []
                }
            },
            "lastname": {
                "extra_data_to_pass": {
                    "default": "Mauru"
                },
                "children": {
                    "value": []
                }
            },
            "mail": {
                "extra_data_to_pass": {
                    "default": "carlamauru@gmail.com"
                },
                "children": {
                    "value": []
                }
            },
            "phone": {
                "extra_data_to_pass": {
                    "default": "+33712345678"
                },
                "children": {
                    "value": []
                }
            },
            "birthday": {
                "extra_data_to_pass": {
                    "default": null
                },
                "children": {
                    "value": []
                }
            },
            "identity_document": {
                "children": {
                    "type": [],
                    "documents": []
                }
            },
            "address": {
                "extra_data_to_pass": {
                    "default": {
                        "nameLine1": null,
                        "nameLine2": null,
                        "nameLine3": null,
                        "nameLine4": null,
                        "locality": null,
                        "postalCode": null,
                        "country": null
                    }
                },
                "children": {
                    "nameLine1": [],
                    "nameLine2": [],
                    "nameLine3": [],
                    "nameLine4": [],
                    "locality": [],
                    "postalCode": [],
                    "country": []
                }
            }
        }
    },
    "category": "identity"
}

Nous pouvons voir que les éléments suivant sont demandés :

  • firstname[value]
  • lastname[value]
  • mail[value]
  • phone[value]
  • birthday[value]
  • identity_document[type]
  • identity_document[documents][0]
  • address[nameLine1]
  • address[locality]
  • address[postalCode]
  • address[country]

Nous allons donc faire cette fois un appel POST sur la même URL afin de renseigner ceux-ci :

  • 
    curl -v POST 'https://test-onboarding-api.centralpay.net/api/nauth/profile/c001263d-5b25-4152-89d9-301441a435b3/activity' \
    -h 'Content-Type: application/x-www-form-urlencoded' \
    -u 'doctest:4I9HJRTd' \
    -d 'firstname[value]=Carla' \
    -d 'lastname[value]=Mauru' \
    -d 'mail[value]=carlamauru@gmail.com' \
    -d 'phone[value]=+33712345678' \
    -d 'birthday[value]=1997-09-22' \
    -d 'identity_document[type]=PASSPORT' \
    -d 'identity_document[documents][0]=@/home/ddegeai/Pictures/wallpaper.jpg' \
    -d 'address[nameLine1]=19 rue Edouard Vaillant' \
    -d 'address[locality]=Tours' \
    -d 'address[postalCode]=37000' \
    -d 'address[country]=FRA'
    
    

Réponse :

  • 
    {
        "type": "FORM",
        "form": {
            "children": {
                "firstname": {
                    "extra_data_to_pass": {
                        "default": "Carla"
                    },
                    "children": {
                        "value": []
                    }
                },
                "lastname": {
                    "extra_data_to_pass": {
                        "default": "Mauru"
                    },
                    "children": {
                        "value": []
                    }
                },
                "mail": {
                    "extra_data_to_pass": {
                        "default": "carlamauru@gmail.com"
                    },
                    "children": {
                        "value": []
                    }
                },
                "phone": {
                    "extra_data_to_pass": {
                        "default": "+33712345678"
                    },
                    "children": {
                        "value": []
                    }
                },
                "birthday": {
                    "extra_data_to_pass": {
                        "default": null
                    },
                    "children": {
                        "value": []
                    }
                },
                "identity_document": {
                    "children": {
                        "type": [],
                        "documents": {
                            "children": [
                                []
                            ]
                        }
                    }
                },
                "address": {
                    "extra_data_to_pass": {
                        "default": {
                            "nameLine1": null,
                            "nameLine2": null,
                            "nameLine3": null,
                            "nameLine4": null,
                            "locality": null,
                            "postalCode": null,
                            "country": null
                        }
                    },
                    "children": {
                        "nameLine1": [],
                        "nameLine2": [],
                        "nameLine3": [],
                        "nameLine4": [],
                        "locality": [],
                        "postalCode": [],
                        "country": []
                    }
                }
            }
        },
        "category": "identity"
    }
    

Les informations d'identités étant renseigné il faut maintenant regarder où en est l'enrolement :

  • 
    curl -v GET 'https://test-onboarding-api.centralpay.net/api/nauth/merchant-enrollment/7566b13e-def7-4bb0-8ee4-e4c861f33787' \
    -h 'Content-Type: application/x-www-form-urlencoded' \
    -u 'doctest:4I9HJRTd' \
    
    

    A la place de "7566b13e-def7-4bb0-8ee4-e4c861f33787" il faudra ici mettre l'uuid de l'enrolement donné lors de la création de celui-ci.

Réponse :

  • 
    {
        "workflow": {
            "uuid": "32c5ba0f-c81c-490a-96e1-2579f67a2a2e",
            "status": "ON_GOING",
            "activities": [
                {
                    "step_elements": [],
                    "uuid": "d2d16e0d-419d-4b5c-8e03-9f5dc75ac04c",
                    "name": "ContractValiA",
                    "state": "TODO",
                    "category": "validation",
                    "created_at": "2023-02-01T12:09:12"
                }
            ],
            "additional_documents": []
        },
        "identity_badge": null,
        "representatives_list": null,
        "infogreffe_identity": null,
        "language": "fr",
        "risk_score": {
            "activity": 2,
            "activity_age": null,
            "turnover": 1,
            "bank_account": 0,
            "total": null
        },
        "monthly_turnover": 0,
        "monthly_turnover_currency": "",
        "uuid": "7566b13e-def7-4bb0-8ee4-e4c861f33787",
        "risk_points": null,
        "created_at": "2023-02-01T12:09:12",
        "last_updated_at": "2023-02-01T12:17:20",
        "turnover_is_fixed": false,
        "workflow_mode": "SEQUENTIAL",
        "risk_level": "LOW",
        "actor_initiator": "6385f28c-0160-46ba-8088-b4317e329946",
        "type": "INDIVIDUAL",
        "is_canceled": false,
        "enrollment_account": null,
        "profile": {
            "uuid": "7797c5bb-d4ab-4c8c-9a93-1a201875be9b",
            "workflow": {
                "uuid": "57a92a2b-0af2-4acd-8836-09f6131ff771",
                "status": "ACCEPTED",
                "activities": [
                    {
                        "step_elements": [
                            {
                                "status": "COMPLETED",
                                "uuid": "82b3b3c1-9729-4f64-80e0-05810f0361ec",
                                "created_at": "2023-02-01T12:17:19",
                                "name_line1": "19 rue Edouard Vaillant",
                                "name_line2": null,
                                "name_line3": null,
                                "name_line4": null,
                                "locality": "Tours",
                                "postal_code": "37000",
                                "country": "FRA",
                                "element-type": "address"
                            },
                            {
                                "status": "COMPLETED",
                                "uuid": "9f83bb3a-9c8f-4fd2-b773-5537f6642b89",
                                "created_at": "2023-02-01T12:17:19",
                                "documents": [
                                    {
                                        "file_check": null,
                                        "uuid": "247c8e02-5aed-4ce0-a874-e166a86648a3",
                                        "mime_type": "image/jpeg"
                                    }
                                ],
                                "type": "PASSPORT",
                                "expiry_date": null,
                                "element-type": "identity-document"
                            },
                            {
                                "status": "COMPLETED",
                                "uuid": "51796203-ebba-4cd6-bfb9-a36211da4476",
                                "created_at": "2023-02-01T12:17:19",
                                "value": "1997-09-22T00:00:00",
                                "element-type": "birthday"
                            },
                            {
                                "status": "COMPLETED",
                                "uuid": "5517896b-1e37-4f8d-9d56-68ce96f2bf89",
                                "created_at": "2023-02-01T12:09:12",
                                "value": "+33712345678",
                                "element-type": "phone"
                            },
                            {
                                "status": "COMPLETED",
                                "uuid": "efc69af4-25fc-4ac1-9ae1-1980a190541b",
                                "created_at": "2023-02-01T12:09:12",
                                "value": "carlamauru@gmail.com",
                                "element-type": "email"
                            },
                            {
                                "status": "COMPLETED",
                                "uuid": "c648d594-63cf-4302-97f9-378386a99d92",
                                "created_at": "2023-02-01T12:09:12",
                                "value": "Mauru",
                                "element-type": "lastname"
                            },
                            {
                                "status": "COMPLETED",
                                "uuid": "966a5cdd-d28c-4742-ba8d-b55f3d91ac90",
                                "created_at": "2023-02-01T12:09:12",
                                "value": "Carla",
                                "element-type": "firstname"
                            }
                        ],
                        "uuid": "c001263d-5b25-4152-89d9-301441a435b3",
                        "name": "identityInfos",
                        "state": "OK",
                        "category": "identity",
                        "created_at": "2023-02-01T12:09:12"
                    },
                    {
                        "step_elements": [],
                        "uuid": "aab1fceb-fc33-4899-a18b-7d96ce239299",
                        "name": "finished",
                        "state": "OK",
                        "category": null,
                        "created_at": "2023-02-01T12:17:21"
                    }
                ],
                "additional_documents": []
            },
            "firstname": {
                "status": "COMPLETED",
                "uuid": "966a5cdd-d28c-4742-ba8d-b55f3d91ac90",
                "created_at": "2023-02-01T12:09:12",
                "value": "Carla",
                "element-type": "firstname"
            },
            "lastname": {
                "status": "COMPLETED",
                "uuid": "c648d594-63cf-4302-97f9-378386a99d92",
                "created_at": "2023-02-01T12:09:12",
                "value": "Mauru",
                "element-type": "lastname"
            },
            "email": {
                "status": "COMPLETED",
                "uuid": "efc69af4-25fc-4ac1-9ae1-1980a190541b",
                "created_at": "2023-02-01T12:09:12",
                "value": "carlamauru@gmail.com",
                "element-type": "email"
            },
            "language": {
                "status": "ON_GOING",
                "uuid": "4c97a5d3-7eb4-4784-9670-ae052aee02f8",
                "created_at": "2023-02-01T12:09:12",
                "locale": {
                    "identifier": "fr"
                },
                "element-type": "language"
            },
            "phone": {
                "status": "COMPLETED",
                "uuid": "5517896b-1e37-4f8d-9d56-68ce96f2bf89",
                "created_at": "2023-02-01T12:09:12",
                "value": "+33712345678",
                "element-type": "phone"
            },
            "birthday": {
                "status": "COMPLETED",
                "uuid": "51796203-ebba-4cd6-bfb9-a36211da4476",
                "created_at": "2023-02-01T12:17:19",
                "value": "1997-09-22T00:00:00",
                "element-type": "birthday"
            },
            "login": null,
            "bo_user_uuid": null
        },
        "activity_sector": {
            "uuid": "6fbce0bd-7659-4d4e-bb66-d7aa1251c173",
            "name": "Events & ticketing"
        },
        "data": {
            "type": "PARTICULAR",
            "company_name": null,
            "turnover": {
                "uuid": "aed57921-81d8-4f22-8b13-b2f150503800",
                "name": "Less than 20k EUR"
            },
            "activity_age": null
        },
        "custom_reference": null,
        "is_converted": false,
        "conformity_status": "ON_GOING",
        "conformity_status_level_two": null,
        "comments_level_two": null,
        "validator_level_one": null,
        "validator_level_two": null,
        "merchant_uuid": null,
        "validation_date": null,
        "validation_date_level_two": null,
        "sub_type": null,
        "api_infogreffe_attempt": 0,
        "next_step": 0,
        "merchant_enrollment_additional": []
    }
    

    On peut voir que maintenant vous avez une activité "Finished" à OK qui est apparu :

        
                        "step_elements": [],
                        "uuid": "aab1fceb-fc33-4899-a18b-7d96ce239299",
                        "name": "finished",
                        "state": "OK",
                        "category": null,
                        "created_at": "2023-02-01T12:17:21"
    
        
    

    Cela signifie que le profil est completé.

3)Definir un mot de passe

  • Le profil étant completé, il faut maintenant définir un mot de passe.

    Exemple de code Curl :

        
        curl -v POST 'https://test-onboarding-api.centralpay.net/api/user/define/7566b13e-def7-4bb0-8ee4-e4c861f33787' \
        -h 'Content-Type: application/x-www-form-urlencoded' \
        -u 'doctest:4I9HJRTd' \
        -d 'password=PASsword8!'
        
        

Réponse :

  • 
    {
        "uuid": "7797c5bb-d4ab-4c8c-9a93-1a201875be9b",
        "workflow": {
            "uuid": "57a92a2b-0af2-4acd-8836-09f6131ff771",
            "status": "ACCEPTED",
            "activities": [
                {
                    "step_elements": [
                        {
                            "status": "COMPLETED",
                            "uuid": "82b3b3c1-9729-4f64-80e0-05810f0361ec",
                            "created_at": "2023-02-01T12:17:19",
                            "name_line1": "19 rue Edouard Vaillant",
                            "name_line2": null,
                            "name_line3": null,
                            "name_line4": null,
                            "locality": "Tours",
                            "postal_code": "37000",
                            "country": "FRA",
                            "element-type": "address"
                        },
                        {
                            "status": "COMPLETED",
                            "uuid": "9f83bb3a-9c8f-4fd2-b773-5537f6642b89",
                            "created_at": "2023-02-01T12:17:19",
                            "documents": [
                                {
                                    "file_check": null,
                                    "uuid": "247c8e02-5aed-4ce0-a874-e166a86648a3",
                                    "mime_type": "image/jpeg"
                                }
                            ],
                            "type": "PASSPORT",
                            "expiry_date": null,
                            "element-type": "identity-document"
                        },
                        {
                            "status": "COMPLETED",
                            "uuid": "51796203-ebba-4cd6-bfb9-a36211da4476",
                            "created_at": "2023-02-01T12:17:19",
                            "value": "1997-09-22T00:00:00",
                            "element-type": "birthday"
                        },
                        {
                            "status": "COMPLETED",
                            "uuid": "5517896b-1e37-4f8d-9d56-68ce96f2bf89",
                            "created_at": "2023-02-01T12:09:12",
                            "value": "+33712345678",
                            "element-type": "phone"
                        },
                        {
                            "status": "COMPLETED",
                            "uuid": "efc69af4-25fc-4ac1-9ae1-1980a190541b",
                            "created_at": "2023-02-01T12:09:12",
                            "value": "carlamauru@gmail.com",
                            "element-type": "email"
                        },
                        {
                            "status": "COMPLETED",
                            "uuid": "c648d594-63cf-4302-97f9-378386a99d92",
                            "created_at": "2023-02-01T12:09:12",
                            "value": "Mauru",
                            "element-type": "lastname"
                        },
                        {
                            "status": "COMPLETED",
                            "uuid": "966a5cdd-d28c-4742-ba8d-b55f3d91ac90",
                            "created_at": "2023-02-01T12:09:12",
                            "value": "Carla",
                            "element-type": "firstname"
                        }
                    ],
                    "uuid": "c001263d-5b25-4152-89d9-301441a435b3",
                    "name": "identityInfos",
                    "state": "OK",
                    "category": "identity",
                    "created_at": "2023-02-01T12:09:12"
                },
                {
                    "step_elements": [],
                    "uuid": "aab1fceb-fc33-4899-a18b-7d96ce239299",
                    "name": "finished",
                    "state": "OK",
                    "category": null,
                    "created_at": "2023-02-01T12:17:21"
                }
            ],
            "additional_documents": []
        },
        "firstname": {
            "status": "COMPLETED",
            "uuid": "966a5cdd-d28c-4742-ba8d-b55f3d91ac90",
            "created_at": "2023-02-01T12:09:12",
            "value": "Carla",
            "element-type": "firstname"
        },
        "lastname": {
            "status": "COMPLETED",
            "uuid": "c648d594-63cf-4302-97f9-378386a99d92",
            "created_at": "2023-02-01T12:09:12",
            "value": "Mauru",
            "element-type": "lastname"
        },
        "email": {
            "status": "COMPLETED",
            "uuid": "efc69af4-25fc-4ac1-9ae1-1980a190541b",
            "created_at": "2023-02-01T12:09:12",
            "value": "carlamauru@gmail.com",
            "element-type": "email"
        },
        "language": {
            "status": "ON_GOING",
            "uuid": "4c97a5d3-7eb4-4784-9670-ae052aee02f8",
            "created_at": "2023-02-01T12:09:12",
            "locale": {
                "identifier": "fr"
            },
            "element-type": "language"
        },
        "phone": {
            "status": "COMPLETED",
            "uuid": "5517896b-1e37-4f8d-9d56-68ce96f2bf89",
            "created_at": "2023-02-01T12:09:12",
            "value": "+33712345678",
            "element-type": "phone"
        },
        "birthday": {
            "status": "COMPLETED",
            "uuid": "51796203-ebba-4cd6-bfb9-a36211da4476",
            "created_at": "2023-02-01T12:17:19",
            "value": "1997-09-22T00:00:00",
            "element-type": "birthday"
        },
        "login": "carlamauru@gmail.com",
        "bo_user_uuid": null
    }
    

Cette réponse est renvoyée quand le mot de passe a bien été défini.

4)Validation du contrat

  • Le profil étant completé et le mot de passe définit, il faut maintenant valider le contrat.

    Il faut réutiliser le Curl suivant afin de récuperer l'uuid de l'activité de la signature du contrat :

    
    curl -v GET 'https://test-onboarding-api.centralpay.net/api/nauth/merchant-enrollment/7566b13e-def7-4bb0-8ee4-e4c861f33787' \
    -h 'Content-Type: application/x-www-form-urlencoded' \
    -u 'doctest:4I9HJRTd' \
    
    

    A la place de "7566b13e-def7-4bb0-8ee4-e4c861f33787" il faudra ici mettre l'uuid de l'enrolement donné lors de la création de celui-ci.

Réponse :

  • 
    {
        "workflow": {
            "uuid": "32c5ba0f-c81c-490a-96e1-2579f67a2a2e",
            "status": "ON_GOING",
            "activities": [
                {
                    "step_elements": [],
                    "uuid": "d2d16e0d-419d-4b5c-8e03-9f5dc75ac04c",
                    "name": "ContractValiA",
                    "state": "TODO",
                    "category": "validation",
                    "created_at": "2023-02-01T12:09:12"
                }
            ],
            "additional_documents": []
        },
        "identity_badge": null,
        "representatives_list": null,
        "infogreffe_identity": null,
        "language": "fr",
        "risk_score": {
            "activity": 2,
            "activity_age": null,
            "turnover": 1,
            "bank_account": 0,
            "total": null
        },
        "monthly_turnover": 0,
        "monthly_turnover_currency": "",
        "uuid": "7566b13e-def7-4bb0-8ee4-e4c861f33787",
        "risk_points": null,
        "created_at": "2023-02-01T12:09:12",
        "last_updated_at": "2023-02-01T12:26:32",
        "turnover_is_fixed": false,
        "workflow_mode": "SEQUENTIAL",
        "risk_level": "LOW",
        "actor_initiator": "6385f28c-0160-46ba-8088-b4317e329946",
        "type": "INDIVIDUAL",
        "is_canceled": false,
        "enrollment_account": {
            "login": "carlamauru@gmail.com"
        },
        "profile": {
            "uuid": "7797c5bb-d4ab-4c8c-9a93-1a201875be9b",
            "workflow": {
                "uuid": "57a92a2b-0af2-4acd-8836-09f6131ff771",
                "status": "ACCEPTED",
                "activities": [
                    {
                        "step_elements": [
                            {
                                "status": "COMPLETED",
                                "uuid": "82b3b3c1-9729-4f64-80e0-05810f0361ec",
                                "created_at": "2023-02-01T12:17:19",
                                "name_line1": "19 rue Edouard Vaillant",
                                "name_line2": null,
                                "name_line3": null,
                                "name_line4": null,
                                "locality": "Tours",
                                "postal_code": "37000",
                                "country": "FRA",
                                "element-type": "address"
                            },
                            {
                                "status": "COMPLETED",
                                "uuid": "9f83bb3a-9c8f-4fd2-b773-5537f6642b89",
                                "created_at": "2023-02-01T12:17:19",
                                "documents": [
                                    {
                                        "file_check": null,
                                        "uuid": "247c8e02-5aed-4ce0-a874-e166a86648a3",
                                        "mime_type": "image/jpeg"
                                    }
                                ],
                                "type": "PASSPORT",
                                "expiry_date": null,
                                "element-type": "identity-document"
                            },
                            {
                                "status": "COMPLETED",
                                "uuid": "51796203-ebba-4cd6-bfb9-a36211da4476",
                                "created_at": "2023-02-01T12:17:19",
                                "value": "1997-09-22T00:00:00",
                                "element-type": "birthday"
                            },
                            {
                                "status": "COMPLETED",
                                "uuid": "5517896b-1e37-4f8d-9d56-68ce96f2bf89",
                                "created_at": "2023-02-01T12:09:12",
                                "value": "+33712345678",
                                "element-type": "phone"
                            },
                            {
                                "status": "COMPLETED",
                                "uuid": "efc69af4-25fc-4ac1-9ae1-1980a190541b",
                                "created_at": "2023-02-01T12:09:12",
                                "value": "carlamauru@gmail.com",
                                "element-type": "email"
                            },
                            {
                                "status": "COMPLETED",
                                "uuid": "c648d594-63cf-4302-97f9-378386a99d92",
                                "created_at": "2023-02-01T12:09:12",
                                "value": "Mauru",
                                "element-type": "lastname"
                            },
                            {
                                "status": "COMPLETED",
                                "uuid": "966a5cdd-d28c-4742-ba8d-b55f3d91ac90",
                                "created_at": "2023-02-01T12:09:12",
                                "value": "Carla",
                                "element-type": "firstname"
                            }
                        ],
                        "uuid": "c001263d-5b25-4152-89d9-301441a435b3",
                        "name": "identityInfos",
                        "state": "OK",
                        "category": "identity",
                        "created_at": "2023-02-01T12:09:12"
                    },
                    {
                        "step_elements": [],
                        "uuid": "aab1fceb-fc33-4899-a18b-7d96ce239299",
                        "name": "finished",
                        "state": "OK",
                        "category": null,
                        "created_at": "2023-02-01T12:17:21"
                    }
                ],
                "additional_documents": []
            },
            "firstname": {
                "status": "COMPLETED",
                "uuid": "966a5cdd-d28c-4742-ba8d-b55f3d91ac90",
                "created_at": "2023-02-01T12:09:12",
                "value": "Carla",
                "element-type": "firstname"
            },
            "lastname": {
                "status": "COMPLETED",
                "uuid": "c648d594-63cf-4302-97f9-378386a99d92",
                "created_at": "2023-02-01T12:09:12",
                "value": "Mauru",
                "element-type": "lastname"
            },
            "email": {
                "status": "COMPLETED",
                "uuid": "efc69af4-25fc-4ac1-9ae1-1980a190541b",
                "created_at": "2023-02-01T12:09:12",
                "value": "carlamauru@gmail.com",
                "element-type": "email"
            },
            "language": {
                "status": "ON_GOING",
                "uuid": "4c97a5d3-7eb4-4784-9670-ae052aee02f8",
                "created_at": "2023-02-01T12:09:12",
                "locale": {
                    "identifier": "fr"
                },
                "element-type": "language"
            },
            "phone": {
                "status": "COMPLETED",
                "uuid": "5517896b-1e37-4f8d-9d56-68ce96f2bf89",
                "created_at": "2023-02-01T12:09:12",
                "value": "+33712345678",
                "element-type": "phone"
            },
            "birthday": {
                "status": "COMPLETED",
                "uuid": "51796203-ebba-4cd6-bfb9-a36211da4476",
                "created_at": "2023-02-01T12:17:19",
                "value": "1997-09-22T00:00:00",
                "element-type": "birthday"
            },
            "login": "carlamauru@gmail.com",
            "bo_user_uuid": null
        },
        "activity_sector": {
            "uuid": "6fbce0bd-7659-4d4e-bb66-d7aa1251c173",
            "name": "Events & ticketing"
        },
        "data": {
            "type": "PARTICULAR",
            "company_name": null,
            "turnover": {
                "uuid": "aed57921-81d8-4f22-8b13-b2f150503800",
                "name": "Less than 20k EUR"
            },
            "activity_age": null
        },
        "custom_reference": null,
        "is_converted": false,
        "conformity_status": "ON_GOING",
        "conformity_status_level_two": null,
        "comments_level_two": null,
        "validator_level_one": null,
        "validator_level_two": null,
        "merchant_uuid": null,
        "validation_date": null,
        "validation_date_level_two": null,
        "sub_type": null,
        "api_infogreffe_attempt": 0,
        "next_step": 0,
        "merchant_enrollment_additional": []
    }
    
  • Nous pouvons voir que dans "workflow" nous avons ceci :

    
                    "step_elements": [],
                    "uuid": "d2d16e0d-419d-4b5c-8e03-9f5dc75ac04c",
                    "name": "ContractValiA",
                    "state": "TODO",
                    "category": "validation",
                    "created_at": "2023-02-01T12:09:12"
    
    

    Il faut d'abord récupérer l'uuid de l'enrolement ainsi que du contrat et réaliser maintenant l'envoi de l'OTP :

    Ci dessous le 1er uuid concerne celui de l'enrolement et le 2éme celui du contratValiA.

    
    curl -v POST 'https://test-onboarding-api.centralpay.net/api/merchant-enrollment/7566b13e-def7-4bb0-8ee4-e4c861f33787/activity/d2d16e0d-419d-4b5c-8e03-9f5dc75ac04c/otp' \
        -h 'Content-Type: application/x-www-form-urlencoded' \
        -u 'doctest:4I9HJRTd' \
    
    

Maintenant que vous avez reçu un sms avec l'OTP il faut réaliser la signature avec l'uuid du contratValiA :


curl --v POST 'https://test-onboarding-api.centralpay.net/api/nauth/profile/d2d16e0d-419d-4b5c-8e03-9f5dc75ac04c/activity' \
    -h 'Content-Type: application/x-www-form-urlencoded' \
    -u 'doctest:4I9HJRTd' \
    -d'contract_validation[centralpayProspection]=true' \
    -d'contract_validation[partnersProspection]=false' \
    -d 'contract_validation[otp]=491479'

Réponse :

  • 
    {
        "type": "FORM",
        "form": {
            "children": {
                "contract_validation": {
                    "extra_data_to_pass": {
                        "type": "PARTICULAR",
                        "account_type": "BASIC",
                        "contact_firstname": "Carla",
                        "contact_lastname": "Mauru",
                        "cgu": "CGU SIMPLE",
                        "fee_schedule": "Test OBD"
                    },
                    "children": {
                        "centralpayProspection": [],
                        "partnersProspection": [],
                        "otp": [],
                        "validationDate": []
                    }
                }
            }
        },
        "category": "validation"
    }
    
    

    Cette réponse est renvoyée quand le contrat a bien été signé.