Payment Execution API

Submit cross-border payment instructions, track settlement status, and manage partner integrations.

Multi-Channel Payment Submission

The Payment Execution API supports multiple submission channels to accommodate different bank and PSP integration requirements:

🔌
API (REST)
🌐
SWIFT
📁
SFTP
📧
Email
POST/api/v1/payments/instructions

Submit a new payment instruction for execution via the selected settlement route and channel.

Request Body

{
  "amount": 50000.00,
  "currency": "USD",
  "beneficiary": {
    "name": "Acme Corp Ltd",
    "country": "GB",
    "bankAccount": {
      "accountNumber": "12345678",
      "bankName": "Barclays Bank",
      "swiftBic": "BARCGB22",
      "country": "GB"
    },
    "address": {
      "street": "123 Business Park",
      "city": "London",
      "postalCode": "EC1A 1BB",
      "country": "GB"
    }
  },
  "purpose": {
    "code": "trade_settlement",
    "description": "Invoice INV-2025-0001 for electronics shipment"
  },
  "settlementRoute": {
    "routeId": "route_ng_gb_swift",
    "partnerPreference": "wise",
    "channelPreference": "api",
    "settlementTimeline": "t_plus_2"
  },
  "valueDate": "2026-01-10",
  "clientReference": "PAY-XYZ123"
}

Request Parameters

FieldTypeRequiredDescription
amountnumberYesPayment amount in the specified currency
currencystringYesISO 4217 currency code (USD, EUR, GBP, etc.)
beneficiaryobjectYesBeneficiary details including bank account
purpose.codestringYesPayment purpose: trade_settlement, service_payment, etc.
settlementRouteobjectYesRoute and channel preferences
valueDatestringNoRequested settlement date (ISO 8601)
clientReferencestringNoYour unique reference for this payment

Response

{
  "success": true,
  "data": {
    "instructionId": "instr_abc123def456",
    "status": "submitted",
    "clientReference": "PAY-XYZ123",
    "submittedAt": "2026-01-08T10:30:00Z",
    "settlementDetails": {
      "expectedSettlementDate": "2026-01-10",
      "settlementTimeline": "t_plus_2",
      "partnerName": "Wise Business",
      "channel": "api"
    },
    "fees": {
      "estimated": 25.00,
      "currency": "USD"
    }
  }
}
GET/api/v1/payments/instructions/:instructionId

Retrieve the current status and details of a payment instruction.

Path Parameters

ParameterTypeDescription
instructionIdstringUnique payment instruction identifier

Response

{
  "success": true,
  "data": {
    "instructionId": "instr_abc123def456",
    "status": "processing",
    "clientReference": "PAY-XYZ123",
    "amount": 50000.00,
    "currency": "USD",
    "submittedAt": "2026-01-08T10:30:00Z",
    "lastUpdatedAt": "2026-01-08T14:15:00Z",
    "settlementDetails": {
      "expectedSettlementDate": "2026-01-10",
      "settlementTimeline": "t_plus_2",
      "partnerReference": "WISE-REF-789"
    },
    "statusHistory": [
      {
        "status": "submitted",
        "timestamp": "2026-01-08T10:30:00Z"
      },
      {
        "status": "accepted",
        "timestamp": "2026-01-08T10:31:00Z",
        "message": "Payment accepted by Wise"
      },
      {
        "status": "processing",
        "timestamp": "2026-01-08T14:15:00Z",
        "message": "Payment is being processed"
      }
    ]
  }
}
PUT/api/v1/payments/instructions/:instructionId/status

Settlement partners use this endpoint to report status changes. Requires partner authentication.

Request Body

{
  "status": "processing",
  "partnerReference": "SWIFT-REF-123",
  "timestamp": "2026-01-08T11:00:00Z",
  "details": {
    "message": "Payment accepted by correspondent bank",
    "bankReference": "CORR-456"
  }
}

Status Values

