Payments

Create payment

Creates payment. 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:

  • price_amount (required) - the fiat equivalent of the price to be paid in crypto. If the pay_amount parameter is left empty, our system will automatically convert this fiat price into its crypto equivalent. Please note that this does not enable fiat payments, only provides a fiat price for yours and the customer’s convenience and information. NOTE: Some of the assets (KISHU, NWC, FTT, CHR, XYM, SRK, KLV, SUPER, OM, XCUR, NOW, SHIB, SAND, MATIC, CTSI, MANA, FRONT, FTM, DAO, LGCY), have a maximum price amount of ~$2000;

  • price_currency (required) - the fiat currency in which the price_amount is specified (usd, eur, etc);

  • pay_amount (optional) - the amount that users have to pay for the order stated in crypto. You can either specify it yourself, or we will automatically convert the amount you indicated in price_amount;

  • pay_currency (required) - the crypto currency in which the pay_amount is specified (btc, eth, etc), or one of available fiat currencies if it's enabled for your account (USD, EUR, ILS, GBP, AUD, RON);
    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;

  • ipn_callback_url (optional) - url to receive callbacks, should contain "http" or "https", eg. "https://nowpayments.io";

  • order_id (optional) - inner store order ID, e.g. "RGDBP-21314";

  • order_description (optional) - inner store order description, e.g. "Apple Macbook Pro 2019 x 1";

  • 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_currency (optional) - currency of your external payout_address, required when payout_adress is specified;

  • payout_extra_id(optional) - extra id or memo or tag for external payout_address;

  • is_fixed_rate(optional) - boolean, can be true or false. Required for fixed-rate exchanges;
    NOTE: the rate of exchange will be frozen for 10 minutes. If there are no incoming payments during this period, the payment status changes to "expired".

  • is_fee_paid_by_user(optional) - boolean, can be true or false. Required for fixed-rate exchanges with all fees paid by users;
    NOTE: the rate of exchange will be frozen for 10 minutes. If there are no incoming payments during this period, the payment status changes to "expired". The fee paid by user payment can be only fixed rate. If you disable fixed rate during payment creation process, this flag would enforce fixed_rate to be true;

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;
    Please note: each currency has its own amount of confirmations required to start the processing.

  • 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 less than the actual price. Appears when the funds have arrived in your wallet;
    Please note: we advise against automatically providing goods or services when the payment status is "Partially paid", if it's critical for your business to receive the full amount.

  • 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;

  • 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.

SUCCESSFUL RESPONSE FIELDS

NameTypeDescription
payment_idStringPayment ID you can refer to
payment_statusStringCurrent status of the payment. On creation it supposed to be 'waiting'
pay_addressStringAddress which is meant for customer to make a deposit to.
price_amountFloatThe amount you set as a price,
price_currencyStringTicker of base currency
pay_amountFloatAmount customer is meant to pay.
pay_currencyStringDeposit currency.
order_idStringOrder ID is a string for your internal identifier you can enter upon payment creation.
order_descriptionStringOrder description is a string for your convenience to describe anything about the payment for your own reference.
ipn_callback_urlStringLink to your endpoint for IPN notifications catching
created_atStringTime of payment creation
updated_atStringTime of latest payment information update
purchase_idStringSpecial identifier for handling partially_paid payments
amount_receivedFloatEstimate for amount you're intended to receive if customer would deposit full amount.
payin_extra_idString(Optional) Deposit address' memo, if applied
smart_contractString
networkStringNetwork of deposit
network_precisionString
time_limitString
expiration_estimate_dateString
is_fixed_rateStringThis parameter is 'True' if Fixed Rate option is enabled and 'false' if it's disabled
is_fee_paid_by_userStringThis parameter is 'True' if Fee Paid By User option is enabled and 'false' if it's disabled
valid_untilStringThis parameter indicated when payment go expired.
typeStringType of payment. It can be either crypto2crypto or fiat2crypto
redirectData: redirect_urlString(Optional) If you're using fiat2crypto flow, this parameter will appear with link to our fiat2crypto processing provider web interface.
post/v1/payment

Request

Headers

x-api-keystring

(Required) Your NOWPayments API key

Request body

price_amountnumber
price_currencystring
pay_currencystring
ipn_callback_urlstring uri
order_idstring
order_descriptionstring
is_fixed_rateboolean
is_fee_paid_by_userboolean

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.