Create order for PCIDSS merchants¶
These edpoints relate to the flow, when merchant is PCI DSS compliant and card data collected on behalf of merchant site or application.
Note
This flow will consist from two steps.
-
Step 1: Obtain ACS URL from issuing bank and redirect caldholder to this URL for 3DSecure authentication.
-
Step 2: Obtain result from ACS URL and perform financial transaction - purchase.
Endpoint for order creation
Step 1. Starting 3DSecure authentication
POST /api/3dsecure_step1
This endpoint expects POST
request in JSON
format with parameters.
If the card is enrolled in 3D-Secure service, response will contain parameters:
Parameter | Type | Description |
---|---|---|
response_status | string(50) | if no error ocured always returned success success |
acs_url | string(2048) | URL of cardholder issuing bank Access Control Server where he must enter 3DSecure password |
pareq | string(20480) | Parameter which must be submeted to acs_url |
md | string(1024) | Unique 3DSecure request ID. Generated by Flitt payment gateway |
A merchant receiving this response must build an HTML form and using it submit customer to acs_url. HTML form must be of the following content:
<form name="MPIform" action='${acs_url}' method="POST">
<input type="hidden" name="PaReq" value='${pareq}'>
<input type="hidden" name="MD" value='${md}'>
<input type="hidden" name="TermUrl" value='${TempUrl}'>
</form>
where ${TempUrl}
– is merchant URL where customer will be redirected after 3DSecure authentication at acs_url
.
The following parameters are returned to URL TempUrl
after cardholder password verification:
Parameter | Type | Description |
---|---|---|
pares | string(20480) | Payer authentication result.Is BASE64 string |
md | string(1024) | Unique 3DSecure request ID.Generated by Flitt payment gateway |
Request and response examples
curl -i -X POST \
-H "Content-Type:application/json" \
-d \
'
{
"request": {
"order_id": "test_12343242",
"merchant_id": "1549901",
"order_desc": "Test order",
"amount": 1000,
"currency": "GEL",
"card_number": "4444555566661111",
"cvv2": "111",
"expiry_date": "1125",
"client_ip": "8.8.8.8",
"server_callback_url": "https://myserver.com/callback",
"signature": "0c0c2374c73267e7be560d80834e4ba28ccda7aa"
}
}
' \
'https://pay.flitt.com/api/3dsecure_step1'
{
"response": {
"response_status": "success",
"acs_url": "https://pay.flitt.com/test/testacs/",
"pareq": "eJxtU21vgjAQ/u6vIP4A+gJRNKVJHUvUiRpwS/aRYYNsgljA6b8fLTpFuISE5+5pe/fcHdnsBOeOz8NScNrTKiMuz/Mg4lq8tfuDyqxRv46o6Jp5/HjHynfiIo8PKUU61DEBN9gkuVyEuyAtmm4VCsLjZLakpjUyDUTAFbZ5CRczhxpDDCsjoIZtWhoknC7Y5mM2Z762Zv6GaRO2fGMEqFD7RHgo00JcqIktAm6gTSvFnu6KIsvHQD6uysn1ffal708EyGizZNBdM1mX0p13ZXKOt9R12O/Th5ffn3jl/NgESEb73DYoOMUQmdDCloaGY4jGaECA8nconsgiKdYh1F7fvUrz2tFmZjJXdqVL1R8dHUqWQvA0vNDRUEp5Q20iP2eHlMtLCfj/f5KvWyfyMu2cobCopsFNVsZ8yhdHL1rNkedH0Ev8yLblVClCZyZx1W4DozqV+Ln3BDy+WKV1XwHZYrUttEdAY5f+AHcC0ak=",
"md": "2001876637"
}
}
Request and response examples
{
"response": {
"error_code": 1011,
"error_message": "Parameter `amount` is missing",
"request_id": "5htKi0wf7zEHn",
"response_status": "failure"
}
}
Endpoint for 3DSecure authentication completion
Step 2. Complete 3D-Secure authentication and perform purchase transaction
POST /api/3dsecure_step2
This endpoint expects POST
request in JSON
format with parameters:
Parameter | Type | Mandatory | Description |
---|---|---|---|
merchant_id | integer(12) | mandatory | Merchant unique ID. Generated by Flitt during merchant registration. |
order_id | string(1024) | mandatory | Order ID which is generated by merchant. |
pares | string(20480) | mandatory | Parameter returned by issuing bank to URL TempUrl after password verification |
md | string(1024) | mandatory | Unique 3DSecure request ID. Generated by Flitt payment gateway |
version | string(10) | optional | Protocol version. Default value: 1.0 |
signature | string(40) | mandatory | Order signature. Required to verify merchant request consistency and authenticity. Signature generation algorithm please see at Signature generation. |
Request
curl -i -X POST \
-H "Content-Type:application/json" \
-d \
'
{
"request": {
"order_id": "test_123432421",
"merchant_id": "1549901",
"pares": "eJzFWFuTosgSft9f0dH7aMxwF9lweqO4g4JcFXxDRO6Ccin01y/aPb093T3nTOzGiVMRhlZWVlZ+mfkVKfM/h7J46KNzk1bHb4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KX2+uQLv7ZWkC64y3uSkjP+Uu13os2rcFOjFdt5eloprFJw5mWQL5ZR3ga6spgq5ZSO2M3BRG6qGOjLOnoUSupXFhM/3YeRtJLk1yEYvlKUDtSMTAwUB8AmwiQQVTtYoyanaU0OQ85cLVbjhzEwg0y+CVYimvJhRmXrJaFxmZm+T4dDe4Qb1t8PUGwevQmNJla8oXL/XNf8Pdyrlx9/Q3d42jaF8jP50Uu/8nd7WrO2jij9x9kf2PasWE8fb+fFYX1VZJ+lAHd8xghIaCsf7V8XHOgoVE79PgzJsxRrtZ2atBI4t2tkmM/Y5BmNrb9huw6EIGnk4ZTxx7dwonndr6injSyd7jJllORzm5Fumsz3mRsFD0cJSLKVytu8PVLERAT0yv3jia1OymlwtMPA2ud+Fq1mFkKK2RYUKtI5g78Xlt7U7bYuUpZVQUer/BDo1Kyam9Psiz6FKAWGMBkLI4UO7Y5FvvYaErlvUFUc8JImFMjJUOaUV3w0KP8MLfY3KnajK481yBVq1JEfhPupVr52Y2ZvPf9EWWAHn4vV9I7n1RWDL9Xnlfj/DulwBNURupDA4f8iU+50sASrTdtp55Ktix5Q7wOC2lvEKCJe5vxrYoQcmLs5hkkF7lKuJu9gCL6Zmr5hRydlQGp2gmrahzUy5lbz3pNuF0c54q4ooEhyE1+4m0QYyxm6s7kqlmUc9cnN4PqmbmGeR1765Iq/FYyJx9q7MNctXj7WqxMKpypS6DnU2N1VdwVZfTNIkMzq3X/a/8fVb52NfOkQ+d8JvO+eUFDPLyBubpt/Hv59v3M38BUoNF+A==",
"md": "2003330322",
"signature": "32b08ca114659b8c18ab9576cf1d5ffdb9c711f2"
}
}
' \
'https://pay.flitt.com/api/3dsecure_step2'
{
"response": {
"error_code": 1011,
"error_message": "Parameter `amount` is missing",
"request_id": "5htKi0wf7zEHn",
"response_status": "failure"
}
}