Create a payment
Request a Lightning payment for an operation using MPP or L402. The payment goes to your Phoenixd node.
POST
/gateway/paymentsRequired permission: Gateway → Write.
Body parameters
nodeIdstringRequiredID of a running node in your account. Use List nodes to find its ID. The payment goes to this node.
amountSatintegerRequiredPayment amount in satoshis. Must be a whole number from
1to9007199254740, inclusive.descriptionstringRequiredDescription of the paid operation. Must be non-blank and contain no more than 500 characters. Control characters are not accepted.
protocolstringOptionalChoose
mpporl402for the payment challenge and credential format.Defaults to
mpp.
Errors
| Status | Code | What to do |
|---|---|---|
400 | bad_request | Check the request fields and protocol. |
401 | unauthorized | Check your API key and gateway permissions. |
404 | node_not_found | Use a node ID from the key's account. |
502 | payment_service_unavailable | Make sure the node is running and try again when it is ready. |
See Error handling and Rate limiting for other errors and retry guidance.