Create payment by invoice
Creates payment by invoice. With this method, your customer will be able to complete the payment without leaving your website.
Be sure to consider the details of repeated and wrong-asset deposits from 'Repeated Deposits and Wrong-Asset Deposits' section when processing payments.
Data must be sent as a JSON-object payload.
Required request fields:
-
iid (required) - invoice id. You can get invoice ID in response of POST Create_invoice method;
-
pay_currency (required) - the crypto currency in which the pay_amount is specified (btc, eth, etc). NOTE: some of the currencies require a Memo, Destination Tag, etc., to complete a payment (AVA, EOS, BNBMAINNET, XLM, XRP). This is unique for each payment. This ID is received in “payin_extra_id” parameter of the response. Payments made without "payin_extra_id" cannot be detected automatically;
-
order_description (optional) - inner store order description, e.g. "Apple Macbook Pro 2019 x 1";
-
customer_email (optional) - user email to which a notification about the successful completion of the payment will be sent;
-
payout_address (optional) - usually the funds will go to the address you specify in your Personal account. In case you want to receive funds on another address, you can specify it in this parameter;
-
payout_extra_id(optional) - extra id or memo or tag for external payout_address;
-
payout_currency (optional) - currency of your external payout_address, required when payout_adress is specified;
Here the list of available statuses of payment:
-
waiting - waiting for the customer to send the payment. The initial status of each payment;
-
confirming - the transaction is being processed on the blockchain. Appears when NOWPayments detect the funds from the user on the blockchain;
-
confirmed - the process is confirmed by the blockchain. Customer’s funds have accumulated enough confirmations;
-
sending - the funds are being sent to your personal wallet. We are in the process of sending the funds to you;
-
partially_paid - it shows that the customer sent the less than the actual price. Appears when the funds have arrived in your wallet;
-
finished - the funds have reached your personal address and the payment is finished;
-
failed - the payment wasn't completed due to the error of some kind;
-
refunded - the funds were refunded back to the user;
-
expired - the user didn't send the funds to the specified address in the 7 days time window;
Please note: when you're creating a fiat2crypto payment you also should include additional header to your request - "origin-ip : xxx", where xxx is your customer IP address.
Request
- Base URLhttps://api.nowpayments.io
- Authnone declared
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Headers
(Required) Your NOWPayments API key
Request body
Response
201
Changes
No recorded changes to this operation across all 1 revision of this API.