---
updatedAt: 2026-03-05T09:18:05.000Z
agentTools:
  projectIndex: https://neutronpay.readme.io/llms.txt
---

# Create a transaction

Create a new transaction request

Creates a new transaction in `quoted` state. The transaction must be [confirmed](/reference/confirmtransaction) before it executes.

This is the universal endpoint for all payment types — Lightning, on-chain Bitcoin, USDT, fiat payouts, and internal swaps. The `method` and `ccy` fields determine the flow.

### Example: Lightning Send

```bash
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": "neutronpay"
    },
    "destReq": {
      "ccy": "BTC",
      "method": "lightning",
      "reqDetails": {
        "paymentRequest": "lnbc100u1p..."
      }
    }
  }'
```

### Example: Lightning Receive

```bash
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": {}
    }
  }'
```

### Payment Methods

| Method        | Description                 | reqDetails                                              |
| ------------- | --------------------------- | ------------------------------------------------------- |
| `neutronpay`  | Internal Neutron wallet     | `{}`                                                    |
| `lightning`   | Lightning Network           | Send: `{ "paymentRequest": "lnbc..." }` / Receive: `{}` |
| `on-chain`    | Bitcoin on-chain            | Send: `{ "address": "bc1q..." }` / Receive: `{}`        |
| `tron`        | USDT via TRON               | `{ "address": "T..." }`                                 |
| `vnd-instant` | Vietnamese Dong bank payout | `{ "bankAcctNum": "...", "institutionCode": "..." }`    |

### Key Rules

* **Amounts are in BTC** (not satoshis) — `0.00000100` = 100 sats
* Set `amtRequested` on **one side only** (source OR dest), not both
* The response includes fee breakdown (`neutronpayFees`, `networkFees`) — review before confirming
* KYC and `sourceOfFunds` are only required for [fiat payouts](/reference/fiat-out)
* Use `extRefId` to attach your own reference ID for tracking

### Response

Returns the transaction in `quoted` state with fees and exchange rate. See [Schema & Sample Payloads](/reference/schema-sample-payloads) for the full response structure.

### Next Step

→ [Confirm the transaction](/reference/confirmtransaction) to execute it.

### Related

