SettleFlow API
API Reference

POST /v1/payment/direct

Create a card payment (E-PRO compatible)

Authorize and capture a card payment. Returns a 3DS redirect URL when a challenge is required. See the Payment guide for the narrative version.

Request

POST /v1/payment/direct HTTP/1.1
Host: api.settleflow.io
Content-Type: application/json
epro-api-key: sk_test_...

Body — required fields

FieldTypeDescription
AmountstringInteger in smallest currency unit (e.g. "1234" = €12.34).
UidstringYour stable customer identifier (max 64).
TidstringYour unique transaction / order reference (max 64).
EmailstringCustomer email.
CardNumberstring13–19 digits, Luhn-checked.
CardMonthstringExpiry month, 112 (1–2 digits).
CardYearstringExpiry year (2 or 4 digits).
CardCVVstring3 or 4 digits.

Body — optional fields

FieldTypeDescription
FirstnamestringCustomer first name (max 64).
LastnamestringCustomer last name (max 64).
AddressstringStreet address (max 128).
ZipCodestringPostal code (max 16).
CitystringCity name (max 64).
CountrystringISO 3166-1 Alpha-3 (e.g. FRA).
PhonestringPhone number (max 32).
BirthDatestringYYYY-MM-DD.
BirthPlacestringBirth city / place (max 64).
ClientIpstringCustomer IP address (max 15).
DescriptionstringOrder description (max 256).
CardOwnerstringCardholder name (max 64).
ReturnUrlURLBrowser redirect after a 3DS challenge. Required if 3DS=yes.
3DSyes/noForce 3D Secure authentication.
CallbackUrlURLWebhook URL for async notifications on this payment.
OneClickyes/noStore the card token for later one-click payments.
OriginalAmountstringAmount before currency conversion.
OriginalCurrencystringISO 4217 code for OriginalAmount.
ConvertCurrencyyes/noEnable currency conversion (EUR accounts only).
CustomerIdstringMerchant-side customer ID (stored for reconciliation).

Common casing variants (firstName, FirstName, firstname, Ip, IP, clientIp…) are accepted — see Field-name normalization.

Success response

{
  "Code": 0,
  "Result": {
    "OperationType": "payment",
    "Status": "captured",
    "Tid": "order-2026-001",
    "Reference": "pr_abc123",
    "Amount": 49.99,
    "Currency": "EUR",
    "UserId": "customer-42",
    "Message": "Payment was successful",
    "Date": "2026-04-22 14:30:45",
    "3DSecure": "no"
  }
}

Result fields

FieldTypeDescription
OperationTypestringAlways "payment".
Statusenumauthorized, captured, failed, cancelled, pending, rejected_pw.
TidstringEchoed from the request.
ReferencestringSettleFlow payment request ID.
AmountnumberMajor currency units.
CurrencystringISO 4217 currency code.
UserIdstringEcho of Uid.
MessagestringHuman-readable outcome.
DatestringYYYY-MM-DD HH:mm:ss (UTC).
3DSecureyes/noWhether 3DS was applied.
3DSecureUrlstringRedirect URL — present only when 3DS challenge is required.
AliasstringStored card alias — present only when OneClick=yes accepted.

Error response

{ "Code": 206, "Error": "Invalid parameter CardNumber, check format or Luhn algorithm" }

Common error codes: 3, 4, 5, 8, 22, 104, 106, 200222, 300. See Error codes for the full catalog.

Examples

cURL

curl -X POST https://api.settleflow.io/v1/payment/direct \
  -H "epro-api-key: sk_test_..." \
  -H "Content-Type: application/json" \
  -d '{
    "Amount": "4999",
    "Uid": "customer-42",
    "Tid": "order-2026-001",
    "Email": "jane@example.com",
    "CardNumber": "4111111111111111",
    "CardMonth": "12",
    "CardYear": "2028",
    "CardCVV": "123",
    "ReturnUrl": "https://your-shop.com/payment/return",
    "CallbackUrl": "https://your-shop.com/webhooks/settleflow"
  }'

Node.js

const res = await fetch("https://api.settleflow.io/v1/payment/direct", {
  method: "POST",
  headers: {
    "epro-api-key": process.env.SETTLEFLOW_API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    Amount: "4999",
    Uid: "customer-42",
    Tid: "order-2026-001",
    Email: "jane@example.com",
    CardNumber: "4111111111111111",
    CardMonth: "12",
    CardYear: "2028",
    CardCVV: "123",
    ReturnUrl: "https://your-shop.com/payment/return",
    CallbackUrl: "https://your-shop.com/webhooks/settleflow",
  }),
});
const { Code, Result, Error: errMsg } = await res.json();
if (Code !== 0) throw new Error(`[${Code}] ${errMsg}`);

PHP

<?php
$ch = curl_init('https://api.settleflow.io/v1/payment/direct');
curl_setopt_array($ch, [
  CURLOPT_POST => true,
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => [
    'epro-api-key: ' . getenv('SETTLEFLOW_API_KEY'),
    'Content-Type: application/json',
  ],
  CURLOPT_POSTFIELDS => json_encode([
    'Amount'      => '4999',
    'Uid'         => 'customer-42',
    'Tid'         => 'order-2026-001',
    'Email'       => 'jane@example.com',
    'CardNumber'  => '4111111111111111',
    'CardMonth'   => '12',
    'CardYear'    => '2028',
    'CardCVV'     => '123',
    'ReturnUrl'   => 'https://your-shop.com/payment/return',
    'CallbackUrl' => 'https://your-shop.com/webhooks/settleflow',
  ]),
]);
$body = json_decode(curl_exec($ch), true);
if ($body['Code'] !== 0) {
    throw new \RuntimeException("[{$body['Code']}] {$body['Error']}");
}

On this page