This example shows a payment request for an EPT using split payment mode. This example will work ONLY if you have an EPT using split payment mode.
The HTML form must only contain fields that are expected by the Monetico payment system.
Please keep in mind the following points :
The "contexte_commande" field is a base 64 UTF-8 encoded value of the following JSON data :
{"billing":{"civility":"Mr","firstName":"John","lastName":"Doe","addressLine1":"18 rue de l'adresse","city":"Paris","postalCode":"75000","country":"FR","email":"john.doe@unknown.com","phone":"+33-123456789"},"client":{"civility":"Mr","firstName":"John","lastName":"Doe","email":"john.doe@unknown.com","phone":"+33-123456789","authenticationTimestamp":"2024-12-22T05:54:29Z","lastAccountModification":"2020-09-02"}}
Toggle pretty printed version
Please refer to technical documentation in order to respect the format of each different field
MAC field value is an hexadecimal encoding of the result of sealing the following string with HMAC SHA-1 algorithm and you secret key :
TPE=0229001*contexte_commande=eyJiaWxsaW5nIjp7ImNpdmlsaXR5IjoiTXIiLCJmaXJzdE5hbWUiOiJKb2huIiwibGFzdE5hbWUiOiJEb2UiLCJhZGRyZXNzTGluZTEiOiIxOCBydWUgZGUgbCdhZHJlc3NlIiwiY2l0eSI6IlBhcmlzIiwicG9zdGFsQ29kZSI6Ijc1MDAwIiwiY291bnRyeSI6IkZSIiwiZW1haWwiOiJqb2huLmRvZUB1bmtub3duLmNvbSIsInBob25lIjoiKzMzLTEyMzQ1Njc4OSJ9LCJjbGllbnQiOnsiY2l2aWxpdHkiOiJNciIsImZpcnN0TmFtZSI6IkpvaG4iLCJsYXN0TmFtZSI6IkRvZSIsImVtYWlsIjoiam9obi5kb2VAdW5rbm93bi5jb20iLCJwaG9uZSI6IiszMy0xMjM0NTY3ODkiLCJhdXRoZW50aWNhdGlvblRpbWVzdGFtcCI6IjIwMjQtMTItMjJUMDU6NTQ6MjlaIiwibGFzdEFjY291bnRNb2RpZmljYXRpb24iOiIyMDIwLTA5LTAyIn19*date=22/12/2024:05:59:29*dateech1=22/12/2024*dateech2=22/01/2025*dateech3=22/02/2025*lgue=FR*montant=100EUR*montantech1=25EUR*montantech2=50EUR*montantech3=25EUR*nbrech=3*reference=ref6767aac19341f*societe=entreprisev3*texte-libre=Do not forget to HTML-encode every field value otherwise characters like " or ' might cause issues*version=3.0
The string is composed of all the fields sent by the form (except the "MAC" field itself).
If you do not send optional parameters, they must not be included inside the sealing string.
To generate the string used for sealing, you have to :