* [Schema & Sample Payloads](/reference/schema-sample-payloads) — Full request/response reference
* [Transaction Status Types](/reference/transaction-status-types) — All states explained
* [Send Bitcoin via Lightning](/reference/send-bitcoin-lightning) — Lightning-specific guide
* [Receive Bitcoin via Lightning](/reference/receive-bitcoin-with-lightning-invoice) — Lightning receive guide

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "Neutronpay API",
    "version": "2.2.6",
    "description": "Neutron API Reference"
  },
  "servers": [
    {
      "url": "https://api.neutron.me",
      "description": "Development environment"
    }
  ],
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "description": "JWT Authorization header using the Bearer scheme. Example: 'Authorization: Bearer {token}'"
      }
    }
  },
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "tags": [
    {
      "name": "Transactions",
      "description": "Transaction management endpoints"
    }
  ],
  "paths": {
    "/api/v2/transaction/": {
      "post": {
        "summary": "Create a transaction",
        "description": "Create a new transaction request",
        "tags": [
          "Transactions"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "txnId": {
                      "type": "string",
                      "description": "Unique identifier of the transaction"
                    },
                    "accountId": {
                      "type": "string",
                      "description": "Unique identifier of the account"
                    },
                    "accountDisplayName": {
                      "type": "string",
                      "description": "Display name of the account"
                    },
                    "extRefId": {
                      "type": "string",
                      "description": "External reference ID"
                    },
                    "sourceReq": {
                      "type": "object",
                      "properties": {
                        "accountId": {
                          "type": "string"
                        },
                        "ccy": {
                          "type": "string"
                        },
                        "method": {
                          "type": "string"
                        },
                        "amtRequested": {
                          "type": "number"
                        },
                        "amtSettled": {
                          "type": "number"
                        },
                        "neutronpayFees": {
                          "type": "number"
                        },
                        "baseNeutronpayFees": {
                          "type": "number"
                        },
                        "networkFees": {
                          "type": "number"
                        },
                        "baseNetworkFees": {
                          "type": "number"
                        },
                        "reqStatus": {
                          "type": "string"
                        },
                        "kyc": {
                          "type": "object"
                        },
                        "expiresAt": {
                          "type": "integer"
                        },
                        "createAt": {
                          "type": "integer"
                        },
                        "updatedAt": {
                          "type": "integer"
                        }
                      }
                    },
                    "destReq": {
                      "type": "object",
                      "properties": {
                        "accountId": {
                          "type": "string"
                        },
                        "ccy": {
                          "type": "string"
                        },
                        "method": {
                          "type": "string"
                        },
                        "amtRequested": {
                          "type": "number"
                        },
                        "amtSettled": {
                          "type": "number"
                        },
                        "neutronpayFees": {
                          "type": "number"
                        },
                        "baseNeutronpayFees": {
                          "type": "number"
                        },
                        "networkFees": {
                          "type": "number"
                        },
                        "baseNetworkFees": {
                          "type": "number"
                        },
                        "reqStatus": {
                          "type": "string"
                        },
                        "kyc": {
                          "type": "object"
                        },
                        "reqDetails": {
                          "type": "object"
                        },
                        "expiresAt": {
                          "type": "integer"
                        },
                        "createAt": {
                          "type": "integer"
                        },
                        "updatedAt": {
                          "type": "integer"
                        }
                      }
                    },
                    "fxRate": {
                      "type": "number"
                    },
                    "txnState": {
                      "type": "string"
                    },
                    "createAt": {
                      "type": "integer"
                    },
                    "expiresAt": {
                      "type": "integer"
                    },
                    "updatedAt": {
                      "type": "integer"
                    },
                    "txnType": {
                      "type": "string"
                    }
                  }
                },
                "examples": {
                  "Success": {
                    "summary": "Success",
                    "value": {
                      "txnId": "58493016-d0eb-4715-8a9d-596f1b1d07f8",
                      "accountId": "ne01-e3b08bc71e244707a5fc023a8c009daf",
                      "accountDisplayName": "WALLET",
                      "extRefId": "58493016-d0eb-4715-8a9d-596f1b1d07f8",
                      "sourceReq": {
                        "accountId": "ne01-e3b08bc71e244707a5fc023a8c009daf",
                        "ccy": "BTC",
                        "method": "neutronpay",
                        "amtRequested": 0.001,
                        "amtSettled": 0,
                        "neutronpayFees": 0,
                        "baseNeutronpayFees": 0,
                        "networkFees": 0,
                        "baseNetworkFees": 0,
                        "reqStatus": "A",
                        "kyc": {
                          "type": "individual",
                          "details": {
                            "legalFullName": "John Doe",
                            "countryCode": "CA"
                          }
                        },
                        "expiresAt": 1748180836129,
                        "createAt": 1748180535539,
                        "updatedAt": 1748180535539
                      },
                      "destReq": {
                        "accountId": "ne01-e3b08bc71e244707a5fc023a8c009daf",
                        "ccy": "BTC",
                        "method": "on-chain",
                        "amtRequested": 0.001,
                        "amtSettled": 0,
                        "neutronpayFees": 0,
                        "baseNeutronpayFees": 0,
                        "networkFees": 0,
                        "baseNetworkFees": 0,
                        "reqStatus": "A",
                        "kyc": {
                          "type": "individual",
                          "details": {
                            "legalFullName": "John Doe",
                            "countryCode": "CA"
                          }
                        },
                        "reqDetails": {
                          "address": "2Mwq9GmtPWxHaaDqhCYQ8dcmfaUr8nhBtN7"
                        },
                        "expiresAt": 1748180836129,
                        "createAt": 1748180535539,
                        "updatedAt": 1748180535539
                      },
                      "fxRate": 1,
                      "txnState": "quoted",
                      "createAt": 1748180535539,
                      "expiresAt": 1748180836129,
                      "updatedAt": 1748180536129,
                      "txnType": "payout"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - Invalid or missing authentication credentials"
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "sourceReq",
                  "destReq"
                ],
                "properties": {
                  "notes": {
                    "type": "string",
                    "description": "Additional notes for the transaction"
                  },
                  "extRefId": {
                    "type": "string",
                    "description": "External reference ID"
                  },
                  "deductFeesFromDest": {
                    "type": "boolean",
                    "description": "Whether to deduct fees from destination"
                  },
                  "deductNPFeesFromDest": {
                    "type": "boolean",
                    "description": "Whether to deduct NeutronPay fees from destination"
                  },
                  "deductNetworkFeesFromDest": {
                    "type": "boolean",
                    "description": "Whether to deduct network fees from destination"
                  },
                  "sourceOfFunds": {
                    "type": "object",
                    "description": "Source of funds information",
                    "properties": {
                      "purpose": {
                        "type": "integer",
                        "description": "Purpose ID (P2PPurposeID or B2BPurposeID)",
                        "oneOf": [
                          {
                            "enum": [
                              1,
                              2,
                              3,
                              4,
                              5,
                              6,
                              7,
                              8,
                              9,
                              10,
                              11,
                              12,
                              13
                            ],
                            "description": "P2P purposes: 1=BusinessProfitsToParents, 2=BusinessTravel, 3=FamilyMaintenance, 4=Salary, 5=Savings, 6=MedicalExpenses, 7=TuitionFees, 8=EducationSupport, 9=Gift, 10=HomeImprovement, 11=DebtSettlement, 12=RealEstate, 13=Taxes"
                          },
                          {
                            "enum": [
                              51,
                              52,
                              53,
                              54,
                              55,
                              56,
                              57,
                              58,
                              59,
                              60,
                              61,
                              62,
                              63,
                              64,
                              65,
                              66,
                              67,
                              68
                            ],
                            "description": "B2B purposes: 51=AdvancedGoodsPayments, 52=BusinessProfitsToParents, 53=BusinessTravel, 54=CharitableDonation, 55=ConferenceOrTrainingFee, 56=EmployeeCompensation, 57=EventsOrCompetitionParticipationExpenses, 58=ExportGoodsPayments, 59=GoodsAndServices, 60=GoodsExported, 61=LoanRepayment, 62=OtherBusiness, 63=OtherBusinessServices, 64=RentPropertyExpenses, 65=SalaryPayment, 66=SoftwareExport, 67=TravelCostAccommodationCost, 68=TravelExpenses"
                          }
                        ]
                      },
                      "source": {
                        "type": "integer",
                        "description": "Source ID (P2PSourceID or B2BSourceID)",
                        "oneOf": [
                          {
                            "enum": [
                              1,
                              2,
                              3,
                              4,
                              5,
                              6
                            ],
                            "description": "P2P sources: 1=Salary, 2=Savings, 3=Lottery, 4=Loan, 5=BusinessIncome, 6=Others"
                          },
                          {
                            "enum": [
                              1,
                              2,
                              3,
                              4,
                              5,
                              6,
                              7,
                              8
                            ],
                            "description": "B2B sources: 1=Salary, 2=Savings, 3=Lottery, 4=Loan, 5=BusinessIncome, 6=BusinessProfit, 7=Settlement, 8=Others"
                          }
                        ]
                      },
                      "relationship": {
                        "type": "integer",
                        "description": "Relationship ID (P2PRelationshipID or B2BRelationshipID)",
                        "oneOf": [
                          {
                            "enum": [
                              1,
                              2,
                              3,
                              4,
                              5,
                              6,
                              7,
                              8,
                              9,
                              10,
                              11
                            ],
                            "description": "P2P relationships: 1=Self, 2=Father, 3=Mother, 4=Spouse, 5=Son, 6=Daughter, 7=Brother, 8=Sister, 9=Friend, 10=Employer, 11=Colleague"
                          },
                          {
                            "enum": [
                              1
                            ],
                            "description": "B2B relationships: 1=Any"
                          }
                        ]
                      }
                    },
                    "required": [
                      "purpose",
                      "source"
                    ]
                  },
                  "sourceReq": {
                    "type": "object",
                    "required": [
                      "ccy",
                      "method",
                      "reqDetails",
                      "kyc"
                    ],
                    "properties": {
                      "ccy": {
                        "type": "string",
                        "description": "Currency code",
                        "example": "BTC",
                        "default": "BTC"
                      },
                      "amtRequested": {
                        "type": "number",
                        "description": "Amount requested"
                      },
                      "method": {
                        "type": "string",
                        "description": "Payment method",
                        "example": "neutronpay",
                        "default": "neutronpay"
                      },
                      "reqDetails": {
                        "type": "object",
                        "description": "Additional request details"
                      },
                      "kyc": {
                        "type": "object",
                        "required": [
                          "type",
                          "details"
                        ],
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "individual",
                              "business"
                            ],
                            "description": "Type of KYC"
                          },
                          "details": {
                            "type": "object",
                            "required": [
                              "legalFullName",
                              "countryCode"
                            ],
                            "properties": {
                              "legalFullName": {
                                "type": "string",
                                "description": "Legal full name of the individual"
                              },
                              "countryCode": {
                                "type": "string",
                                "description": "Country code (ISO 3166-1 alpha-2)"
                              },
                              "contactNumber": {
                                "type": "string",
                                "description": "Contact phone number in E.164 format"
                              },
                              "address1": {
                                "type": "string",
                                "description": "Primary address line"
                              }
                            },
                            "additionalProperties": true
                          }
                        }
                      }
                    }
                  },
                  "destReq": {
                    "type": "object",
                    "required": [
                      "ccy",
                      "method",
                      "reqDetails",
                      "kyc"
                    ],
                    "properties": {
                      "ccy": {
                        "type": "string",
                        "description": "Currency code",
                        "example": "BTC"
                      },
                      "amtRequested": {
                        "type": "number",
                        "description": "Amount requested"
                      },
                      "method": {
                        "type": "string",
                        "description": "Payment method",
                        "example": "on-chain"
                      },
                      "reqDetails": {
                        "type": "object",
                        "description": "Additional request details specific to the payment method"
                      },
                      "kyc": {
                        "type": "object",
                        "required": [
                          "type",
                          "details"
                        ],
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "individual",
                              "business"
                            ],
                            "description": "Type of KYC"
                          },
                          "details": {
                            "type": "object",
                            "required": [
                              "legalFullName",
                              "countryCode"
                            ],
                            "properties": {
                              "legalFullName": {
                                "type": "string",
                                "description": "Legal full name of the individual"
                              },
                              "countryCode": {
                                "type": "string",
                                "description": "Country code (ISO 3166-1 alpha-2)"
                              },
                              "contactNumber": {
                                "type": "string",
                                "description": "Contact phone number in E.164 format"
                              },
                              "address1": {
                                "type": "string",
                                "description": "Primary address line"
                              }
                            },
                            "additionalProperties": true
                          }
                        }
                      }
                    }
                  }
                }
              },
              "examples": {
                "btcPayoutTransaction": {
                  "summary": "On-chain payout transaction",
                  "value": {
                    "notes": "",
                    "sourceReq": {
                      "ccy": "BTC",
                      "method": "neutronpay",
                      "reqDetails": {},
                      "kyc": {
                        "type": "individual",
                        "details": {
                          "legalFullName": "John Doe",
                          "countryCode": "CA"
                        }
                      }
                    },
                    "destReq": {
                      "ccy": "BTC",
                      "amtRequested": 0.001,
                      "method": "on-chain",
                      "reqDetails": {
                        "address": "2Mwq9GmtPWxHaaDqhCYQ8dcmfaUr8nhBtN7"
                      },
                      "kyc": {
                        "type": "individual",
                        "details": {
                          "legalFullName": "John Doe",
                          "countryCode": "CA"
                        }
                      }
                    }
                  }
                },
                "btcPayinTransaction": {
                  "summary": "On-chain payin transaction",
                  "value": {
                    "sourceReq": {
                      "ccy": "BTC",
                      "method": "on-chain",
                      "reqDetails": {},
                      "kyc": {
                        "type": "individual",
                        "details": {
                          "legalFullName": "John Doe",
                          "countryCode": "CA"
                        }
                      }
                    },
                    "destReq": {
                      "ccy": "BTC",
                      "method": "neutronpay",
                      "amtRequested": 0.001,
                      "reqDetails": {},
                      "kyc": {
                        "type": "individual",
                        "details": {
                          "legalFullName": "John Doe",
                          "countryCode": "CA"
                        }
                      }
                    }
                  }
                },
                "lightningPayoutTransaction": {
                  "summary": "Lightning payout transaction",
                  "value": {
                    "notes": "",
                    "sourceReq": {
                      "ccy": "BTC",
                      "method": "neutronpay",
                      "reqDetails": {},
                      "kyc": {
                        "type": "individual",
                        "details": {
                          "legalFullName": "John Doe",
                          "countryCode": "CA"
                        }
                      }
                    },
                    "destReq": {
                      "ccy": "BTC",
                      "method": "lightning",
                      "reqDetails": {
                        "paymentRequest": "lntb100u1p5pc6lqpp5ggg0nq0d4z4vag6mzcrzypp97lqw9nuj3uk2d57awx5xfqr4y7qqdqqcqzysxqyz5vqsp5xu34zt7hleh4ydds74dunxpdemxu9fxhpgupsy36genhl3n3tlvq9qyyssqf9dfyg96rez0vjelu60tnvjgzur3kjqnljupehem4l2k5dav5jhsywl30mfze5ecjyjj9zy9hlmghytl8h9v399yc7rvk877nmr75fcqqx5gzq"
                      },
                      "kyc": {
                        "type": "individual",
                        "details": {
                          "legalFullName": "John Doe",
                          "countryCode": "CA"
                        }
                      }
                    }
                  }
                },
                "lightningPayinTransaction": {
                  "summary": "Lightning payin transaction",
                  "value": {
                    "sourceReq": {
                      "ccy": "BTC",
                      "method": "lightning",
                      "reqDetails": {},
                      "kyc": {
                        "type": "individual",
                        "details": {
                          "legalFullName": "John Doe",
                          "countryCode": "CA"
                        }
                      }
                    },
                    "destReq": {
                      "ccy": "BTC",
                      "method": "neutronpay",
                      "amtRequested": 0.00007,
                      "reqDetails": {},
                      "kyc": {
                        "type": "individual",
                        "details": {
                          "legalFullName": "John Doe",
                          "countryCode": "CA"
                        }
                      }
                    }
                  }
                },
                "lightningAddressTransaction": {
                  "summary": "LNURL Address payout transaction",
                  "value": {
                    "notes": "",
                    "sourceReq": {
                      "ccy": "BTC",
                      "method": "neutronpay",
                      "reqDetails": {},
                      "kyc": {
                        "type": "individual",
                        "details": {
                          "legalFullName": "John Doe",
                          "countryCode": "CA"
                        }
                      }
                    },
                    "destReq": {
                      "ccy": "BTC",
                      "amtRequested": 0.00001,
                      "method": "lnurl",
                      "reqDetails": {
                        "address": "support@neutron.me"
                      },
                      "kyc": {
                        "type": "individual",
                        "details": {
                          "legalFullName": "John Doe",
                          "countryCode": "CA"
                        }
                      }
                    }
                  }
                },
                "vndPayoutTransaction": {
                  "summary": "VND payout transaction",
                  "value": {
                    "sourceReq": {
                      "ccy": "BTC",
                      "method": "neutronpay",
                      "reqDetails": {},
                      "kyc": {
                        "type": "individual",
                        "details": {
                          "legalFullName": "John Doe",
                          "countryCode": "CA",
                          "contactNumber": "+12045557123",
                          "address1": "147 Maple Grove Avenue, Winnipeg, Manitoba R3K 0V8"
                        }
                      }
                    },
                    "destReq": {
                      "ccy": "VND",
                      "amtRequested": 1000000,
                      "method": "vnd-instant",
                      "reqDetails": {
                        "acctName": "Tran Van A",
                        "acctNum": "590061086034",
                        "institutionCode": "TPBVVNVX",
                        "institutionName": "TPBank"
                      },
                      "kyc": {
                        "type": "individual",
                        "details": {
                          "legalFullName": "Tran Van A",
                          "countryCode": "VN",
                          "contactNumber": "+84901557351",
                          "address1": "135 Nam Ky Khoi Nghia, Ben Thanh ward, District 1, Ho Chi Minh city"
                        }
                      }
                    },
                    "sourceOfFunds": {
                      "purpose": 1,
                      "source": 4,
                      "relationship": 4
                    }
                  }
                },
                "swapTransaction": {
                  "summary": "Swap transaction",
                  "value": {
                    "sourceReq": {
                      "ccy": "BTC",
                      "method": "neutronpay",
                      "reqDetails": {},
                      "kyc": {
                        "type": "individual",
                        "details": {
                          "legalFullName": "John Doe",
                          "countryCode": "CA"
                        }
                      }
                    },
                    "destReq": {
                      "ccy": "VND",
                      "amtRequested": 1000000,
                      "method": "neutronpay",
                      "reqDetails": {},
                      "kyc": {
                        "type": "individual",
                        "details": {
                          "legalFullName": "John Doe",
                          "countryCode": "CA"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "createTransaction"
      }
    }
  },
  "x-readme": {}
}
```