Schema & Sample Payloads

Quick reference for transaction request/response structure. Use these samples for testing in Postman, curl, or your integration code.

Transaction Request Structure

Every transaction follows the same schema — only the method, ccy, and reqDetails change based on what you're doing.

{
  "extRefId": "your-unique-ref-123",
  "note": "Optional internal note",
  "deductNetworkFeesFromDest": false,
  "sourceReq": {
    "ccy": "BTC",
    "method": "neutronpay",
    "amtRequested": 0.001,
    "reqDetails": {},
    "kyc": { }
  },
  "destReq": {
    "ccy": "BTC",
    "method": "lightning",
    "reqDetails": {
      "paymentRequest": "lnbc..."
    },
    "kyc": { }
  },
  "sourceOfFunds": {
    "purpose": 1,
    "source": 5,
    "relationship": 3
  }
}

Top-Level Fields

FieldTypeRequiredDescription
extRefIdstring❌Your own reference ID — must be unique per transaction
notestring❌Internal note (not sent to recipient)
deductNetworkFeesFromDestboolean❌If true, fees are deducted from the sent amount
sourceReqobject✅Where funds come from
destReqobject✅Where funds go to
sourceOfFundsobject❌Required only for fiat payouts

sourceReq / destReq Fields

FieldTypeDescription
ccystringCurrency code ("BTC", "USDT", "VND", "USD", etc.)
methodstringPayment method (see table below)
amtRequestednumberAmount — set on one side only
reqDetailsobjectMethod-specific details (address, invoice, bank info, etc.)
kycobjectKYC info — only required for fiat payouts

Payment Methods

MethodDirectionDescription
neutronpaySource or DestInternal Neutron wallet
lightningSource or DestLightning Network
on-chainSource or DestBitcoin on-chain
tronDest onlyUSDT via TRON (TRC-20)
ethDest onlyUSDT via Ethereum (ERC-20) — coming soon
vnd-instantDest onlyVietnamese Dong bank payout

reqDetails by Method

MethodreqDetailsExample
neutronpay{} (empty)—
lightning (send){ "paymentRequest": "lnbc..." }Bolt11 invoice
lightning (receive){} (empty)Invoice generated in response
on-chain (send){ "address": "bc1q..." }Bitcoin address
on-chain (receive){} (empty)Address generated in response
tron{ "address": "T..." }TRON address
vnd-instant{ "bankAcctNum": "...", "institutionCode": "..." }Bank details

Sample: Lightning Receive

curl -X POST https://api.neutron.me/api/v2/transaction/ \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -d '{
    "sourceReq": {
      "ccy": "BTC",
      "method": "lightning",
      "reqDetails": {}
    },
    "destReq": {
      "ccy": "BTC",
      "method": "neutronpay",
      "amtRequested": 0.0001,
      "reqDetails": {}
    }
  }'

Sample: Fiat Payout (VND)

curl -X POST https://api.neutron.me/api/v2/transaction/ \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -d '{
    "extRefId": "payout-001",
    "sourceReq": {
      "ccy": "BTC",
      "method": "neutronpay",
      "amtRequested": 0.001
    },
    "destReq": {
      "ccy": "VND",
      "method": "vnd-instant",
      "reqDetails": {
        "bankAcctNum": "0123456789",
        "institutionCode": "970422"
      },
      "kyc": {
        "type": "individual",
        "details": {
          "legalFullName": "LE VAN A",
          "countryCode": "VN"
        }
      }
    },
    "sourceOfFunds": {
      "purpose": 1,
      "source": 5,
      "relationship": 3
    }
  }'

Transaction Response Structure

All transaction endpoints return the same response shape:

{
  "txnId": "d3f1458a-121b-4a90-bf2d-f01c821eab61",
  "accountId": "ne01-abc123def456",
  "accountDisplayName": "My Account",
  "extRefId": "your-unique-ref-123",
  "txnState": "quoted",
  "sourceReq": {
    "ccy": "BTC",
    "method": "neutronpay",
    "amtRequested": 0.001,
    "amtSettled": null,
    "neutronpayFees": 0,
    "networkFees": 0.0000005,
    "reqStatus": "0",
    "expiresAt": 1770345600000,
    "createAt": 1770342000000,
    "updatedAt": 1770342000000
  },
  "destReq": {
    "ccy": "VND",
    "method": "vnd-instant",
    "amtRequested": 300000,
    "amtSettled": null,
    "reqStatus": "0",
    "reqDetails": {
      "bankAcctNum": "0123456789",
      "institutionCode": "970422"
    }
  },
  "fxRate": 2750000000,
  "createdAt": 1770342000000
}

Response Fields

FieldTypeDescription
txnIdstringUnique transaction ID
accountIdstringYour account ID
extRefIdstringYour reference ID (if provided)
txnStatestringCurrent state — see Transaction Status Types
sourceReqobjectSource side with amounts, fees, and status
destReqobjectDestination side with amounts and status
fxRatenumberExchange rate applied (1 for same-currency transactions)
sourceReq.amtSettlednumberActual amount settled (populated after completion)
sourceReq.neutronpayFeesnumberNeutron service fee
sourceReq.networkFeesnumberNetwork/mining fee
sourceReq.reqStatusstringRequest status code
sourceReq.expiresAtintegerExpiry timestamp (ms)

Related