{
    "info": {
        "name": "Paynet API v1",
        "description": "Set the api_key collection variable to your key (Dashboard > API keys). Docs: https://paynet.am/docs/api",
        "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
    },
    "auth": {
        "type": "apikey",
        "apikey": [
            {
                "key": "key",
                "value": "X-Paynet-Key",
                "type": "string"
            },
            {
                "key": "value",
                "value": "{{api_key}}",
                "type": "string"
            },
            {
                "key": "in",
                "value": "header",
                "type": "string"
            }
        ]
    },
    "variable": [
        {
            "key": "base_url",
            "value": "https://paynet.am/api"
        },
        {
            "key": "api_key",
            "value": "sk_test_..."
        }
    ],
    "item": [
        {
            "name": "Billing",
            "item": [
                {
                    "name": "Current prices",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/v1/billing/pricing",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "v1",
                                "billing",
                                "pricing"
                            ],
                            "query": [],
                            "variable": []
                        },
                        "description": "Current prices\n\nPublic, no key needed. Paynet charges exactly two things: a price per completed live payment (free under a small amount) and a price per e-HDM fiscal receipt (free when the receipt belongs to a payment taken through Paynet). Prices are whole AMD."
                    }
                },
                {
                    "name": "Your balances",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/v1/billing/balances",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "v1",
                                "billing",
                                "balances"
                            ],
                            "query": [],
                            "variable": []
                        },
                        "description": "Your balances\n\nHow many transactions and receipts you have left. Units are counts that never expire. `grace_floor` is how far below zero you may go before new live payments are refused; `blocked` says whether that has happened; `unlimited` accounts consume nothing."
                    }
                },
                {
                    "name": "Buy transactions or receipts",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Idempotency-Key",
                                "value": "purchase-2026-10-01-a",
                                "disabled": false
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/v1/billing/purchases",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "v1",
                                "billing",
                                "purchases"
                            ],
                            "query": [],
                            "variable": []
                        },
                        "description": "Buy transactions or receipts\n\nSend an `Idempotency-Key` header (any unique string per attempt); a retry with the same key returns the original purchase with 200 instead of 201. Preset quantities can be paid by card via the returned `checkout_url`; any other quantity is paid by bank transfer using `reference`, and is credited when the transfer arrives. Needs a verified business (403 `VERIFICATION_REQUIRED` otherwise) and at least the minimum quantity (422 `below_minimum`).",
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"counter\": \"transactions\",\n    \"quantity\": 500\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Ledger",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/v1/billing/ledger?counter=transactions&cursor=&per_page=50",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "v1",
                                "billing",
                                "ledger"
                            ],
                            "query": [
                                {
                                    "key": "counter",
                                    "value": "transactions",
                                    "disabled": true
                                },
                                {
                                    "key": "cursor",
                                    "value": "",
                                    "disabled": true
                                },
                                {
                                    "key": "per_page",
                                    "value": "50",
                                    "disabled": true
                                }
                            ],
                            "variable": []
                        },
                        "description": "Ledger\n\nEvery change to your balances, newest first: signup grant, purchases, one row per payment or receipt consumed, adjustments. Cursor-paginated; pass `next_cursor` back as `cursor` to continue."
                    }
                },
                {
                    "name": "Auto top-up settings",
                    "request": {
                        "method": "PUT",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/v1/billing/auto-topup/:counter",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "v1",
                                "billing",
                                "auto-topup",
                                ":counter"
                            ],
                            "query": [],
                            "variable": [
                                {
                                    "key": "counter",
                                    "value": "transactions"
                                }
                            ]
                        },
                        "description": "Auto top-up settings\n\nWhen a counter falls to `threshold_qty`, Paynet prepares a purchase of `refill_qty` and emails you a one-click link to pay it. `counter` in the path is `transactions` or `receipts`.",
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"enabled\": true,\n    \"threshold_qty\": 50,\n    \"refill_qty\": 500\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                }
            ]
        },
        {
            "name": "Payments",
            "item": [
                {
                    "name": "List payments",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/v1/payments?status=completed&processor=idram&order_id=ORD-2024-001&from=2024-01-01&to=2024-01-31&per_page=25",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "v1",
                                "payments"
                            ],
                            "query": [
                                {
                                    "key": "status",
                                    "value": "completed",
                                    "disabled": true
                                },
                                {
                                    "key": "processor",
                                    "value": "idram",
                                    "disabled": true
                                },
                                {
                                    "key": "order_id",
                                    "value": "ORD-2024-001",
                                    "disabled": true
                                },
                                {
                                    "key": "from",
                                    "value": "2024-01-01",
                                    "disabled": true
                                },
                                {
                                    "key": "to",
                                    "value": "2024-01-31",
                                    "disabled": true
                                },
                                {
                                    "key": "per_page",
                                    "value": "25",
                                    "disabled": true
                                }
                            ],
                            "variable": []
                        },
                        "description": "List payments\n\nA paginated list of your payments, newest first. Scoped to the key's environment: a test key lists only sandbox payments, a live key only live ones. Filter by status, processor slug, order_id and a created_at date range."
                    }
                },
                {
                    "name": "Create a new payment transaction",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Idempotency-Key",
                                "value": "order-12345-attempt-1",
                                "disabled": true
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/v1/payments",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "v1",
                                "payments"
                            ],
                            "query": [],
                            "variable": []
                        },
                        "description": "Create a new payment transaction\n\nThe minimum is amount (whole AMD), order_id and return_url: the buyer then picks a payment method on the hosted checkout from what you have turned on for the domain. Send processor to pre-select one, and redirect_mode=direct to skip the hosted page and go straight to that provider. Returns 201 Created with the payment details and a checkout URL. If an Idempotency-Key header is provided and the same key was used within the last 24 hours, the original response is returned with HTTP 200 (not 201). Send customer_email and customer_name when you have them: they are optional and never required to take a payment, but they are what lets a merchant see who paid, match repeat buyers, and follow up on an order. Without them a payment is anonymous to everyone but the bank.",
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"amount\": 5000,\n    \"currency\": \"AMD\",\n    \"order_id\": \"ORD-1001\",\n    \"description\": \"Order #1001, 2 items\",\n    \"return_url\": \"https:shop.example.com/checkout/thank-you\",\n    \"cancel_url\": \"https:shop.example.com/checkout/cancelled\",\n    \"callback_url\": \"https:shop.example.com/paynet/webhook\",\n    \"customer_email\": \"buyer@example.com\",\n    \"customer_name\": \"Anna Petrosyan\",\n    \"customer_phone\": \"+37491123456\",\n    \"customer_reference\": \"user-4821\",\n    \"domain\": \"shop.example.com\",\n    \"redirect_mode\": \"hosted\",\n    \"language\": \"hy\",\n    \"metadata\": {\n        \"customer_id\": \"42\"\n    },\n    \"customer\": {\n        \"id\": \"cus_01j8z5x3k2q7w9m4n6p0r1s2t3\",\n        \"reference\": \"user-4821\",\n        \"email\": \"buyer@example.com\",\n        \"name\": \"Anna Petrosyan\",\n        \"phone\": \"+37491123456\"\n    },\n    \"items\": [\n        {\n            \"name\": \"Cotton T-shirt\",\n            \"code\": \"SKU-1001\",\n            \"quantity\": 2,\n            \"price\": 2500,\n            \"unit\": \"pcs\"\n        }\n    ]\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Retrieve a payment by UUID",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/v1/payments/:uuid",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "v1",
                                "payments",
                                ":uuid"
                            ],
                            "query": [],
                            "variable": [
                                {
                                    "key": "uuid",
                                    "value": "01234567-89ab-cdef-0123-456789abcdef"
                                }
                            ]
                        },
                        "description": "Retrieve a payment by UUID\n\nScoped to the authenticated merchant - a merchant cannot retrieve another merchant's transactions (returns 404, not 403)."
                    }
                },
                {
                    "name": "Refund a completed payment (full or partial)",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Idempotency-Key",
                                "value": "refund-1001-attempt-1",
                                "disabled": true
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/v1/payments/:uuid/refund",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "v1",
                                "payments",
                                ":uuid",
                                "refund"
                            ],
                            "query": [],
                            "variable": [
                                {
                                    "key": "uuid",
                                    "value": "01234567-89ab-cdef-0123-456789abcdef"
                                }
                            ]
                        },
                        "description": "Refund a completed payment (full or partial)\n\nBody: amount (optional, defaults to the full remaining balance) and reason (optional). Returns the refund object. Send an Idempotency-Key header to make retries safe: the same key on the same payment returns the same refund (200 on replay, 201 when created). Without it a second call is a second refund, so after a timeout read the payment back (GET /payments/{uuid}) before retrying. Payments-only API keys get 403 insufficient_scope here.",
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"amount\": 1000,\n    \"reason\": \"Customer returned one item\"\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Payment status by your own order id",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "X-Paynet-Connect",
                                "value": "pnct_...",
                                "disabled": true
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/v1/orders/:orderId/payment",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "v1",
                                "orders",
                                ":orderId",
                                "payment"
                            ],
                            "query": [],
                            "variable": [
                                {
                                    "key": "orderId",
                                    "value": "ORD-2024-001"
                                }
                            ]
                        },
                        "description": "Payment status by your own order id\n\nThe \"pull\" half of webhook verification: treat a webhook as a nudge and call this endpoint to learn the real state from us. Scoped to the key or connect token, so a store can only read its own orders. Returns the most decisive payment for the order: a final record (completed, refunded) wins over a stale pending one."
                    }
                }
            ]
        },
        {
            "name": "Payment links",
            "item": [
                {
                    "name": "List payment links",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/v1/payment-links",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "v1",
                                "payment-links"
                            ],
                            "query": [],
                            "variable": []
                        },
                        "description": "List payment links\n\nYour payment links, newest first, with their status and counters. Paginated."
                    }
                },
                {
                    "name": "Create a payment link",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/v1/payment-links",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "v1",
                                "payment-links"
                            ],
                            "query": [],
                            "variable": []
                        },
                        "description": "Create a payment link\n\nA hosted payment page you can share anywhere: a fixed amount, or a range the buyer chooses from. The link is paid through the providers of the domain you name. Returns the link with its public URL and QR.",
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"domain\": \"shop.example.com\",\n    \"title\": \"Yoga class, October\",\n    \"description\": \"8 sessions, Tuesdays and Thursdays\",\n    \"amount\": 15000,\n    \"currency\": \"AMD\"\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Retrieve a payment link",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/v1/payment-links/:uuid",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "v1",
                                "payment-links",
                                ":uuid"
                            ],
                            "query": [],
                            "variable": [
                                {
                                    "key": "uuid",
                                    "value": "01234567-89ab-cdef-0123-456789abcdef"
                                }
                            ]
                        },
                        "description": "Retrieve a payment link\n\nOne payment link by UUID, with its status, counters and public URL. Scoped to your account (404 otherwise)."
                    }
                },
                {
                    "name": "Disable a payment link",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/v1/payment-links/:uuid/disable",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "v1",
                                "payment-links",
                                ":uuid",
                                "disable"
                            ],
                            "query": [],
                            "variable": [
                                {
                                    "key": "uuid",
                                    "value": "01234567-89ab-cdef-0123-456789abcdef"
                                }
                            ]
                        },
                        "description": "Disable a payment link\n\nThe link stops accepting payments at once; its page tells buyers it is no longer available. Re-enable it from the dashboard."
                    }
                }
            ]
        },
        {
            "name": "Payment methods",
            "item": [
                {
                    "name": "Payment methods available to a store",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/v1/processors?domain=shop.example.com",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "v1",
                                "processors"
                            ],
                            "query": [
                                {
                                    "key": "domain",
                                    "value": "shop.example.com",
                                    "disabled": true
                                }
                            ],
                            "variable": []
                        },
                        "description": "Payment methods available to a store\n\nThe providers you have turned on for the domain, with the names buyers see. Plugins use it to offer one checkout option per method. Pass `?domain=` on server-to-server calls; connect tokens already know their store."
                    }
                }
            ]
        }
    ]
}