### Example Response for Available Currencies Source: https://documenter.getpostman.com/view/7907941/S1a32n38?version=latest#3e3ce25e-f43f-4636-bbd9-11560e46048b This is an example JSON response when requesting available currencies. ```json { "currencies": [ "btg", "eth", "xmr", "zec", "xvg", "ada", "ltc", "bch", "qtum", "dash", "xlm", "xrp", "xem", "dgb", "lsk", "doge", "trx", "kmd", "rep", "bat", "ark", "waves", "bnb", "xzc", "nano", "tusd", "vet", "zen", "grs", "fun", "neo", "gas", "pax", "usdc", "ont", "xtz", "link", "rvn", "bnbmainnet", "zil", "bcd", "usdt", "usdterc20", "cro", "dai", "ht", "wabi", "busd", "algo", "usdttrc20", "gt", "stpt", "ava", "sxp", "uni", "okb", "btc" ] } ``` -------------------------------- ### Example Response for Detailed Available Currencies Source: https://documenter.getpostman.com/view/7907941/S1a32n38?version=latest#3e3ce25e-f43f-4636-bbd9-11560e46048b This is an example JSON response when requesting detailed information about available currencies. ```json "currencies": [ { "id": 121, "code": "AAVE", "name": "Aave", "enable": true, "wallet_regex": "^(0x)[0-9A-Fa-f]{40}$", "priority": 127, "extra_id_exists": false, "extra_id_regex": null, "logo_url": "/images/coins/aave.svg", "track": true, "cg_id": "aave", "is_maxlimit": false, "network": "eth", "smart_contract": null, "network_precision": null } ] ``` -------------------------------- ### Response Headers Example Source: https://documenter.getpostman.com/view/7907941/S1a32n38?version=latest#7025cacf-7040-4c7b-a83f-f9ff0a22a822 This example shows typical response headers returned after a successful payment creation request. It includes date, content type, and various security headers. ```http Date Tue, 22 Dec 2020 15:00:22 GMT Content-Type application/json; charset=utf-8 Content-Length 420 Connection keep-alive X-DNS-Prefetch-Control off X-Frame-Options SAMEORIGIN Strict-Transport-Security max-age=15552000; includeSubDomains Strict-Transport-Security max-age=15768000 X-Download-Options noopen X-Content-Type-Options nosniff X-XSS-Protection 1; mode=block Vary Origin CF-Cache-Status DYNAMIC cf-request-id 072c902abd00001669e7327000000001 Expect-CT max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct" Report-To {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report?s=ZJgfL2UQDRGgSZ4oOb6wMDBAfE53D6i5EQUx1dsRP0skDMWeUwY4g6iPdUE3URPLtCLNaFtySv1gbsGjyPmspIwsl42xacCDk%2BjSGee%2F6JIAqfQ%3D"}],"group":"cf-nel","max_age":604800} NEL {"report_to":"cf-nel","max_age":604800} Server cloudflare CF-RAY 605ab6246ee71669-ARN ``` -------------------------------- ### Example Response for Full Currencies Source: https://documenter.getpostman.com/view/7907941/S1a32n38?version=latest#1c268f89-4fe7-471e-81b4-5a3153577b73 An example JSON response detailing a specific cryptocurrency, including its ID, code, name, and wallet validation regex. ```json { "currencies": [ { "id": 121, "code": "AAVE", "name": "Aave", "enable": true, "wallet_regex": "^(0x)[0-9A-Fa-f]{40}$", "priority": 127, "extra_id_exists": false, "extra_id_regex": null, "logo_url": "/images/coins/aave.svg", "track": true, "cg_id": "aave", "is_maxlimit": false, "network": "eth", "smart_contract": null, "network_precision": null } ] } ``` -------------------------------- ### Example Payment Response Source: https://documenter.getpostman.com/view/7907941/S1a32n38?version=latest#1c268f89-4fe7-471e-81b4-5a3153577b73 This is an example of a successful JSON response when retrieving a list of payments. It includes details for each transaction. ```json { "data": [ { "payment_id": 5524759814, "payment_status": "finished", "pay_address": "TNDFkiSmBQorNFacb3735q8MnT29sn8BLn", "price_amount": 5, "price_currency": "usd", "pay_amount": 165.652609, "actually_paid": 180, "pay_currency": "trx", "order_id": "RGDBP-21314", "order_description": "Apple Macbook Pro 2019 x 1", "purchase_id": "4944856743", "outcome_amount": 178.9005, "outcome_currency": "trx" }, { "payment_id": 5867063509, "payment_status": "expired", "pay_address": "TVKHbLc47BnMbdE7QN4X5Q1FtyZLGGiTo8", "price_amount": 5, "price_currency": "usd", "pay_amount": 165.652609, "actually_paid": 0, "pay_currency": "trx", "order_id": "RGDBP-21314", "order_description": "Apple Macbook Pro 2019 x 1", "purchase_id": "5057851130", "outcome_amount": 164.6248468, "outcome_currency": "trx" }, { "payment_id": 5745459419, "payment_status": "waiting", "pay_address": "3EZ2uTdVDAMFXTfc6uLDDKR6o8qKBZXVkj", "price_amount": 3999.5, "price_currency": "usd", "pay_amount": 0.17070286, "actually_paid": 0, "pay_currency": "btc", "order_id": "RGDBP-21314", "order_description": "Apple Macbook Pro 2019 x 1", "purchase_id": "5837122679", "outcome_amount": 0.1687052, "outcome_currency": "btc" }, { "payment_id": 4650948408, "payment_status": "waiting", "pay_address": "394UZCUdx3NN8VDsCZW8c6AzP7cXEXA8Xq", "price_amount": 3999.5, "price_currency": "usd", "pay_amount": 0.8102725, "actually_paid": 0, "pay_currency": "btc", "order_id": "RGDBP-21314", "order_description": "Apple Macbook Pro 2019 x 1", "purchase_id": "5094859409", "outcome_amount": 0.8019402, "outcome_currency": "btc" }, { "payment_id": 5605634688, "payment_status": "expired", "pay_address": "3EWJaZBaRWbPjSBTpgFcvxpnXLJzFDCHqW", "price_amount": 500, "price_currency": "usd", "pay_amount": 993.87178656, "actually_paid": 0, "pay_currency": "bcd", "order_id": "RGDBP-21314", "order_description": "Apple Macbook Pro 2019 x 1", "purchase_id": "5817305007", "outcome_amount": 988.9016296, "outcome_currency": "bcd" }, { "payment_id": 5241856814, "payment_status": "expired", "pay_address": "qzkshdh94vhdcyuejjf8ltcy2cl246hw0c68t36z69", "price_amount": 500, "price_currency": "usd", "pay_amount": 1.85459941, "actually_paid": 0, "pay_currency": "bch", "order_id": "RGDBP-21314", "order_description": "Apple Macbook Pro 2019 x 1", "purchase_id": "5941190675", "outcome_amount": 1.8451261, "outcome_currency": "bch" }, { "payment_id": 5751462089, "payment_status": "expired", "pay_address": "AYyecr8WKVpj2PNonjyUpn9sCHFyFMLdN1", "price_amount": 500, "price_currency": "usd", "pay_amount": 56.4344495, "actually_paid": 0, "pay_currency": "btg", "order_id": "RGDBP-21314", "order_description": "Apple Macbook Pro 2019 x 1", "purchase_id": "6229667127", "outcome_amount": 56.151958, "outcome_currency": "btg" }, { "payment_id": 6100223670, "payment_status": "waiting", "pay_address": "TNDFkiSmBQorNFacb3735q8MnT29sn8BLn", "price_amount": 5, "price_currency": "usd", "pay_amount": 165.652609, "actually_paid": 0, "pay_currency": "trx", "order_id": "RGDBP-21314", "order_description": "Apple Macbook Pro 2019 x 1", "purchase_id": "4944856743", "outcome_amount": 178.9005, "outcome_currency": "trx" } ] } ``` -------------------------------- ### Example Payment List Response Source: https://documenter.getpostman.com/view/7907941/S1a32n38?version=latest#41b02221-2d58-4fcf-9529-59d3763d6434 An example JSON response structure for a successful request to retrieve a list of payments. ```json { "data": [ { "payment_id": 5524759814, "payment_status": "finished", "pay_address": "TNDFkiSmBQorNFacb3735q8MnT29sn8BLn", "price_amount": 5, "price_currency": "usd", "pay_amount": 165.652609, "actually_paid": 180, "pay_currency": "trx", "order_id": "RGDBP-21314", "order_description": "Apple Macbook Pro 2019 x 1", "purchase_id": "4944856743", "outcome_amount": 178.9005, "outcome_currency": "trx" }, { "payment_id": 5867063509, "payment_status": "expired", "pay_address": "TVKHbLc47BnMbdE7QN4X5Q1FtyZLGGiTo8", "price_amount": 5, "price_currency": "usd", "pay_amount": 165.652609, "actually_paid": 0, "pay_currency": "trx", "order_id": "RGDBP-21314", "order_description": "Apple Macbook Pro 2019 x 1", "purchase_id": "5057851130", "outcome_amount": 164.6248468, "outcome_currency": "trx" }, { "payment_id": 5745459419, "payment_status": "waiting", "pay_address": "3EZ2uTdVDAMFXTfc6uLDDKR6o8qKBZXVkj", "price_amount": 3999.5, "price_currency": "usd", "pay_amount": 0.17070286, "actually_paid": 0, "pay_currency": "btc", "order_id": "RGDBP-21314", "order_description": "Apple Macbook Pro 2019 x 1", "purchase_id": "5837122679", "outcome_amount": 0.1687052, "outcome_currency": "btc" }, { "payment_id": 4650948408, "payment_status": "waiting", "pay_address": "394UZCUdx3NN8VDsCZW8c6AzP7cXEXA8Xq", "price_amount": 3999.5, "price_currency": "usd", "pay_amount": 0.8102725, "actually_paid": 0, "pay_currency": "btc", "order_id": "RGDBP-21314", "order_description": "Apple Macbook Pro 2019 x 1", "purchase_id": "5094859409", "outcome_amount": 0.8019402, "outcome_currency": "btc" }, { "payment_id": 5605634688, "payment_status": "expired", "pay_address": "3EWJaZBaRWbPjSBTpgFcvxpnXLJzFDCHqW", "price_amount": 500, "price_currency": "usd", "pay_amount": 993.87178656, "actually_paid": 0, "pay_currency": "bcd", "order_id": "RGDBP-21314", "order_description": "Apple Macbook Pro 2019 x 1", "purchase_id": "5817305007", "outcome_amount": 988.9016296, "outcome_currency": "bcd" }, { "payment_id": 5241856814, "payment_status": "expired", "pay_address": "qzkshdh94vhdcyuejjf8ltcy2cl246hw0c68t36z69", "price_amount": 500, "price_currency": "usd", "pay_amount": 1.85459941, "actually_paid": 0, "pay_currency": "bch", "order_id": "RGDBP-21314", "order_description": "Apple Macbook Pro 2019 x 1", "purchase_id": "5941190675", "outcome_amount": 1.8451261, "outcome_currency": "bch" }, { "payment_id": 5751462089, "payment_status": "expired", "pay_address": "AYyecr8WKVpj2PNonjyUpn9sCHFyFMLdN1", "price_amount": 500, "price_currency": "usd", "pay_amount": 56.4344495, "actually_paid": 0, "pay_currency": "btg", "order_id": "RGDBP-21314", "order_description": "Apple Macbook Pro 2019 x 1", "purchase_id": "6229667127", "outcome_amount": 56.151958, "outcome_currency": "btg" }, { "payment_id": 6100223670, "payment_status": "finished", "pay_address": "TNDFkiSmBQorNFacb3735q8MnT29sn8BLn", "price_amount": 5, "price_currency": "usd", "pay_amount": 165.652609, "actually_paid": 180, "pay_currency": "trx", "order_id": "RGDBP-21314", "order_description": "Apple Macbook Pro 2019 x 1", "purchase_id": "4944856743", "outcome_amount": 178.9005, "outcome_currency": "trx" } ], "limit": 10, "page": 0, "page_count": 100, "total_count": 1000 } ``` -------------------------------- ### Request Body Example Source: https://documenter.getpostman.com/view/7907941/S1a32n38?version=latest#7025cacf-7040-4c7b-a83f-f9ff0a22a822 This is an example of the JSON request body used to create a payment. It includes details like order description, callback URL, and network. ```json { "order_description": "Apple Macbook Pro 2019 x 1", "ipn_callback_url": "https://nowpayments.io", "created_at": "2020-12-22T15:00:22.742Z", "updated_at": "2020-12-22T15:00:22.742Z", "purchase_id": "5837122679", "amount_received": null, "payin_extra_id": null, "smart_contract": "", "network": "btc", "network_precision": 8, "time_limit": null, "burning_percent": null, "expiration_estimate_date": "2020-12-23T15:00:22.742Z" } ``` -------------------------------- ### Example Balance Response Source: https://documenter.getpostman.com/view/7907941/S1a32n38?version=latest#intro A sample JSON response showing available and pending amounts for different cryptocurrencies. ```json { "eth": { "amount": 0.0001817185463659148, "pendingAmount": 0 }, "trx": { "amount": 0, "pendingAmount": 0 }, "xmr": { "amount": 0, "pendingAmount": 0 } } ``` -------------------------------- ### Estimate Price Response Example Source: https://documenter.getpostman.com/view/7907941/S1a32n38?version=latest#7025cacf-7040-4c7b-a83f-f9ff0a22a822 This is an example of a successful JSON response when estimating a cryptocurrency price. It shows the original fiat currency and amount, the target cryptocurrency, and the estimated amount. ```json { "currency_from": "usd", "amount_from": 3999.5, "currency_to": "btc", "estimated_amount": 0.17061637 } ``` -------------------------------- ### Example IPN Callback Body Source: https://documenter.getpostman.com/view/7907941/S1a32n38 This is an example of the JSON payload structure you might receive in an Instant Payment Notification (IPN) callback request. ```json {"payment_id":5077125051,"payment_status":"waiting","pay_address":"0xd1cDE08A07cD25adEbEd35c3867a59228C09B606","price_amount":170,"price_currency":"usd","pay_amount":155.38559757,"actually_paid":0,"pay_currency":"mana","order_id":"2","order_description":"Apple Macbook Pro 2019 x 1","purchase_id":"6084744717","created_at":"2021-04-12T14:22:54.942Z","updated_at":"2021-04-12T14:23:06.244Z","outcome_amount":1131.7812095,"outcome_currency":"trx"} ``` -------------------------------- ### Example API Status Response Source: https://documenter.getpostman.com/view/7907941/S1a32n38?version=latest#intro A sample JSON response indicating the API is operational. ```json { "message": "OK" } ``` -------------------------------- ### Example Payout Status Response Source: https://documenter.getpostman.com/view/7907941/S1a32n38?version=latest#intro A sample JSON response detailing the status and information of a payout. ```json [ { "id": "", "address": "", "currency": "trx", "amount": "200", "batchWithdrawalId": "", "status": "WAITING", "extra_id": null, "hash": null, "error": null, "createdAt": "2020-11-12T17:06:12.791Z", "requestedAt": null, "updatedAt": null } ] ``` -------------------------------- ### cURL Authentication Request Source: https://documenter.getpostman.com/view/7907941/S1a32n38?version=latest#intro Example of how to authenticate using cURL by sending email and password in the request body. ```curl curl --location 'https://api.nowpayments.io/v1/auth' \ --data '{ \ "email": "your_email", \ "password": "your_password" \ }' ``` -------------------------------- ### Example cURL Request to Create Payment by Invoice Source: https://documenter.getpostman.com/view/7907941/S1a32n38?version=latest#7025cacf-7040-4c7b-a83f-f9ff0a22a822 This cURL command demonstrates how to send a POST request to the NOWPayments API to create a payment by invoice. Remember to replace '' with your actual API key. ```curl curl --location 'https://api.nowpayments.io/v1/invoice-payment' \ --header 'x-api-key: ' \ --header 'Content-Type: application/json' \ --data-raw '{ "iid": {{invoice_id}}, "pay_currency": "btc", "purchase_id": {{purchase_id}}, "order_description": "Apple Macbook Pro 2019 x 1", "customer_email": "test@gmail.com", "payout_address": "0x...", "payout_extra_id": null, "payout_currency": "usdttrc20" }' ``` -------------------------------- ### Create Payment Response Source: https://documenter.getpostman.com/view/7907941/S1a32n38?version=latest#7025cacf-7040-4c7b-a83f-f9ff0a22a822 This is a sample response received after successfully creating a payment. It includes the payment ID, status, and payment details. ```json { "payment_id": "5745459419", "payment_status": "waiting", "pay_address": "3EZ2uTdVDAMFXTfc6uLDDKR6o8qKBZXVkj", "price_amount": 3999.5, "price_currency": "usd", "pay_amount": 0.17070286, "pay_currency": "btc", "order_id": "RGDBP-21314" } ``` -------------------------------- ### GET /v1/full-currencies Source: https://documenter.getpostman.com/view/7907941/S1a32n38?version=latest#1c268f89-4fe7-471e-81b4-5a3153577b73 Retrieves detailed information about all cryptocurrencies available for payments. ```APIDOC ## GET /v1/full-currencies ### Description This is a method to obtain detailed information about all cryptocurrencies available for payments. ### Method GET ### Endpoint https://api.nowpayments.io/v1/full-currencies ### Headers - **x-api-key** - Required - ### Request Example ``` curl --location 'https://api.nowpayments.io/v1/full-currencies' \ --header 'x-api-key: ' ``` ### Response #### Success Response (200) - **currencies** (array) - An array of currency objects, each containing detailed information. #### Response Example ```json { "currencies": [ { "id": 121, "code": "AAVE", "name": "Aave", "enable": true, "wallet_regex": "^(0x)[0-9A-Fa-f]{40}$", "priority": 127, "extra_id_exists": false, "extra_id_regex": null, "logo_url": "/images/coins/aave.svg", "track": true, "cg_id": "aave", "is_maxlimit": false, "network": "eth", "smart_contract": null, "network_precision": null } ] } ``` ``` -------------------------------- ### GET Payment Status Source: https://documenter.getpostman.com/view/7907941/S1a32n38?version=latest#9998079f-dcc8-4e07-9ac7-3d52f0fd733a Retrieves the current status of a specific payment transaction using its ID. ```APIDOC ## GET Payment Status ### Description Retrieves the status of a specific payment. ### Method GET ### Endpoint /api/v1/payment/ ### Parameters #### Path Parameters - **payment_id** (string) - Required - The unique identifier of the payment. ### Request Example None ### Response #### Success Response (200) - **payment_id** (string) - Unique identifier for the payment. - **payment_status** (string) - The current status of the payment. - **pay_address** (string) - The deposit address. - **coin_amount** (float) - The amount of cryptocurrency to be sent. - **actually_paid** (float) - The amount actually paid. #### Response Example ```json { "payment_id": "pi_12345abcde", "payment_status": "finished", "pay_address": "1A1oP9o6AJb ANZ7J1y7L4f44z6p79Z", "coin_amount": 0.0005, "actually_paid": 0.0005 } ``` ``` -------------------------------- ### Verify Payout using cURL (Staging) Source: https://documenter.getpostman.com/view/7907941/S1a32n38?version=latest#intro Example cURL request to verify a payout on the staging environment. Note the specific URL and path variable. ```curl curl --location 'https://api.staging.nowpayments.io/v1/payout/5000000191/verify' ``` -------------------------------- ### GET /v1/balance Source: https://documenter.getpostman.com/view/7907941/S1a32n38?version=latest#c8399c0e-d798-4f01-83ae-ddaa6905c2da Retrieves your account balance in various currencies, including available and pending amounts. ```APIDOC ## GET /v1/balance ### Description This method returns your balance in different currencies. The response contains a list of currencies with two parameters: amount - available currency amount, and pendingAmount - currently processing currency amount. ### Method GET ### Endpoint https://api.nowpayments.io/v1/balance ### Headers - **x-api-key** - Required - - **Authorization** - Required - Bearer *your_jwt_token* ### Request Example ```bash curl --location 'https://api.nowpayments.io/v1/balance' \ --header 'x-api-key: ' \ --header 'Authorization: Bearer *your_jwt_token*' ``` ### Response #### Success Response (200) - **{currency_symbol}** (object) - An object containing the balance for a specific currency. - **amount** (number) - The available amount of the currency. - **pendingAmount** (number) - The amount of the currency currently being processed. #### Response Example ```json { "eth": { "amount": 0.0001817185463659148, "pendingAmount": 0 }, "trx": { "amount": 0, "pendingAmount": 0 }, "xmr": { "amount": 0, "pendingAmount": 0 } } ``` ``` -------------------------------- ### GET List of payments Source: https://documenter.getpostman.com/view/7907941/S1a32n38?version=latest#3e3ce25e-f43f-4636-bbd9-11560e46048b Retrieves a list of all payments made to your account, with options for filtering and pagination. ```APIDOC ## GET List of payments ### Description Retrieves a list of all payments made to your account. ### Method GET ### Endpoint /api/v1/payments ### Parameters #### Query Parameters - **limit** (integer) - Optional - Number of payments to return per page. - **page** (integer) - Optional - Page number for pagination. - **payment_status** (string) - Optional - Filter payments by status (e.g., 'waiting', 'finished'). - **date_from** (string) - Optional - Filter payments from a specific date (YYYY-MM-DD). - **date_to** (string) - Optional - Filter payments to a specific date (YYYY-MM-DD). ``` -------------------------------- ### Create Payment cURL Request Source: https://documenter.getpostman.com/view/7907941/S1a32n38?version=latest#7025cacf-7040-4c7b-a83f-f9ff0a22a822 This cURL command demonstrates how to send a POST request to create a payment. Ensure you replace '' with your actual API key. ```curl curl --location 'https://api.nowpayments.io/v1/payment' \ --header 'x-api-key: ' \ --header 'Content-Type: application/json' \ --data '{ "price_amount": 3999.5, "price_currency": "usd", "pay_currency": "btc", "ipn_callback_url": "https://nowpayments.io", "order_id": "RGDBP-21314", "order_description": "Apple Macbook Pro 2019 x 1" }' ``` -------------------------------- ### Get Estimated price Source: https://documenter.getpostman.com/view/7907941/S1a32n38?version=latest#3e3ce25e-f43f-4636-bbd9-11560e46048b Estimates the amount of a specific cryptocurrency required to match a given fiat or crypto amount. ```APIDOC ## GET Estimated price ### Description Estimates the amount of a specific cryptocurrency required to match a given fiat or crypto amount. ### Method GET ### Endpoint /api/v1/estimated-price ### Parameters #### Query Parameters - **currency_from** (string) - Required - The currency you want to pay with. - **currency_to** (string) - Required - The currency you want to receive in your outcome wallet. - **amount** (float) - Required - The amount you want to convert. ``` -------------------------------- ### Create Invoice Response Source: https://documenter.getpostman.com/view/7907941/S1a32n38?version=latest#1c268f89-4fe7-471e-81b4-5a3153577b73 This is an example of a successful response when creating an invoice. It includes the invoice ID, order details, and URLs for payment and redirection. ```json { "id": "4522625843", "order_id": "RGDBP-21314", "order_description": "Apple Macbook Pro 2019 x 1", "price_amount": "1000", "price_currency": "usd", "pay_currency": null, "ipn_callback_url": "https://nowpayments.io", "invoice_url": "https://nowpayments.io/payment/?iid=4522625843", "success_url": "https://nowpayments.io", "cancel_url": "https://nowpayments.io", "created_at": "2020-12-22T15:05:58.290Z", "updated_at": "2020-12-22T15:05:58.290Z" } ``` -------------------------------- ### Get Available Currencies Source: https://documenter.getpostman.com/view/7907941/S1a32n38?version=latest#1c268f89-4fe7-471e-81b4-5a3153577b73 Retrieves a list of all cryptocurrencies supported by the NOWPayments API. An API key is required for authentication. ```curl curl --location 'https://api.nowpayments.io/v1/currencies' \ --header 'x-api-key: ' ``` -------------------------------- ### POSTCreate payment by invoice Source: https://documenter.getpostman.com/view/7907941/S1a32n38?version=latest#41b02221-2d58-4fcf-9529-59d3763d6434 Creates a payment by invoice, allowing customers to complete payments on your website. It requires an invoice ID and the payment currency, with optional fields for purchase tracking, order descriptions, customer emails, and payout details. ```APIDOC ## POST /v1/invoice-payment ### Description Creates payment by invoice. With this method, your customer will be able to complete the payment without leaving your website. ### Method POST ### Endpoint https://api.nowpayments.io/v1/invoice-payment ### Headers - **x-api-key** - Required - Your API key - **Content-Type** - Required - application/json ### Parameters #### Request Body - **iid** (string) - Required - invoice id - **pay_currency** (string) - Required - the crypto currency in which the pay_amount is specified (e.g., btc, eth). Some currencies require additional fields like Memo or Destination Tag, which are provided in the `payin_extra_id` parameter of the response. - **purchase_id** (string) - Optional - id of purchase for which you want to create another payment, only used for several payments for one order. - **order_description** (string) - Optional - inner store order description, e.g., "Apple Macbook Pro 2019 x 1". - **customer_email** (string) - Optional - user email to which a notification about the successful completion of the payment will be sent. - **payout_address** (string) - Optional - the address to receive funds. Defaults to the address specified in your Personal account. - **payout_extra_id** (string) - Optional - extra id or memo or tag for external payout_address. - **payout_currency** (string) - Optional - currency of your external payout_address, required when payout_address is specified. ### Request Example ```json { "iid": {{invoice_id}}, "pay_currency": "btc", "purchase_id": {{purchase_id}}, "order_description": "Apple Macbook Pro 2019 x 1", "customer_email": "test@gmail.com", "payout_address": "0x...", "payout_extra_id": null, "payout_currency": "usdttrc20" } ``` ### Response #### Success Response (201 Created) - **payment_id** (string) - Unique identifier for the payment. - **payment_status** (string) - The current status of the payment (e.g., 'waiting', 'confirming', 'confirmed', 'sending', 'partially_paid', 'finished', 'failed', 'refunded', 'expired'). - **pay_address** (string) - The address to which the payment should be sent. - **price_amount** (number) - The total amount of the price in the price currency. - **price_currency** (string) - The currency in which the price is specified (e.g., 'usd'). - **pay_amount** (number) - The amount to be paid in the specified pay currency. - **pay_currency** (string) - The cryptocurrency used for payment. - **order_id** (string) - The order ID associated with the payment. - **order_description** (string) - The description of the order. - **ipn_callback_url** (string) - The URL for Instant Payment Notifications. - **created_at** (string) - The timestamp when the payment was created. - **updated_at** (string) - The timestamp when the payment was last updated. - **purchase_id** (string) - The purchase ID associated with the payment. - **amount_received** (number) - The amount of funds received so far. - **payin_extra_id** (string) - Extra ID or Memo/Tag required for certain cryptocurrencies. - **smart_contract** (string) - Smart contract address, if applicable. - **network** (string) - The blockchain network used for the payment. - **network_precision** (number) - The precision of the network. - **time_limit** (string) - The time limit for the payment. - **burning_percent** (number) - The percentage of funds to be burned. - **expiration_estimate_date** (string) - Estimated date of payment expiration. #### Response Example ```json { "payment_id": "5745459419", "payment_status": "waiting", "pay_address": "3EZ2uTdVDAMFXTfc6uLDDKR6o8qKBZXVkj", "price_amount": 3999.5, "price_currency": "usd", "pay_amount": 0.17070286, "pay_currency": "btc", "order_id": "RGDBP-21314", "order_description": "Apple Macbook Pro 2019 x 1", "ipn_callback_url": "https://nowpayments.io", "created_at": "2020-12-22T15:00:22.742Z", "updated_at": "2020-12-22T15:00:22.742Z", "purchase_id": "5837122679", "amount_received": null, "payin_extra_id": null, "smart_contract": "", "network": "btc", "network_precision": 8, "time_limit": null, "burning_percent": null, "expiration_estimate_date": "2020-12-23T15:00:22.742Z" } ``` ``` -------------------------------- ### Example Response for Created Payment by Invoice Source: https://documenter.getpostman.com/view/7907941/S1a32n38?version=latest#7025cacf-7040-4c7b-a83f-f9ff0a22a822 This JSON object shows a successful response when a payment by invoice is created. It includes details such as the payment ID, status, and payment addresses. ```json { "payment_id": "5745459419", "payment_status": "waiting", "pay_address": "3EZ2uTdVDAMFXTfc6uLDDKR6o8qKBZXVkj", "price_amount": 3999.5, "price_currency": "usd", "pay_amount": 0.17070286, "pay_currency": "btc", "order_id": "RGDBP-21314", "order_description": "Apple Macbook Pro 2019 x 1", "ipn_callback_url": "https://nowpayments.io", "created_at": "2020-12-22T15:00:22.742Z", "updated_at": "2020-12-22T15:00:22.742Z", "purchase_id": "5837122679", "amount_received": null, "payin_extra_id": null, "smart_contract": "", "network": "btc", "network_precision": 8, "time_limit": null, "burning_percent": null, "expiration_estimate_date": "2020-12-23T15:00:22.742Z" } ``` -------------------------------- ### Get Balance using cURL Source: https://documenter.getpostman.com/view/7907941/S1a32n38?version=latest#intro Retrieve your available and pending balances for various currencies. Requires your API key. ```curl curl --location 'https://api.nowpayments.io/v1/balance' \ --header 'x-api-key: ' \ --header 'Authorization: Bearer *your_jwt_token*' ``` -------------------------------- ### Example cURL Request for Invoice Payment Source: https://documenter.getpostman.com/view/7907941/S1a32n38?version=latest#0b77a8e3-2344-4760-a0bd-247da067db6d This cURL command demonstrates how to send a POST request to the NOWPayments API to create an invoice payment. It includes necessary headers and the JSON payload. ```curl curl --location 'https://api.nowpayments.io/v1/invoice-payment' \ --header 'x-api-key: ' \ --header 'Content-Type: application/json' \ --data-raw '{ "iid": {{invoice_id}}, "pay_currency": "btc", "purchase_id": {{purchase_id}}, "order_description": "Apple Macbook Pro 2019 x 1", "customer_email": "test@gmail.com", "payout_address": "0x...", "payout_extra_id": null, "payout_currency": "usdttrc20" }' ``` -------------------------------- ### GET List of payments Source: https://documenter.getpostman.com/view/7907941/S1a32n38 Retrieves a list of all payments made to your account. This provides a comprehensive overview of transaction history. ```APIDOC ## GET List of payments ### Description Gets the list of payments made to your account. ### Method GET ### Endpoint /api/v1/payments ``` -------------------------------- ### POSTCreate invoice Source: https://documenter.getpostman.com/view/7907941/S1a32n38?version=latest#1c268f89-4fe7-471e-81b4-5a3153577b73 Creates an invoice for a customer. The customer will be provided with a URL to complete the payment. Data must be sent as a JSON-object payload. ```APIDOC ## POST /v1/invoice ### Description Creates an invoice for a customer. The customer will be provided with a URL to complete the payment. Data must be sent as a JSON-object payload. ### Method POST ### Endpoint https://api.nowpayments.io/v1/invoice ### Parameters #### Header Parameters - **x-api-key** (string) - Required - Your API key. - **Content-Type** (string) - Required - application/json #### Request Body - **price_amount** (number) - Required - The amount to be paid in fiat currency. This will be converted to crypto if `pay_currency` is specified. - **price_currency** (string) - Required - The fiat currency of the `price_amount` (e.g., 'usd', 'eur'). - **pay_currency** (string) - Optional - The cryptocurrency to be used for payment (e.g., 'btc', 'eth'). If not specified, the user can choose on the invoice URL. - **ipn_callback_url** (string) - Optional - A URL to receive IPN callbacks. Must contain 'http' or 'https'. - **order_id** (string) - Optional - An internal store order ID. - **order_description** (string) - Optional - A description for the internal order. - **success_url** (string) - Optional - The URL to redirect the customer to after successful payment. - **cancel_url** (string) - Optional - The URL to redirect the customer to after a failed payment. ### Request Example ```json { "price_amount": 1000, "price_currency": "usd", "order_id": "RGDBP-21314", "order_description": "Apple Macbook Pro 2019 x 1", "ipn_callback_url": "https://nowpayments.io", "success_url": "https://nowpayments.io", "cancel_url": "https://nowpayments.io" } ``` ### Response #### Success Response (201 Created) - **id** (string) - The unique identifier for the invoice. - **order_id** (string) - The internal order ID provided in the request. - **order_description** (string) - The order description provided in the request. - **price_amount** (string) - The amount to be paid. - **price_currency** (string) - The currency of the `price_amount`. - **pay_currency** (string or null) - The cryptocurrency chosen for payment, or null if not specified. - **ipn_callback_url** (string) - The URL for IPN callbacks. - **invoice_url** (string) - The URL where the customer can complete the payment. - **success_url** (string) - The URL for successful payment redirection. - **cancel_url** (string) - The URL for failed payment redirection. - **created_at** (string) - The timestamp when the invoice was created. - **updated_at** (string) - The timestamp when the invoice was last updated. ### Response Example ```json { "id": "4522625843", "order_id": "RGDBP-21314", "order_description": "Apple Macbook Pro 2019 x 1", "price_amount": "1000", "price_currency": "usd", "pay_currency": null, "ipn_callback_url": "https://nowpayments.io", "invoice_url": "https://nowpayments.io/payment/?iid=4522625843", "success_url": "https://nowpayments.io", "cancel_url": "https://nowpayments.io", "created_at": "2020-12-22T15:05:58.290Z", "updated_at": "2020-12-22T15:05:58.290Z" } ``` ``` -------------------------------- ### GET Payment Status Source: https://documenter.getpostman.com/view/7907941/S1a32n38 Retrieves the status of a specific payment. This method is used to track the progress of a payment after it has been initiated. ```APIDOC ## GET Payment Status ### Description Gets the status of a payment. ### Method GET ### Endpoint /api/v1/payment-status/{payment_id} ```