Payments

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.

post/v1/invoice-payment

Request

Headers

x-api-keystring

(Required) Your NOWPayments API key

Request body

iidstring
pay_currencystring
purchase_idstring
order_descriptionstring
customer_emailstring email
payout_addressstring
payout_currencystring

Response

201

payment_idstring
payment_statusstring
pay_addressstring
price_amountnumber
price_currencystring
pay_amountnumber
pay_currencystring
order_idstring
order_descriptionstring
ipn_callback_urlstring uri
created_atstring date-time
updated_atstring date-time
purchase_idstring
smart_contractstring
networkstring
network_precisioninteger
expiration_estimate_datestring date-time

Changes

No recorded changes to this operation across all 1 revision of this API.