Payments

Create invoice

Creates a payment link. With this method, the customer is required to follow the generated url to complete the payment. Data must be sent as a JSON-object payload.

Request fields:

  • price_amount (required) - the amount that users have to pay for the order stated in fiat currency. In case you do not indicate the price in crypto, our system will automatically convert this fiat amount into its crypto equivalent. 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 limit of ~$2000;

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

  • pay_currency (optional) - the specified crypto currency (btc, eth, etc), or one of available fiat currencies if it's enabled for your account (USD, EUR, ILS, GBP, AUD, RON);
    If not specified, can be chosen on the invoice_url

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

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

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

  • success_url(optional) - url where the customer will be redirected after successful payment;

  • cancel_url(optional) - url where the customer will be redirected after failed payment;

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

SUCCESSFUL RESPONSE FIELDS

NameTypeDescription
idStringInvoice ID
token_idStringInternal identifier
order_idStringOrder ID specified in request
order_descriptionStringOrder description specified in request
price_amountStringBase price in fiat
price_currencyStringTicker of base fiat currency
pay_currencyStringCurrency your customer will pay with. If it's 'null' your customer can choose currency in web interface.
ipn_callback_urlStringLink to your endpoint for IPN notifications catching
invoice_urlStringLink to the payment page that you can share with your customer
success_urlStringCustomer will be redirected to this link once the payment is finished
cancel_urlStringCustomer will be redirected to this link if the payment fails
partially_paid_urlStringCustomer will be redirected to this link if the payment gets partially paid status
payout_currencyStringTicker of payout currency
created_atStringTime of invoice creation
updated_atStringTime of latest invoice information update
is_fixed_rateBooleanThis parameter is 'True' if Fixed Rate option is enabled and 'false' if it's disabled
is_fee_paid_by_userBooleanThis parameter is 'True' if Fee Paid By User option is enabled and 'false' if it's disabled
post/v1/invoice

Request

Headers

x-api-keystring

(Required) Your NOWPayments API key

Request body

price_amountinteger
price_currencystring
order_idstring
order_descriptionstring
ipn_callback_urlstring uri
success_urlstring uri
cancel_urlstring uri
partially_paid_urlstring uri
is_fixed_rateboolean
is_fee_paid_by_userboolean

Response

201

idstring
order_idstring
order_descriptionstring
price_amountstring
price_currencystring
ipn_callback_urlstring uri
invoice_urlstring uri
success_urlstring uri
cancel_urlstring uri
created_atstring date-time
updated_atstring date-time

Changes

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