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 »

Authenticate requests using HTTP Basic Auth by adding a bearer token to the header, e.g. Authentication: Bearer {{access_token}}. You can get the {{access_token}} from the create token request.



Create intent

POST /v1/pay/intent

Attributes

amount float
Transaction amount.

payment_type string
Can only be one of the following:

  • credit-card

  • direct-debit

  • open-banking 

currency string
Three letter currency code (ISO 4217) e.g USD, GBP.

reutrn_url string
URL on your domain, where Blink will redirect after transaction is processed e.g. https://mydomain.com/return.

notification_url string
URL on your domain, where Blink will send status updates when the transaction status is changed e.g. https://mydomain.com/notification.

user_metadata json (optional)
Customer details can be added with the following keys:

  • customer_name

  • customer_email

  • customer_address

  • customer_postcode

Request

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

{
    "amount": 1.01,
    "payment_type": "credit-card",
    "currency": "GBP",
    "return_url": "https://mydomain.com/return",
    "notification_url": "https://mydomain.com/notification"
}

Response

{
    "id": 123,
    "payment_intent": "pi_Swhc84aSLtUGppvPARX...",
    "expired_on": "2023-01-01T12:00:00Z",
    "amount": 1.01,
    "currency": "GBP",
    "payment_type": "credit-card",
    "return_url": "https://mydomain.com/return",
    "notification_url": "https://mydomain.com/notification"
}


Refresh intent

POST /v1/pay/intent/refresh

Attributes

payment_intent string
256 Alpha numeric, obtained through the create-intent request.

Request

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

{
  "payment_intent": "pi_Swhc84aSLtUGppvPARX..."
}

Response

{
    "id": 123,
    "payment_intent": "pi_Swhc84aSLtUGppvPARX...",
    "expired_on": "2023-01-01T12:00:00Z",
    "amount": 1.01,
    "currency": "GBP",
    "payment_type": "credit-card",
    "return_url": "https://mydomain.com/return",
    "notification_url": "https://mydomain.com/notification"
}


Get intent

GET /v1/pay/intent/{id}

Attributes

payment_intent string
256 Alpha numeric, obtained through the create-intent request.

Request

PATCH https://secure.blinkpayment.co.uk/api/v1/pay/intent/{id}
Content-Type: application/json
Authentication: Bearer eyJ0eXAiOiJKV1QiLCJhbG...

{
  "payment_intent": "pi_Swhc84aSLtUGppvPARX..."
}

Response

{
    "id": 123,
    "payment_intent": "pi_Swhc84aSLtUGppvPARX...",
    "expired_on": "2023-01-01T12:00:00Z",
    "amount": 1.01,
    "currency": "GBP",
    "payment_type": "credit-card",
    "return_url": "https://mydomain.com/return",
    "notification_url": "https://mydomain.com/notification"
}


Update intent

PATCH /v1/pay/intent/{id}

Attributes

payment_intent string
256 Alpha numeric, obtained through the create-intent request.

Request

PATCH https://secure.blinkpayment.co.uk/api/v1/pay/intent/{id}
Content-Type: application/json
Authentication: Bearer eyJ0eXAiOiJKV1QiLCJhbG...

{
  "payment_intent": "pi_Swhc84aSLtUGppvPARX..."
}

Response

{
    "id": 123,
    "payment_intent": "pi_Swhc84aSLtUGppvPARX...",
    "expired_on": "2023-01-01T12:00:00Z",
    "amount": 1.01,
    "currency": "GBP",
    "payment_type": "credit-card",
    "return_url": "https://mydomain.com/return",
    "notification_url": "https://mydomain.com/notification"
}

  • No labels