One-Click Payment API

One-Click Payment API

This endpoint allows you to charge a customer’s card using a previously generated token (from the tokenize
endpoint). It creates a payment transaction similar to the standard card payment initiation, but instead of
raw card details, you supply the token.


Overview

This endpoint mirrors the /payments/card flow but replaces the card object with a cardToken. All redirects, webhooks, risk checks and 3DS handling remain unchanged.
The cardToken is obtained via the Tokenization API, and you supply the same rich metadata you’d use for a standard Card-Sale:

  • Risk & SCA via device
  • Order tracking via order
  • Customer info via billingDetails
  • Custom flags via metadata

API Endpoint

Live

POST https://live.facilero.com/api/v1/payments/card/charge

Sandbox

POST https://sandbox.facilero.com/api/v1/payments/card/charge

Request Headers

  • Content-Type: application/json
  • Authorization: Bearer <AUTH_TOKEN>
  • Referer: <REFERER_URL>

Request Body

FieldTypeRequiredDescription
requestIdStringYesUnique ID for the payment request.
midStringYesMerchant account ID to which the transaction will be associated.
cardTokenStringYesVaulted token obtained from the Tokenization API.
amountStringYesTransaction amount as a string. Follow currency precision rules.
currencyStringYesISO 4217 currency code (e.g., USD, EUR).
langStringNoLanguage code for communication (e.g., en, fr).
callbackUrlStringYesURL for receiving transaction status updates. Required for 3DS flows.
successRedirectUrlStringYesURL to redirect the customer after a successful payment (3DS).
failureRedirectUrlStringYesURL to redirect the customer after a failed payment (3DS).
billingDetailsObject (BillingDetails)NoCustomer’s name, address, contact info. If omitted, uses billing details from the original tokenization request.
orderObject (Order)NoOrder date, ID, title, site, customer name, domain. Defaults to empty if omitted.
deviceObject (Device)NoIP, UA, headers, 3DS device data. Defaults to server IP if omitted.
kycVerifiedBooleanNoIndicates if the customer has already been KYC-verified.
previousPaymentCountLongNoNumber of previous payments by this customer.
metadataMap<String, String>NoAdditional key/value metadata for custom use.

Note: The BillingDetails, Order, and Device objects are exactly the same as in the Card-Sale API. Refer to those definitions for field-level details.

Tip: Since billing details are stored during tokenization, you can omit billingDetails on subsequent charges — the system will automatically use the details provided when the card was tokenized. Pass billingDetails only if you need to override them for a specific charge (e.g., the customer updated their address).


Example Request Body

{
  "requestId":           "req-oneclick-456",
  "mid":                 "merchant456",
  "cardToken":           "tok_abc123xyz",
  "amount":              "50.00",
  "currency":            "EUR",
  "lang":                "en",
  "callbackUrl":         "https://yourserver.com/callback",
  "successRedirectUrl":  "https://yourserver.com/success",
  "failureRedirectUrl":  "https://yourserver.com/failure",
  "billingDetails": {
    "firstName":      "Jane",
    "lastName":       "Doe",
    "address1":       "123 Main St",
    "city":           "Dublin",
    "state":          "Leinster",
    "country":        "IE",
    "postalCode":     "D01X0F5",
    "phone":          "+353851234567",
    "email":          "[email protected]",
    "dateOfBirth":    "1990-05-20"
  },
  "order": {
    "date":       "2025-07-14",
    "orderId":    "ord-101",
    "title":      "One-Click Purchase",
    "siteId":     "site001",
    "name":       "Jane Doe",
    "domainName": "example.com"
  },
  "device": {
    "ip":                "203.0.113.42",
    "userAgent":         "Mozilla/5.0",
    "accept":            "*/*",
    "acceptLanguage":    "en-IE",
    "javaEnabled":       true,
    "javaScriptEnabled": true,
    "deviceLanguage":    "en",
    "colorDepth":        "24",
    "screenHeight":      "1080",
    "screenWidth":       "1920",
    "deviceTimezone":    "Europe/Dublin"
  },
  "kycVerified":         true,
  "previousPaymentCount":5,
  "metadata": {
    "customKey1": "customValue1",
    "customKey2": "customValue2"
  }
}

Response Body

FieldTypeRequiredDescription
transactionIdStringYesUnique identifier for the transaction.
transactionStatusStringYesCurrent status (NEW, PENDING, SUCCEED, FAILED, CUSTOMER_VERIFICATION).
declineCodeIntNoScheme decline code if the transaction fails.
challengeUrlStringNoURL for the 3D Secure challenge, if required.
challengeUrlIframeStringNoIframe-compatible 3DS URL, if supported.

Example Success Response

{
  "transactionId":     "txn7890",
  "transactionStatus": "SUCCEED"
}

Example 3DS Challenge Response

{
  "transactionId":      "txn11223",
  "transactionStatus":  "CUSTOMER_VERIFICATION",
  "challengeUrl":       "https://secure-3ds-url.com/challenge",
  "challengeUrlIframe": "https://secure-3ds-url.com/iframe-challenge"
}

Merchant Callback DTO

Identical to the Card-Sale callback.

Explanation:
By substituting cardToken for the raw card object in your existing Card-Sale integration, you maintain the exact same data model for billing, order tracking, device risk assessment, 3DS flows, and webhooks—while reducing your PCI footprint to token-only operations.


Error Responses

HTTP StatusScenarioExample errorMessage
400Token not found, expired, or inactiveToken not found or expired: tok_xxxx****
400Billing details missing from both request & tokenBilling details missing from both request and token
400Invalid or missing required fieldsMissing required field: cardToken

Important Notes

  • The response format, webhooks, and transaction lifecycle are identical to the standard card payment flow — same HppPaymentResponse, same callback DTOs, same 3DS handling.
  • After token resolution, the charge follows the exact same PSP orchestration pipeline as a regular /v1/payments/card request.
  • In sandbox, test cards from the Tokenization docs determine charge behavior (success, 3DS, decline).