StatusDescription
pendingInstruction received, awaiting submission
submittedSubmitted to settlement partner
acceptedAccepted by settlement partner
processingBeing processed by banking network
settledSettlement confirmed
failedPayment failed
cancelledCancelled before settlement
returnedFunds returned after settlement
POST/api/v1/payments/instructions/:instructionId/settlement

Partners confirm final settlement of the payment with actual amounts and fees.

Request Body

{
  "confirmedAt": "2026-01-10T14:30:00Z",
  "settlementReference": "SETTLE-XYZ789",
  "actualAmount": 50000.00,
  "actualCurrency": "USD",
  "beneficiaryReceived": {
    "amount": 41250.00,
    "currency": "GBP"
  },
  "exchangeRate": {
    "rate": 0.825,
    "timestamp": "2026-01-10T14:30:00Z"
  },
  "fees": {
    "amount": 25.00,
    "currency": "USD",
    "breakdown": [
      { "type": "transfer_fee", "amount": 15.00 },
      { "type": "swift_fee", "amount": 10.00 }
    ]
  }
}
GET/api/v1/payments/track

Track multiple payments in a single request. Useful for dashboard displays and batch monitoring.

Query Parameters

ParameterTypeDescription
instructionIdsstringComma-separated list of instruction IDs (max 50)
statusstringFilter by status (optional)
fromDatestringFilter by submission date (optional)

Response

{
  "success": true,
  "data": {
    "instructions": [
      {
        "instructionId": "instr_abc123",
        "status": "settled",
        "amount": 50000.00,
        "currency": "USD",
        "settlementDetails": {
          "settledAt": "2026-01-10T14:30:00Z"
        }
      },
      {
        "instructionId": "instr_def456",
        "status": "processing",
        "amount": 25000.00,
        "currency": "EUR",
        "settlementDetails": {
          "expectedSettlementDate": "2026-01-11"
        }
      }
    ],
    "summary": {
      "total": 2,
      "byStatus": {
        "settled": 1,
        "processing": 1
      }
    }
  }
}

Settlement Timelines

TimelineDescriptionTypical Use
instantReal-time settlementP2P transfers, urgent payments
same_daySame business dayUrgent trade settlements
t_plus_1Next business dayStandard urgent payments
t_plus_2Two business daysStandard trade settlements
t_plus_nCustom timelineSpecial arrangements

Webhook Notifications

Heydeo sends webhook notifications to your registered endpoint for important status changes. All webhooks are signed using HMAC-SHA256 for verification.

Webhook Events

EventDescription
payment.submittedInstruction submitted to partner
payment.acceptedPartner accepted the instruction
payment.processingPayment is being processed
payment.settledSettlement confirmed
payment.failedPayment failed
payment.returnedFunds returned after settlement

Webhook Payload

{
  "event": "payment.status_changed",
  "timestamp": "2026-01-08T11:00:00Z",
  "data": {
    "instructionId": "instr_abc123",
    "status": "processing",
    "previousStatus": "accepted",
    "clientReference": "PAY-XYZ123"
  },
  "signature": "sha256=a1b2c3d4e5f6..."
}

Signature Verification

import { createHmac } from 'crypto'

function verifyWebhook(
  payload: string,
  signature: string,
  secret: string
): boolean {
  const expected = `sha256=${
    createHmac('sha256', secret)
      .update(payload)
      .digest('hex')
  }`
  return signature === expected
}

Error Codes

CodeHTTPDescription
INVALID_REQUEST400Request validation failed
UNAUTHORIZED401Authentication required
FORBIDDEN403Insufficient permissions
NOT_FOUND404Payment instruction not found
DUPLICATE409Duplicate instruction (idempotency)
COMPLIANCE_BLOCK422Blocked by compliance rules
RATE_LIMIT429Too many requests

📊 Rate Limits

POST /payments/instructions:
100 requests/min
GET /payments/instructions/*:
300 requests/min
PUT /*/status (partner):
500 requests/min
GET /payments/track:
60 requests/min