Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 12 Next »

There are two ways to process a credit card: (1) ECOM (which usually requires 3DS), and (2) MOTO (without 3DS).

ECOM payment is the default type and returns… acsform in response for the first time while doing the 3DS authentication. This acsform need to be added to a view page to redirect the user in 3DS authentication page.

After the authentication, it will return to the user defined URL with encoded transaction ID.

MOTO payment is … Process the payment and return to the user defined URL with encoded transaction ID.



Create Credit Card Payment for ECOM

POST /v1/pay/cc/process

In 3DS authentication , you need to pass the following additional information in header.

Headers

user-agent string
User agent.

accept string
Accept

accept-encoding string
Accept encoding.

accept-charset string
Accept charset.

Attributes

payment_intent string
Payment intent token.

paymentToken string
Payment token generated from Create Payment Token request.

type string
Type 1 is ECOM payment and type 2 is MOTO.

raw_amount float
Payment amount.

customer_email string
Customer email.

customer_name string
Customer name.

transaction_unique string
Transaction unique.

device_timezone integer
Device timezone value which can be fetched using javascript. This value is required in 3DS.

device_capabilities string
Device capabilities which can be fetched using javascript. This value is required in 3DS.

device_accept_language string
Device accept language which can be fetched using javascript. This value is required in 3DS.

device_screen_resolution string
Device accept language which can be fetched using javascript. This value is required in 3DS.

remote_address string
Remote address which can be fetched using javascript. This value is required in 3DS.

Request

POST https://secure.blinkpayment.co.uk/api/v1/pay/cc/process
Content-Type: application/json
Authentication: Bearer eyJ0eXAiOiJKV1QiLCJhbG...
user-agent: ......
accept: .....
accept-encoding: ....
accept-charset: ....

{
    "payment_intent": "pi_Swhc84aSLtUGppvPARX...",
    "paymentToken": "eyJwYXltZW50VG9rZW4iOns...",
    "type": 1,
    "raw_amount": 1.1,
    "customer_email": "random@email.com",
    "customer_name": "A Smith",
    "transaction_unique": "PHnRNzjUw...",
    "device_timezone" : "-3**",
    "device_capabilities" : "java**",
    "device_accept_language" : "en-G*",
    "device_screen_resolution" : "1360x7****",
    "remote_address" : "10********"
}

Response before 3DS authentication

{
   "acsform" : "<form id="form3ds22" method="post" action="https://acs.********"><input type="hidden" name="creq" value="********">
                <input type="hidden" name="threeDSPageSessions[427**************][bfreq]" value="*******">
                <input type="hidden" name="threeDSPageSessions[427**************][threeDSRef]" value="****">
                <input id="btnSubmit" type="submit" class="button expanded btn btn-primary" value="Process Payment">
                </form>"
}

Response after 3DS authentication

{
    "url": "https://api-demo-php.blinkpayment.co.uk/return?res=QkwtTVlV......%3D%3D"
}


Create Credit Card Payment for MOTO

POST /v1/pay/cc/process

Attributes

payment_intent string
Payment intent token.

paymentToken string
Payment token generated from Create Payment Token request.

type string
Type 1 is ECOM payment and type 2 is MOTO.

raw_amount float
Payment amount.

customer_email string
Customer email.

customer_name string
Customer name.

transaction_unique string
Transaction unique.

Request

POST https://secure.blinkpayment.co.uk/api/v1/pay/cc/process
Content-Type: application/json
Authentication: Bearer eyJ0eXAiOiJKV1QiLCJhbG...

{
    "payment_intent": "pi_Swhc84aSLtUGppvPARX...",
    "paymentToken": "eyJwYXltZW50VG9rZW4iOns...",
    "type": 2,
    "raw_amount": 1.1,
    "customer_email": "random@email.com",
    "customer_name": "A Smith",
    "transaction_unique": "PHnRNzjUw..."
}

Response

{
    "url": "https://api-demo-php.blinkpayment.co.uk/return?res=QktTVlV......%3D%3D"
}
  • No labels