GET /v1/invoice-payment
Returns the payment linked to an invoice, or a message if no payment has been created yet. Requires authentication.
Request
Section titled “Request”GET /v1/invoice-payment?invoiceId={id}Query Parameters
Section titled “Query Parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
invoiceId | string | Yes | The invoice ID to look up |
Example
Section titled “Example”curl "https://api.nearpayments.io/v1/invoice-payment?invoiceId=a1b2c3d4-e5f6-..." \ -H "x-api-key: YOUR_API_KEY"Response (payment exists)
Section titled “Response (payment exists)”{ "payment_id": 1, "payment_status": "waiting", "pay_address": "bc1q...", "price_amount": 50, "price_currency": "usd", "pay_amount": 0.00058, "actually_paid": 0, "pay_currency": "btc", "order_id": "inv-100", "order_description": null, "purchase_id": "5234123456", "outcome_amount": 0, "outcome_currency": "usdc", "created_at": "2025-01-15T10:30:00.000Z", "updated_at": "2025-01-15T10:30:00.000Z"}Response (no payment yet)
Section titled “Response (no payment yet)”{ "message": "No payment created for this invoice yet"}