Post
/api/pay/v1/intents
This endpoint allows you to create a new intent.
Request Body
transaction_type
(string, required): Type of transaction. Default value is set to SALE. If passed, it can only be one of the following:SALE
VERIFY
PREAUTH
CREDIT
payment_type
(string, required): Type of payment. It can only be one of the following:credit-card
direct-debit
open-banking
amount
(number, required): Amount of the transaction (for transaction_type VERIFY, amount should be left out).currency
(string, required): Currency of the transaction. See the token's response for available currencies.return_url
(string, required): GET URL to return to after transaction completion.notification_url
(string, required): POST URL for transaction notification as the transaction is completed.card_layout
(string, optional): Different structure of card layout for any transaction. This field is optional. If not passed, default value is basic.customer_name
(string, optional): Name of the customer, this will prefill thecustomer_name
in the element responses.customer_email
(string, optional): Email of the customer, this will prefill thecustomer_email
in the element responses.customer_address
(string, optional): Address of the customer, this will prefill thecustomer_address
in the element responses.customer_postcode
(string, optional): Postcode of the customer, this will prefill thecustomer_postcode
in the element responses.card_layout
(string, optional): Different structure of card layout for any transaction. This field is optional. If not passed, default value is basic.basic
single-line
multi-line
delay_capture_days
(integer, optional): Number of days for which the transaction will be delayed. This field can be passed only for SALE and CREDIT transactions. The maximum number is 30.
Response Parameters
id
(number): The unique identifier of the intent.payment_intent
(string): The type of payment intent.transaction_type
(string): The type of transaction.expiry_date
(string): The expiry date of the intent.status
(string): The status of the intent.payment_type
(string): The type of payment.currency
(string): The currency of the transaction.amount
(number): The amount of the transaction.return_url
(string): The URL to return to after the transaction.notification_url
(string): The URL for transaction notifications.card_layout
(string): The layout of the card inputs in ccElement and ccMotoElement.element
(object): An object containing specific elements for credit card, moto, and online banking transactions:ccElement
(string): Credit card element.ccMotoElement
(string): Moto (Mail Order/Telephone Order) element.obElement
(string): Open banking element.ddElement
(string): Direct debit element.gpElement
(string): Google Pay element.apElement
(string): Apple Pay element.
merchant_id
(number): The identifier of the merchant.transaction_unique
(string): The unique identifier of the transaction.
Security
HTTP
Type bearer
Header parameters
Authorization
string
ExampleBearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJtZXJjaGFudF9pZCI6NDM5OCwic2VjcmV0X2tleSI6IjYzMTBlNDhiZGQwZTQzODE0NTlhNjJiNDZkMmM0ZmQ2ZThhYjY1YTJhNGQ1MjA1YzZjM2RkZWJmYmJhZWJiZjgiLCJleHAiOjE3MjA3MDcyNjZ9.91qa4veQ9xGVM-Jc_3_i_vaykEdYarRwUzb-37aLD0c
Body parameters
object
Example{
"transaction_type": "SALE",
"payment_type": "credit-card",
"amount": 1.01,
"currency": "GBP",
"return_url": "https://demo-app.blinkpayment.co.uk/return",
"notification_url": "https://demo-app.blinkpayment.co.uk/notification",
"card_layout": "single-line"
}
Responses
200
Successful response