nodana

Create a payment

Request a Lightning payment for an operation using MPP or L402. The payment goes to your Phoenixd node.

POST/gateway/payments

Required permission: Gateway → Write.

Body parameters

nodeIdstringRequired

ID of a running node in your account. Use List nodes to find its ID. The payment goes to this node.

amountSatintegerRequired

Payment amount in satoshis. Must be a whole number from 1 to 9007199254740, inclusive.

descriptionstringRequired

Description of the paid operation. Must be non-blank and contain no more than 500 characters. Control characters are not accepted.

protocolstringOptional

Choose mpp or l402 for the payment challenge and credential format.

Defaults to mpp.

Errors

StatusCodeWhat to do
400bad_requestCheck the request fields and protocol.
401unauthorizedCheck your API key and gateway permissions.
404node_not_foundUse a node ID from the key's account.
502payment_service_unavailableMake sure the node is running and try again when it is ready.

See Error handling and Rate limiting for other errors and retry guidance.