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 14 Next »

There are two ways to process a credit card:

  1. ECOM (which usually requires 3DS)
    ECOM payment is the default type and returns an acsform, which is a HTML from used to perform the 3DS authentication. This HTML form should be added to a page and sent to the user. The user will complete the 3DS form and submit. After submission, the user will be returned to the predefined return URL with an encoded transaction ID.

  2. MOTO (without 3DS).
    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

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

{
   "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>"
}

HTML Form

<!DOCTYPE html>
<html>
<head>
  <title>Page Title</title>
</head>

<body>
  <h1>3DS</h1>
  <div>
    <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>
  </div>
</body>
</html>

Response

{
    "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