validate_payment


POST  - Validate a pending levy


Argument Description Type - Length Mandatory
safedebit_consumer_referenceSafedebit consumer referenceString - 35YES
payment_referencePayment referenceString - 64YES
sdd_referenceDirect debit representation referenceString - 35YES *
validation_type **Validation methodString - 4YES
validation_valueValidation valueString - 8YES





Request

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


{
"safedebit_consumer_reference": "XXXXXX",
"payment_reference": "Transaction1234",
"validation_type": "OTP",
"validation_value": "1234"}
                                                


If payment validated

Response

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


                            
{
    "result" : true,
    "status" : "VALIDATED",
    "payment_reference": "Transaction-123",
    "safedebit_secure_reference" : "XXXXXX",
    "sdd":[
            {
                "sdd_reference" : "Reference-first-sdd",
                "amount":"500",
                "due_date":"01/01/2018",
                "status":"CREATED"
            },
            {
                "sdd_reference" : "Reference-second-sdd",
                "amount":"500",
                "due_date":"01/02/2018",
                "status":"WAITING"
            }
    ]
}
                                        
                                        


Payment waiting for validation

Response

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



{
    "result" : true,
    "status" : "CREATED",
    "sdd_reference": "REF_xxxx", 
    "due_date" : "DD/MM/YYYY"
}
                                        
                                        


Payment creation 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
code See (error codes in annex).
*
Thanks to fill-in all the mandatory fields
Request

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