---
title: "Create payment by invoice"
method: POST
path: "/v1/invoice-payment"
tags: ["Payments"]
---

# Create payment by invoice

`POST /v1/invoice-payment`

## Request

- Base URL: `https://api.nowpayments.io`
- URL: `https://api.nowpayments.io/v1/invoice-payment`
- Auth: none declared
- TypeScript: <https://skmtc.dev/nowpayments/apis/np-open-api/docs/v1/invoice-payment/post.ts> (a function with typed inputs; its response is checked against the schema)

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

## Headers

- `x-api-key` string

## Request body

- object
  - `iid` string
  - `pay_currency` string
  - `purchase_id` string
  - `order_description` string
  - `customer_email` string, email
  - `payout_address` string
  - `payout_currency` string

## Response `201`

201

- object
  - `payment_id` string
  - `payment_status` string
  - `pay_address` string
  - `price_amount` number
  - `price_currency` string
  - `pay_amount` number
  - `pay_currency` string
  - `order_id` string
  - `order_description` string
  - `ipn_callback_url` string, uri
  - `created_at` string, date-time
  - `updated_at` string, date-time
  - `purchase_id` string
  - `smart_contract` string
  - `network` string
  - `network_precision` integer
  - `expiration_estimate_date` string, date-time

---

[API](https://skmtc.dev/nowpayments/apis/np-open-api.md) - [All operations](https://skmtc.dev/nowpayments/apis/np-open-api/llms.txt) - [OpenAPI document](https://skmtc.dev/nowpayments/apis/np-open-api/revisions/32c28317af15?raw)
