Transactions

Process an online transaction v3

API to process an online transaction v3. <br><strong>Access Token Required scope:</strong> transactions/online/create

post/v3/transactions/online

Request

Headers

Idempotency-Keystring required

A unique key to identify the request. If the request is repeated with the same key, the same response will be returned. If the request is repeated with a different key or without a key, a new transaction will be created.

User-Agentstring required
Example:YourCompany-Integration/1.0

Identifies your integration, for example YourCompany-Integration/1.0. Requests without a User-Agent can be blocked by our firewall before they reach the API.

Request body

initiator'CUSTOMER' | 'MERCHANT' enum required

Identifies which actor initiated the transaction, the customer (such as in an immediate sale) or the merchant (such as in a previously pre-authorized capture or a recurrent payment after the initial payment). Will default to customer if not provided. This is primarily used to determine whether the consumer is present for the transaction and therefore SCA/3DS may be used.

merchant_reference_idstring

An identifier that can be used to reference the transaction on the merchant's side. Overrides 'source_reference_id

redirect_urlstring

URL to redirect the customer to after 3DS completes in case 3DS will be web based. Will be shared with the 3DS provider.

store_payment_methodboolean

When set to true, the payment method will be tokenized and a token_id returned in the response for future use.

store_idstring uuid required

The unique identifier of a store

type'SALE' | 'PRE_AUTHORISATION' | 'ACCOUNT_VERIFICATION' enum required

The transaction type. Use SALE for standard payments, PRE_AUTHORISATION to reserve funds for later capture, or ACCOUNT_VERIFICATION to verify a card and optionally tokenize it without charging the customer.

Example request

{
  "amount": {
    "currency": "GBP",
    "value": 100
  },
  "browser_data": {
    "accept_language": "en-GB,en;q=0.9,pt;q=0.8,pt-PT;q=0.7,nl;q=0.6",
    "ip_address": "127.0.0.1",
    "screen_height": 1080,
    "screen_width": 1920,
    "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64)"
  },
  "billing_address": {
    "name": "John Doe",
    "country": "GB",
    "city": "London",
    "state": "Greater London",
    "street_address_line1": "123 High Street",
    "street_address_line2": "Flat 4",
    "zipcode": "SW1A 1AA"
  },
  "cardholder": {
    "name": "John Doe"
  },
  "customer_contact": {
    "phone_number": "+447123456789",
    "email": "john.doe@example.com"
  },
  "initiator": "CUSTOMER",
  "line_items": [
    {
      "description": "Product Name",
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "quantity": 2,
      "unit_price": 1000
    }
  ],
  "merchant_reference_id": "1234567890",
  "payment_method": {
    "card": {
      "cvc": "123",
      "expiry_month": "02",
      "expiry_year": "2030",
      "number": "4111111111111111"
    },
    "type": "CARD"
  },
  "redirect_url": "https://mywebsite.com/processing",
  "shipping_address": {
    "name": "Jane Doe",
    "country": "GB",
    "city": "Manchester",
    "state": "Greater Manchester",
    "street_address_line1": "456 Oak Avenue",
    "zipcode": "M1 1AA"
  },
  "store_id": "7a3f2c21-5d6e-4637-8d8a-1f178d4d2a0e",
  "store_payment_method": true,
  "transaction_context": {
    "payment_link_id": "1e2d4f80-9c3e-4f5b-83aa-9e8d2b6a6c49",
    "session_id": "1e2d4f80-9c3e-4f5b-83aa-9e8d2b6a6c49"
  },
  "type": "SALE"
}

Response

New transaction has been created and processed by host

type'ONLINE_TRANSACTION' | 'REDIRECT_TRANSACTION_RESPONSE'

Example response

{
  "online_transaction": {
    "authentication_id": "5f7b1a3a-3b7a-4b1a-9b1a-3a3b7a4b1a9b",
    "created_at": "2022-03-01T15:29:59Z",
    "issuer_result": {
      "approval_code": "123456",
      "response_code": "00"
    },
    "status": "SUCCESS",
    "token_response": {
      "token_id": "5f7b1a3a-3b7a-4b1a-9b1a-3a3b7a4b1a9b",
      "token_status": "SUCCESS"
    },
    "transaction_id": "5f7b1a3a-3b7a-4b1a-9b1a-3a3b7a4b1a9b",
    "updated_at": "2022-03-01T15:35:00Z"
  },
  "type": "ONLINE_TRANSACTION"
}

Changes