### Hash Calculation Example: Step 1 & 2 Source: https://docs.acquired.com/docs/3d-secure This example demonstrates the first two steps of calculating the hash value for data integrity verification. It involves concatenating specific transaction parameters and then applying SHA256 encryption. ```text 1. Concatenate the parameters in this order: **status . transaction_id . order_id . timestamp** `executed1970f4e1-95da-4859-b275-e9ac83f05eb1your_unique_reference_11657183950` 2. SHA256 encrypt the resulting string. `4e9ce34004008830e672aa826efd5ddf56130ad127c279751135d48291b5f007` ``` -------------------------------- ### Hash Calculation Example: Step 3 & 4 Source: https://docs.acquired.com/docs/3d-secure This example illustrates the final steps in calculating the hash value for data integrity. It involves appending the application key to the previously generated hash and then performing a second SHA256 encryption. ```text 3. Append your `app_key` value to the hash value of a string. `4e9ce34004008830e672aa826efd5ddf56130ad127c279751135d48291b5f007app_key` 4. SHA256 encrypt the resulting string again. `4e7e127a6ab8e7c4d73100e0c959eb42e1d61adff6b641c6ea7e4690e44cbff0` ``` -------------------------------- ### Successful Transaction Redirect POST Data Example Source: https://docs.acquired.com/docs/3d-secure This example illustrates the format of the data sent via POST to the redirect URL upon successful EMV 3DS authentication. It includes transaction status, ID, order ID, timestamp, and a hash for verification. ```text "status":"success","transaction_id":{{transaction_id}},"order_id":{{order_id}},"timestamp":{{timestamp}},"hash":{{hash}} ``` -------------------------------- ### Step 2: Authentication URL Response Source: https://docs.acquired.com/docs/3d-secure This section details the response received when a card is enrolled for EMV 3DS, providing an authentication URL for user redirection. ```APIDOC ## GET /v1/transactions/{transaction_id} ### Description Retrieves the status of a transaction and provides an authentication URL if the card is enrolled in EMV 3DS. ### Method GET ### Endpoint `/v1/transactions/{transaction_id}` ### Parameters #### Path Parameters - **transaction_id** (string) - Required - The unique identifier for the transaction. ### Response #### Success Response (200) - **transaction_id** (string) - Unique reference assigned by Acquired.com. - **status** (string) - The current status of the transaction (e.g., "tds_pending"). - **links** (array) - An array of links related to the transaction. - **rel** (string) - The relation of the link (e.g., "self", "tds"). - **href** (string) - The URL for the link. #### Response Example (Card Enrolled) ```json { "transaction_id": "a7e3fde5-5b83-44f4-9915-782bc7121717", "status": "tds_pending", "links": [ { "rel": "self", "href": "/v1/transactions/a7e3fde5-5b83-44f4-9915-782bc7121717" }, { "rel": "tds", "href": "https://auth.acquired.com/a7e3fde5-5b83-44f4-9915-782bc7121717" } ] } ``` #### Response Example (Card Not Enrolled) ```json { "transaction_id": "a7e3fde5-5b83-44f4-9915-782bc7121717", "status": "tds_failed", "reason": "card_not_enrolled", "links": [ { "rel": "self", "href": "/v1/transactions/a7e3fde5-5b83-44f4-9915-782bc7121717" } ] } ``` ``` -------------------------------- ### Step 3: Handle Customer Redirect Source: https://docs.acquired.com/docs/3d-secure Details the POST request sent to the redirect URL after authentication is completed, including successful and failed transaction responses. ```APIDOC ## POST /redirect_url ### Description Handles the customer redirect after authentication. Acquired.com sends a form POST to the specified redirect URL with transaction status details. ### Method POST ### Endpoint `/redirect_url` (This is a conceptual endpoint for the POST destination) ### Parameters #### Request Body - **status** (string) - Required - The status of the transaction (e.g., "success", "tds_failed"). - **transaction_id** (string) - Required - The unique transaction reference assigned by Acquired.com. - **order_id** (string) - Required - The order ID value that was passed in the transaction request. - **timestamp** (integer) - Required - Exact date in UNIX timestamp format when the response was posted. - **reason** (string) - Optional - Provided for failed transactions, indicating the reason for failure (e.g., "low_confidence"). - **hash** (string) - Required - A calculated hash value to verify the integrity of the data. ### Request Example (Success) ``` status=success&transaction_id={{transaction_id}}&order_id={{order_id}}×tamp={{timestamp}}&hash={{hash}} ``` ### Request Example (Failure) ``` status=tds_failed&transaction_id={{transaction_id}}&order_id={{order_id}}×tamp={{timestamp}}&reason=low_confidence&hash={{hash}} ``` ``` -------------------------------- ### Create Customer Request (cURL) Source: https://docs.acquired.com/reference/customers-3 Example cURL request to create a customer. It demonstrates the POST method, URL, headers (accept, content-type), and the JSON payload for shipping information. This is a fundamental example for interacting with the API. ```shell curl --request POST \ --url https://test-api.acquired.com/v1/customers \ --header 'accept: application/json' \ --header 'content-type: application/json' \ --data '{ "shipping": { "address_match": false } }' ``` -------------------------------- ### Step 4: Validate Form Data Integrity Source: https://docs.acquired.com/docs/3d-secure Explains the process of calculating and verifying a hash value to ensure the authenticity and integrity of the data received at the redirect URL. ```APIDOC ## Hash Validation ### Description Validates the integrity of the form data received at the redirect URL by recalculating and comparing a hash value. ### Method N/A (This is a process, not an HTTP request) ### Endpoint N/A ### Process 1. **Concatenate Parameters**: Combine the following parameters in order: `status`, `transaction_id`, `order_id`, `timestamp`. Example: `executed1970f4e1-95da-4859-b275-e9ac83f05eb1your_unique_reference_11657183950` 2. **First SHA256 Encryption**: Apply SHA256 encryption to the concatenated string. Example: `4e9ce34004008830e672aa826efd5ddf56130ad127c279751135d48291b5f007` 3. **Append App Key**: Append your `app_key` to the resulting hash. Example: `4e9ce34004008830e672aa826efd5ddf56130ad127c279751135d48291b5f007app_key` 4. **Second SHA256 Encryption**: Apply SHA256 encryption to the string from step 3. Example: `4e7e127a6ab8e7c4d73100e0c959eb42e1d61adff6b641c6ea7e4690e44cbff0` 5. **Compare Hashes**: Compare the generated hash value with the `hash` value received in the POST request to the redirect URL. If they match, the data is verified. ``` -------------------------------- ### VRP Example Request Payload Source: https://docs.acquired.com/docs/pay-by-bank-in-hosted-checkout An example JSON payload demonstrating the baseline VRP structure, including transaction details, recurring payment configuration, and optional term settings. `transaction.capture` can be toggled to switch between scenarios. ```APIDOC ## Example Request The payload below shows the baseline VRP structure. Toggle `transaction.capture` to switch between **Store Credentials Only** and **Charge + Store Credentials** scenarios: ```json { "transaction": { "order_id": "vrp-001", "currency": "gbp", "amount": 10.00, "capture": false // Store Credentials Only -> set to true for Charge + Store }, "is_recurring": true, "payment": { "reference": "Monthly Plan" // optional; defaults to Company Name if omitted }, "configuration": { "variable_recurring_payment": { "type": "sweeping", "per_payment": { "amount": 100, "currency": "GBP" }, "periodic_limit": { "month": { "maximum_amount": 300, "alignment": "calendar", "currency": "GBP" } } } }, "recurring": { "term": { "start_date": "2025-09-01", "end_date": "2026-09-01" } // term is optional — omit if you don't need a validity window } } ``` ``` -------------------------------- ### Construct and Use Payment Link Source: https://docs.acquired.com/docs/set-up-integrate Constructs the full payment link by appending the generated `link_id` to the target environment URL. This link is then presented to the customer. ```APIDOC ### Construct the payment link Append the returned `{link_id}` to the environment you wish to target. ### Endpoint - **QA URL:** `https://test-pay.acquired.com/v1/{link_id}` - **Production URL:** `https://pay.acquired.com/v1/{link_id}` ### Description Share the resulting payment link with your customer through email, SMS, a website link, or other channels. ``` -------------------------------- ### Failed Transaction Redirect POST Data Example Source: https://docs.acquired.com/docs/3d-secure This example shows the format of data sent via POST to the redirect URL when EMV 3DS authentication fails. It includes the transaction status, ID, order ID, timestamp, reason for failure, and a hash for verification. ```text "status":"tds_failed","transaction_id":{{transaction_id}},"order_id":{{order_id}},"timestamp":{{timestamp}},"reason":"low_confidence","hash":"{{hash}} ``` -------------------------------- ### cURL GET Request Example for Transactions Source: https://docs.acquired.com/reference/transactions This snippet demonstrates how to make a GET request to the Acquired API to retrieve transaction details using cURL. It includes the base URL, the specific endpoint for a transaction, and necessary headers such as 'accept'. ```shell curl --request GET \ --url https://test-api.acquired.com/v1/transactions/transaction_id \ --header 'accept: application/json' ``` -------------------------------- ### POST /websites/acquired Source: https://docs.acquired.com/docs/build-your-own-ui-1 Initiates a single immediate payment authorization. This endpoint returns a URL for user redirection or a QR code for payment. It also specifies how to handle redirects and webhook notifications for payment status. ```APIDOC ## POST /websites/acquired ### Description Initiates a single immediate payment authorization. The response will contain a `url` for user redirection to authorize the payment or a `qr_code` image containing the authorization URL. The `expires_in` field indicates the validity period of the authorization URL or QR code. ### Method POST ### Endpoint /websites/acquired ### Parameters #### Request Body - **redirect_url** (string) - Required - The URL to which the user will be redirected after completing the payment. ### Request Example ```json { "redirect_url": "https://your-app.com/payment/callback" } ``` ### Response #### Success Response (200) - **url** (string) - The URL to redirect the user for payment authorization. - **qr_code** (string) - An image string representing the QR code for payment authorization. - **expires_in** (integer) - The time in seconds until the authorization link or QR code expires. #### Response Example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zwVipx34IJfwQSvghlPBDqJqC32Q57fwu9L90Wjebpg48a2XLvs45y166PMQf2VztP60r/t59nTZC8dkFaw0f9Q7PXh77IZTwQyjhh1DCD6FOn95b6PwqTl8P/L1Kjnl5lOfkzvl7dfXt71NYrd24jsDnD7bOrl84yDf+yrSquoZ9A59/ymM/hBJ+CCX8EEr4IdT75vb/0mT/n6o2D6d1H8qseP8w9hbDssROPmtuXb/1/Hnpw0d4/tsQC8buXo/9EEr4IZTwQyjhh1B3FvzuKPx8W52p3qdqreFJ2w/gg77VK/5UY/ibTqBvfvvwXbLxeLaP6i38QJzWk3/7Nfx7HvshlPBDKOGHUMIPoeaq/ZONKJ5YPp7z19IN2deBIx3v2tedQ33LxjrnVPUaesVbDKc1etrrnKFQj/0QSvghlPBDKOGHUEEFv8mu+H2rx365owOtXY2mdY11MfrXneF/WANvqu1vH9Sc/KE5p3ZdaPL+2fi747EfQgk/hBJ+CCX8EOrOgt9w5/zDZ7OvTSW+o3T3ra4n/0ZNg0d3hn/ZWN3+1rGlwncN+lYxXrv4d7xn8TOP/RBK+CGU8EMo4YdQCn4ThifGtg4KlHzqAoWdoHZVf+fCv7edy9rrHLfW5L8Vve7SWl1f2MjhL0ecxmM/hBJ+CCX8EEr4IVRjwe/8OvDeri97r89aX6O1c286075y48UrAvzMUN+EvhnvT+xd7XdyRIA/4rEfQgk/hBJ+CCX8EOq7Qgtk8p8fQgk/hBJ+CCX8EEr4IZTwQyjhh1DCD6GEH0IJP4QSfggl/BBK+CGU8EMo4YdQwg+hhB9CCT+EEn4IJfwQSvghlPBDqP8BurjpAWNIcjgAAAAASUVORK5CYII=", "expires_in": 600 } ``` ### Response #### Handling Redirects Upon successful payment, the user will be redirected to the `redirect_url` provided in the request. A form POST will be sent to this URL containing payment status details. #### Webhook Notifications Your application will also receive webhook notifications to update with the final status of each payment. Refer to the [webhook notifications documentation](https://docs.acquired.com/docs/webhook-notifications) for more details. ``` -------------------------------- ### Install Magento 2 Acquired.com Plugin Source: https://docs.acquired.com/docs/magento2 Commands to install the Acquired.com payment plugin for Magento 2 using Composer. This includes requiring the package, enabling the module, upgrading the setup, and flushing the cache. ```bash composer require acquired/module-payment bin/magento module:enable Acquired_Payment bin/magento setup:upgrade bin/magento cache:flush ``` -------------------------------- ### Get a list of support banks Source: https://docs.acquired.com/reference/pay-by-bank Retrieve a list of banks supported by the Pay by Bank solution. This is a starting point for a full API integration. ```APIDOC ## GET /v1/banks ### Description Retrieves a list of all supported banks for the Pay by Bank solution. ### Method GET ### Endpoint /v1/banks ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **banks** (array) - A list of bank objects. - **id** (string) - The unique identifier for the bank. - **name** (string) - The display name of the bank. #### Response Example ```json { "banks": [ { "id": "bank-123", "name": "Example Bank" }, { "id": "bank-456", "name": "Another Bank" } ] } ``` ``` -------------------------------- ### GET /transactions/{transaction_id} Source: https://docs.acquired.com/reference/transactions Retrieves details for a specific transaction using its ID. Supports various response examples including different payment methods and statuses. ```APIDOC ## GET /transactions/{transaction_id} ### Description Retrieves details for a specific transaction using its ID. Supports various response examples including different payment methods and statuses. ### Method GET ### Endpoint https://test-api.acquired.com/v1/transactions/{transaction_id} ### Parameters #### Path Parameters - **transaction_id** (string) - Required - The unique identifier of the transaction. ### Request Example ```bash curl --request GET \ --url 'https://test-api.acquired.com/v1/transactions/transaction_id' \ --header 'accept: application/json' ``` ### Response #### Success Response (200) - **status** (string) - The current status of the request. - **error_type** (string) - The type of error returned. Possible values: `unauthorized`. - **title** (string) - A human-readable message that provides more detail about the error. - **instance** (string) - Indicates where the error occurred. #### Response Example (JSON) ```json { "status": "completed", "transaction_id": "txn_12345", "amount": 100.50, "currency": "USD", "payment_method": "credit_card", "customer_id": "cust_abcde" } ``` #### Error Response (401) - **status** (string) - The current status of the request. - **error_type** (string) - enum: `unauthorized` - The type of error returned. - **title** (string) - A human-readable message that provides more detail about the error. - **instance** (string) - Indicates where the error occurred. #### Error Response Example (401 Unauthorized) ```json { "status": "error", "error_type": "unauthorized", "title": "Invalid API Key", "instance": "/v1/transactions/transaction_id" } ``` ``` -------------------------------- ### POST /payments/recurring - Recurring Payment Source: https://docs.acquired.com/docs/recurring-payments Processes a recurring payment using a previously stored `card_id`. This endpoint is used for subsequent transactions after the initial setup. ```APIDOC ## POST /payments/recurring ### Description Processes a recurring payment using a stored card identifier. ### Method POST ### Endpoint /payments/recurring ### Parameters #### Request Body - **transaction** (object) - Required - Transaction details. - **order_id** (string) - Required - Unique identifier for the order. - **amount** (number) - Required - The payment amount. - **currency** (string) - Required - The currency of the payment (e.g., 'gbp'). - **capture** (boolean) - Required - Whether to capture the payment immediately. - **payment** (object) - Required - Payment method details. - **card_id** (string) - Required - The ID of the stored card token obtained from an initial payment. - **reference** (string) - Optional - A custom reference for the payment. - **subscription_reason** (string) - Required - Reason for the recurring payment (e.g., 'recurring'). ### Request Example ```json { "transaction": { "order_id": "5c5fddcc-6a5c-400d-823b-920022b9fc51", "amount": 15.02, "currency": "gbp", "capture": true }, "payment": { "card_id": "00cfdbdc-5e81-4ce2-adc1-14920120618f", "reference": "Custom Ref 001", "subscription_reason": "recurring" } } ``` ### Response #### Success Response (200) - **transaction_id** (string) - Unique ID for the transaction. - **status** (string) - Status of the transaction (e.g., 'success'). - **issuer_response_code** (string) - Response code from the card issuer. - **check** (object) - Verification checks performed. - **avs_line1** (string) - AVS check result for address line 1. - **avs_postcode** (string) - AVS check result for postcode. - **links** (array) - Links related to the transaction. - **rel** (string) - Relationship of the link. - **href** (string) - URL for the link. #### Response Example ```json { "transaction_id": "673bcc81-3c71-4bf6-80c0-5269ad8b974b", "status": "success", "issuer_response_code": "00", "check": { "avs_line1": "matched", "avs_postcode": "matched" }, "links": [ { "rel": "self", "href": "/v1/transactions/673bcc81-3c71-4bf6-80c0-5269ad8b974b" } ] } ``` ``` -------------------------------- ### Create Customer Request (Node.js) Source: https://docs.acquired.com/reference/customers-3 Example Node.js code using the 'axios' library to create a customer. It shows how to set up the request URL, headers, and the JSON body, including optional fields. This snippet is useful for backend integrations. ```javascript const axios = require('axios'); const createCustomer = async () => { try { const response = await axios.post('https://test-api.acquired.com/v1/customers', { reference: 'YOUR_REFERENCE', first_name: 'John', last_name: 'Doe', dob: '1990-01-01', shipping: { address_match: false } }, { headers: { 'Content-Type': 'application/json', 'Company-Id': 'YOUR_COMPANY_ID' } }); console.log('Customer created:', response.data); } catch (error) { console.error('Error creating customer:', error.response.data); } }; createCustomer(); ``` -------------------------------- ### Create Customer Request (Python) Source: https://docs.acquired.com/reference/customers-3 Example Python code using the 'requests' library to create a customer. It shows how to construct the POST request with headers and a JSON payload. This is a common approach for Python developers. ```python import requests import json url = 'https://test-api.acquired.com/v1/customers' company_id = 'YOUR_COMPANY_ID' headers = { 'Content-Type': 'application/json', 'Company-Id': company_id } data = { 'reference': 'YOUR_REFERENCE', 'first_name': 'Alice', 'last_name': 'Smith', 'dob': '1995-12-31', 'shipping': { 'address_match': True } } try: response = requests.post(url, headers=headers, data=json.dumps(data)) response.raise_for_status() # Raise an exception for bad status codes print('Customer created successfully:') print(response.json()) except requests.exceptions.RequestException as e: print(f'Error creating customer: {e}') if e.response is not None: print(f'Response data: {e.response.json()}') ``` -------------------------------- ### Create Payment Request Source: https://docs.acquired.com/docs/build-your-own-ui-1 Submit a POST request to create a payment request for a customer. You will need to populate the `aspsp_id` with the customer's preferred bank. ```APIDOC ## POST /websites/acquired/payment ### Description Creates a payment request once a customer has selected their bank. ### Method POST ### Endpoint /websites/acquired/payment ### Parameters #### Request Body - **transaction** (object) - Required - Details of the transaction. - **order_id** (string) - Required - Your unique reference for the order. - **amount** (number) - Required - The amount of the transaction. - **currency** (string) - Required - The currency of the transaction (e.g., GBP). - **payment** (object) - Required - Details of the payment. - **single_immediate_payment** (object) - Required - Specifics for a single immediate payment. - **aspsp_id** (string) - Required - The customer's preferred bank identifier. - **reference** (string) - Required - A custom reference for the payment. ### Request Example ```json { "transaction": { "order_id": "your_unique_reference_1", "amount": 14.99, "currency": "GBP" }, "payment": { "single_immediate_payment": { "aspsp_id": "hsbc", "reference": "Custom Ref 001" } } } ``` ### Response #### Success Response (200) - **transaction_id** (string) - The unique identifier for the transaction. - **status** (string) - The current status of the payment (e.g., "awaiting_authorization"). - **timestamp** (integer) - The timestamp of the transaction. - **auth_type** (string) - The type of authorization required (e.g., "redirect"). - **url** (string) - The URL for payment authorization. - **qr_code** (string) - A data URI for a QR code. #### Response Example ```json { "transaction_id": "2323386b-73f6-464a-a64e-070635ba07c5", "status": "awaiting_authorization", "timestamp": 1645093603, "auth_type": "redirect", "url": "https://verify.monzo.com/open-banking/authorize?client_id=oauth2client_0000AFMLS7NttWAyy8tAu1&response_type=code+id_token&scope=openid+payments&redirect_uri=https%3A%2F%2Fqahpp2.acquired.com%2Fpisp%2Fredirect&request=eyJhbGciOiJQUzI1NiIsImtpZCI6ImYya0ZwQlJDNTByaWtzMW9JTlF1cnFzdWpIcyIsInR5cCI6IkpXUyJ9.eyJjb25zZW50cmVmaWQiOiJvYnBpc3Bkb21lc3RpY3BheW1lbnRjb25zZW50XzAwMDBBR1o0d2llSW1mYUpzSjVDejMiLCJzY29wZSI6Im9wZW5pZCBwYXltZW50cyIsImFjcl92YWx1ZXMiOiJ1cm46b3BlbmJhbmtpbmc6cHNkMjpjYSIsImlzcyI6Im9hdXRoMmNsaWVudF8wMDAwQUZNTFM3TnR0V0F5eTh0QXUxIiwiYXVkIjoiaHR0cHM6XC9cL2FwaS5tb256by5jb21cL29wZW4tYmFua2luZ1wvIiwiY2xhaW1zIjp7ImlkX3Rva2VuIjp7ImFjciI6eyJlc3NlbnRpYWwiOnRydWV9LCJvcGVuYmFua2luZ19pbnRlbnRfaWQiOnsidmFsdWUiOiJvYicgcGlzcGRvbWVzdGljcGF5bWVudGNvbnNlbnRfMDAwMEFHWjR3aWVJbWZhSnNKNUN6MyIsImVzc2VudGlhbCI6dHJ1ZX19LCJ1c2VyaW5mbyI6eyJhY3IiOnsiZXNzZW50a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/7Pxmr7JR95uKmL1yP+oHUF55JVFZ78zRt/dz7w2A+hhB9CCT+EEn4Itbng1zfjfXJW/KTJK7ZW3VyosS2PFlX9zVETq8fM9e3/7BXLb1T58mos15NL3kd46VXdqO+3YGxkwWM/hBJ+CCX8EEr4IdQL+vZznwvujb5TeFknn2VNs+urLl9hN/u+vTft68nfFF6Nvj5LC9tptbZ3nXyAMsIPoYQfQgk/hHrB3P6N865b55xXla/GFF6NtU/1vX2wsQS4dlUP6eSztyr+0H0vZjzUeuJ9tf2Ntt8qM9fHYz+EEn4IJfwQSvgh1Gi1/6i6zvaDaTqAV5TcqnY3eQ23VwHLHde3f6HjTSt9cn42efH7hkJLzmJthKvpYNZ47IdQwg+hhB9CCT+EGl2ld21TR/VUv6Z0d+u6Bn1KVtf9pV3l4bm+/adVxQv75Iz1Zqlac7b1uxj7Ib5y5dxJHvshlPBDKOGHUMIPoS7p29/XB2ZyyyWlsuXRkMn59iUtQJapC/6ws5PPwh883xe/UfV9XaxkRYnCO1PffqCM8EMo4YdQwg+hds7t316o234AH5y28OtR/e2/zR7P4ffGQX37X6FvHdiSuf2vWGF2zeGr4sauH+GxH0IJP4QSfggl/BAqqOD3uln6T5xWlH6ite/T62w8hdG5/Wufaup483nLhcf85afW/mZZ3zUs2dfap6rulu334S4e+yGU8EMo4YdQwg+hNq/Su7HMs+ZhCefwbjat3X72Vrmq6q9rOzpn6u4TQUN9X1r+5u5YfaDkAA6vbx/IKr3ANOGHUMIPoYQfQm0u+B1eHyqs7e/91PnGqvRru96r6eWR0fCXVIaravLL+lYfHus501dh3j76MOZdo3q/5LEfQgk/hBJ+CCX8EGrz3P6+Tz3ZzlrN5o0VrMkVAS6ohP3S2Pc+tiNz+3+nqnZ9TQ28r/dR3zsCt/4Y/T2P/RBK+CGU8EMo4YdQO1fp3e7LSvXweb30MvI3Xt+3/6GxNXBbL2jTGwpVffJfcQ1L9I3FfDbctGvmn5DHfggl ``` -------------------------------- ### POST /single-immediate-payment Source: https://docs.acquired.com/reference/create-single-immediate-payment Initiates a single immediate payment by requesting consent from the ASPSP and generating a user authentication URL. ```APIDOC ## POST /single-immediate-payment ### Description Request consent from the ASPSP and generate a URL for the user to authenticate themselves. ### Method POST ### Endpoint /v1/single-immediate-payment ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **transaction** (object) - Required - Details of the transaction. - **order_id** (string) - Required - Unique reference assigned by you for the payment request. Min length 2, Max length 50. Pattern: `^[\w\-]*$`. Example: `1f1f2a61-5b68-4725-a0ce-9560514ec00b` - **amount** (number) - Required - The total amount that you want to charge. Format: float. Example: `15.02` - **currency** (string) - Required - ISO 4217 currency code in lower case. Allowed values: `gbp`. Example: `GBP` - **payment** (object) - Required - Details about the payment. - **single_immediate_payment** (object) - Required - Specifics for a single immediate payment. - **aspsp_id** (string) - Required - The unique identifier assigned by Acquired.com of the bank which the user wants to pay with. Allowed values: `santander`, `bank_of_scotland`, `first_direct`, `halifax`, `hsbc`, `lloyds`, `monzo`, `nationwide`, `natwest`, `starling_bank`, `revolut`, `rbs`, `tsb`. - **context** (string) - Required - Detail on the type of service you are offering to the user. Allowed values: `bill_payment`, `ecommerce_goods`, `ecommerce_services`, `other`, `party_to_party`. - **reference** (string) - Required - The reference that will appear on the account holders bank statement. ### Request Example ```json { "transaction": { "order_id": "1f1f2a61-5b68-4725-a0ce-9560514ec00b", "amount": 15.02, "currency": "GBP" }, "payment": { "single_immediate_payment": { "aspsp_id": "santander", "context": "ecommerce_goods", "reference": "ORDER-12345" } } } ``` ### Response #### Success Response (200) - **id** (string) - The unique identifier for the payment initiation request. - **status** (string) - The current status of the payment. - **amount** (number) - The total amount of the payment. - **currency** (string) - The currency of the payment. - **authorisation_url** (string) - The URL for the user to authenticate the payment. #### Response Example ```json { "id": "pay_in_q443cgrn8s4v", "status": "PENDING_AUTHORISATION", "amount": 15.02, "currency": "GBP", "authorisation_url": "https://sandbox.acquired.com/authorise/a770c070-e317-4601-aa44-6c2b68453e19" } ``` ```