{"files":{"SKILL.md":"---\nname: nowpayments-api\ndescription: \"NOWPayments API skill. Use when working with NOWPayments for subscriptions, sub-partner, estimate. Covers 35 endpoints.\"\nversion: 1.0.0\ngenerator: lapsh\n---\n\n# NOWPayments API\n\n## Auth\nApiKey x-api-key in header\n\n## Base URL\nNot specified.\n\n## Setup\n1. Set your API key in the appropriate header\n2. GET /v1/subscriptions/plans/:plan-id -- this method allows you to obtain information about your payment plan\n3. POST /v1/subscriptions/plans -- create first plan\n\n## Endpoints\n35 endpoints across 14 groups. See references/api-spec.lap for full details.\n\n### Subscriptions\n| Method | Path | Description |\n|--------|------|-------------|\n| POST | /v1/subscriptions/plans | This is the method to create a Recurring Payments plan |\n| PATCH | /v1/subscriptions/plans/:plan-id | This method allows you to add necessary changes to a created plan |\n| GET | /v1/subscriptions/plans/:plan-id | This method allows you to obtain information about your payment plan |\n| GET | /v1/subscriptions/plans | This method allows you to obtain information about all the payment plans you’ve created |\n| POST | /v1/subscriptions | This method allows you to send payment links to your customers via email |\n| GET | /v1/subscriptions | The method allows you to view the entire list of recurring payments filtered by payment status and/or payment plan id |\n| GET | /v1/subscriptions/:sub_id | Get information about a particular recurring payment via its ID |\n| DELETE | /v1/subscriptions/:sub_id | Completely removes a particular payment from the recurring payment plan |\n| POST | /v1/subscriptions | This method creates a recurring charge from a sub-account |\n\n### Sub-partner\n| Method | Path | Description |\n|--------|------|-------------|\n| POST | /v1/sub-partner/balance | This is a method to create a sub-partner account for your user |\n| GET | /v1/sub-partner/balance/:id | This request can be made only from a whitelisted IP |\n| GET | /v1/sub-partner | This method returns the entire list of your sub-partners |\n| GET | /v1/sub-partner/transfers | Returns the entire list of transfers created by your sub-partners |\n| GET | /v1/sub-partner/transfer/:id | Get the actual information about the transfer |\n| POST | /v1/sub-partner/transfer | This method allows creating transfers between sub-partners' accounts |\n| POST | /v1/sub-partner/payment | This method allows you to top up a sub-partner account with a general payment |\n| POST | /v1/sub-partner/deposit | This is a method for transferring funds from a master account to a sub-partner's one |\n| POST | /v1/sub-partner/write-off | With this method you can withdraw funds from a sub-partner's account and transfer them to a master one |\n\n### Estimate\n| Method | Path | Description |\n|--------|------|-------------|\n| GET | /v1/estimate | This is a method for calculating the approximate price in cryptocurrency for a given value in Fiat currency |\n\n### Payment\n| Method | Path | Description |\n|--------|------|-------------|\n| POST | /v1/payment | Creates payment |\n| POST | /v1/payment/:id/update-merchant-estimate | This endpoint is required to get the current estimate on the payment, and update the current estimate |\n| GET | /v1/payment/:payment_id | Get the actual information about the payment |\n| GET | /v1/payment/ | Returns the entire list of all transactions, created with certain API key |\n\n### Invoice-payment\n| Method | Path | Description |\n|--------|------|-------------|\n| POST | /v1/invoice-payment | Creates payment by invoice |\n\n### Min-amount\n| Method | Path | Description |\n|--------|------|-------------|\n| GET | /v1/min-amount | Get the minimum payment amount for a specific pair |\n\n### Invoice\n| Method | Path | Description |\n|--------|------|-------------|\n| POST | /v1/invoice | Creates an invoice |\n\n### Currencies\n| Method | Path | Description |\n|--------|------|-------------|\n| GET | /v1/currencies | This is a method for obtaining information about all cryptocurrencies available for payments |\n\n### Full-currencies\n| Method | Path | Description |\n|--------|------|-------------|\n| GET | /v1/full-currencies | This is a method to obtain detailed information about all cryptocurrencies available for payments |\n\n### Merchant\n| Method | Path | Description |\n|--------|------|-------------|\n| GET | /v1/merchant/coins | This is a method for obtaining information about the cryptocurrencies available for payments |\n\n### Payout\n| Method | Path | Description |\n|--------|------|-------------|\n| POST | /v1/payout | This is the method to create a payout |\n| GET | /v1/payout/<payout_id> | Get the actual information about the payout |\n| POST | /v1/payout/:withdrawals-id/verify | This method is required to verify payouts by using your 2fa code |\n\n### Balance\n| Method | Path | Description |\n|--------|------|-------------|\n| GET | /v1/balance | This method returns your balance in different currencies |\n\n### Status\n| Method | Path | Description |\n|--------|------|-------------|\n| GET | /v1/status | This is a method to get information about the current state of the API |\n\n### Auth\n| Method | Path | Description |\n|--------|------|-------------|\n| POST | /v1/auth | Authentication method for obtaining a JWT token |\n\n## Common Questions\nMatch user requests to endpoints in references/api-spec.lap. Key patterns:\n- \"Create a plan?\" -> POST /v1/subscriptions/plans\n- \"List all :plan-id?\" -> GET /v1/subscriptions/plans/:plan-id\n- \"List all plans?\" -> GET /v1/subscriptions/plans\n- \"Create a subscription?\" -> POST /v1/subscriptions\n- \"List all subscriptions?\" -> GET /v1/subscriptions\n- \"List all :sub_id?\" -> GET /v1/subscriptions/:sub_id\n- \"Create a balance?\" -> POST /v1/sub-partner/balance\n- \"List all :id?\" -> GET /v1/sub-partner/balance/:id\n- \"List all sub-partner?\" -> GET /v1/sub-partner\n- \"List all transfers?\" -> GET /v1/sub-partner/transfers\n- \"Create a transfer?\" -> POST /v1/sub-partner/transfer\n- \"Create a payment?\" -> POST /v1/sub-partner/payment\n- \"Create a deposit?\" -> POST /v1/sub-partner/deposit\n- \"Create a write-off?\" -> POST /v1/sub-partner/write-off\n- \"List all estimate?\" -> GET /v1/estimate\n- \"Create a invoice-payment?\" -> POST /v1/invoice-payment\n- \"Create a update-merchant-estimate?\" -> POST /v1/payment/:id/update-merchant-estimate\n- \"List all :payment_id?\" -> GET /v1/payment/:payment_id\n- \"List all min-amount?\" -> GET /v1/min-amount\n- \"List all payment?\" -> GET /v1/payment/\n- \"Create a invoice?\" -> POST /v1/invoice\n- \"List all currencies?\" -> GET /v1/currencies\n- \"List all full-currencies?\" -> GET /v1/full-currencies\n- \"List all coins?\" -> GET /v1/merchant/coins\n- \"Create a payout?\" -> POST /v1/payout\n- \"List all <payout_id>?\" -> GET /v1/payout/<payout_id>\n- \"List all balance?\" -> GET /v1/balance\n- \"Create a verify?\" -> POST /v1/payout/:withdrawals-id/verify\n- \"List all status?\" -> GET /v1/status\n- \"Create a auth?\" -> POST /v1/auth\n- \"How to authenticate?\" -> See Auth section above\n\n## Response Tips\n- Check response schemas in references/api-spec.lap for field details\n- Paginated endpoints accept limit/offset or cursor parameters\n- Create/update endpoints return the modified resource on success\n\n## References\n- Full spec: See references/api-spec.lap for complete endpoint details, parameter tables, and response schemas\n\n> Generated from the official API spec by [LAP](https://lap.sh)\n","references/api-spec.lap":"@lap v0.3\n# Machine-readable API spec. Each @endpoint block is one API call.\n@api NOWPayments API\n@auth ApiKey x-api-key in header\n@endpoints 35\n@hint download_for_search\n@toc subscriptions(9), sub-partner(9), estimate(1), payment(4), invoice-payment(1), min-amount(1), invoice(1), currencies(1), full-currencies(1), merchant(1), payout(3), balance(1), status(1), auth(1)\n\n@group subscriptions\n@endpoint POST /v1/subscriptions/plans\n@desc This is the method to create a Recurring Payments plan\n@required {title: str, interval_day: int, amount: int, currency: str}\n@returns(200) {result: map}\n\n@endpoint PATCH /v1/subscriptions/plans/:plan-id\n@desc This method allows you to add necessary changes to a created plan\n@required {plan-id: str, title: str, interval_day: int, amount: int, currency: str}\n@returns(200) {result: map}\n\n@endpoint GET /v1/subscriptions/plans/:plan-id\n@desc This method allows you to obtain information about your payment plan\n@required {plan-id: str}\n@returns(200) {result: map}\n\n@endpoint GET /v1/subscriptions/plans\n@desc This method allows you to obtain information about all the payment plans you’ve created\n@optional {limit: str # Number, offset: str # Number}\n@returns(200) {result: [map], count: int}\n\n@endpoint POST /v1/subscriptions\n@desc This method allows you to send payment links to your customers via email\n@required {subscription_plan_id: int, email: str}\n@returns(200) {result: map}\n\n@endpoint GET /v1/subscriptions\n@desc The method allows you to view the entire list of recurring payments filtered by payment status and/or payment plan id\n@optional {status: str # \"WAITING_PAY\" / \"PAID\" /  \"PARTIALLY_PAID\" / \"EXPIRED\", subscription_plan_id: str, is_active: str # true / false, limit: str, offset: str}\n@returns(200) {result: [map], count: int}\n\n@endpoint GET /v1/subscriptions/:sub_id\n@desc Get information about a particular recurring payment via its ID\n@required {sub_id: str}\n@returns(200) {result: map}\n\n@endpoint DELETE /v1/subscriptions/:sub_id\n@desc Completely removes a particular payment from the recurring payment plan\n@required {sub_id: str}\n@returns(200) {result: str}\n\n@endgroup\n\n@group sub-partner\n@endpoint POST /v1/sub-partner/balance\n@desc This is a method to create a sub-partner account for your user\n@required {name: str}\n@returns(200) {result: map}\n\n@endgroup\n\n@group subscriptions\n@endpoint POST /v1/subscriptions\n@desc This method creates a recurring charge from a sub-account\n@required {subscription_plan_id: int, sub_partner_id: int}\n@returns(200) {result: map}\n\n@endgroup\n\n@group sub-partner\n@endpoint GET /v1/sub-partner/balance/:id\n@desc This request can be made only from a whitelisted IP\n@required {id: str}\n@returns(200) {result: map}\n\n@endpoint GET /v1/sub-partner\n@desc This method returns the entire list of your sub-partners\n@optional {id: str # int or array of int (optional), offset: str # (optional) default 0, limit: str # (optional) default 10, order: str # ASC / DESC (optional) default ASC}\n@returns(200) {result: [map], count: int}\n\n@endpoint GET /v1/sub-partner/transfers\n@desc Returns the entire list of transfers created by your sub-partners\n@optional {id: str # int or array of int (optional), status: str # string or array of string  \"WAITING\"/\"CREATED\"/\"FINISHED\"/\"REJECTED\" (optional), limit: str # (optional) default 10, offset: str # (optional) default 0, order: str # ASC / DESC (optional) default ASC}\n@returns(200) {result: [map], count: int}\n\n@endpoint GET /v1/sub-partner/transfer/:id\n@desc Get the actual information about the transfer\n@required {id: str}\n@returns(200) {result: map}\n\n@endpoint POST /v1/sub-partner/transfer\n@desc This method allows creating transfers between sub-partners' accounts\n@required {currency: str, amount: num, from_id: int, to_id: int}\n\n@endpoint POST /v1/sub-partner/payment\n@desc This method allows you to top up a sub-partner account with a general payment\n@required {currency: str, amount: num, sub_partner_id: str, fixed_rate: bool}\n@returns(200) {result: map}\n\n@endpoint POST /v1/sub-partner/deposit\n@desc This is a method for transferring funds from a master account to a sub-partner's one\n@required {currency: str, amount: num, sub_partner_id: str}\n\n@endpoint POST /v1/sub-partner/write-off\n@desc With this method you can withdraw funds from a sub-partner's account and transfer them to a master one\n@required {currency: str, amount: num, sub_partner_id: str}\n\n@endgroup\n\n@group estimate\n@endpoint GET /v1/estimate\n@desc This is a method for calculating the approximate price in cryptocurrency for a given value in Fiat currency\n@optional {amount: str, currency_from: str, currency_to: str}\n@returns(200) {currency_from: str, amount_from: num, currency_to: str, estimated_amount: num}\n\n@endgroup\n\n@group payment\n@endpoint POST /v1/payment\n@desc Creates payment\n@required {price_amount: num, price_currency: str, pay_currency: str, ipn_callback_url: str, order_id: str, order_description: str, is_fixed_rate: bool, is_fee_paid_by_user: bool}\n@returns(201) {payment_id: str, payment_status: str, pay_address: str, price_amount: num, price_currency: str, pay_amount: num, pay_currency: str, order_id: str, order_description: str, ipn_callback_url: str, created_at: str, updated_at: str, purchase_id: str, amount_received: any?, payin_extra_id: any?, smart_contract: str, network: str, network_precision: int, time_limit: any?, burning_percent: any?, expiration_estimate_date: str}\n\n@endgroup\n\n@group invoice-payment\n@endpoint POST /v1/invoice-payment\n@desc Creates payment by invoice\n@returns(201) {payment_id: str, payment_status: str, pay_address: str, price_amount: num, price_currency: str, pay_amount: num, pay_currency: str, order_id: str, order_description: str, ipn_callback_url: str, created_at: str, updated_at: str, purchase_id: str, amount_received: any?, payin_extra_id: any?, smart_contract: str, network: str, network_precision: int, time_limit: any?, burning_percent: any?, expiration_estimate_date: str}\n\n@endgroup\n\n@group payment\n@endpoint POST /v1/payment/:id/update-merchant-estimate\n@desc This endpoint is required to get the current estimate on the payment, and update the current estimate\n@required {id: str # payment ID, for which you want to get the estimate}\n@returns(200) {id: str, token_id: str, pay_amount: num, expiration_estimate_date: str}\n\n@endpoint GET /v1/payment/:payment_id\n@desc Get the actual information about the payment\n@required {payment_id: str}\n@returns(200) {payment_id: int, payment_status: str, pay_address: str, price_amount: int, price_currency: str, pay_amount: num, actually_paid: int, pay_currency: str, order_id: str, order_description: str, purchase_id: str, created_at: str, updated_at: str, outcome_amount: num, outcome_currency: str}\n\n@endgroup\n\n@group min-amount\n@endpoint GET /v1/min-amount\n@desc Get the minimum payment amount for a specific pair\n@optional {currency_from: str, currency_to: str}\n@returns(200) {currency_from: str, currency_to: str, min_amount: num, fiat_equivalent: num}\n\n@endgroup\n\n@group payment\n@endpoint GET /v1/payment/\n@desc Returns the entire list of all transactions, created with certain API key\n@optional {limit: str, page: str, sortBy: str, orderBy: str, dateFrom: str, dateTo: str}\n@returns(200) {data: [map], limit: int, page: int, pagesCount: int, total: int}\n\n@endgroup\n\n@group invoice\n@endpoint POST /v1/invoice\n@desc Creates an invoice\n@required {price_amount: int, price_currency: str, order_id: str, order_description: str, ipn_callback_url: str, success_url: str, cancel_url: str, partially_paid_url: str, is_fixed_rate: bool, is_fee_paid_by_user: bool}\n@returns(201) {id: str, order_id: str, order_description: str, price_amount: str, price_currency: str, pay_currency: any?, ipn_callback_url: str, invoice_url: str, success_url: str, cancel_url: str, created_at: str, updated_at: str}\n\n@endgroup\n\n@group currencies\n@endpoint GET /v1/currencies\n@desc This is a method for obtaining information about all cryptocurrencies available for payments\n@returns(200) {currencies: [str]}\n\n@endgroup\n\n@group full-currencies\n@endpoint GET /v1/full-currencies\n@desc This is a method to obtain detailed information about all cryptocurrencies available for payments\n\n@endgroup\n\n@group merchant\n@endpoint GET /v1/merchant/coins\n@desc This is a method for obtaining information about the cryptocurrencies available for payments\n@returns(200) {currencies: [str]}\n\n@endgroup\n\n@group payout\n@endpoint POST /v1/payout\n@desc This is the method to create a payout\n@required {ipn_callback_url: str, withdrawals: [map]}\n@returns(200) {id: str, withdrawals: [map]}\n\n@endpoint GET /v1/payout/<payout_id>\n@desc Get the actual information about the payout\n\n@endgroup\n\n@group balance\n@endpoint GET /v1/balance\n@desc This method returns your balance in different currencies\n@returns(200) {eth: map, trx: map, xmr: map}\n\n@endgroup\n\n@group payout\n@endpoint POST /v1/payout/:withdrawals-id/verify\n@desc This method is required to verify payouts by using your 2fa code\n@required {withdrawals-id: str, verification_code: str}\n\n@endgroup\n\n@group status\n@endpoint GET /v1/status\n@desc This is a method to get information about the current state of the API\n@returns(200) {message: str}\n\n@endgroup\n\n@group auth\n@endpoint POST /v1/auth\n@desc Authentication method for obtaining a JWT token\n@required {email: str, password: str}\n@returns(200) {token: str}\n\n@endgroup\n\n@end\n"}}