Invoices & Payment Links
Invoices & Payment Links
The Morph Payments API exposes two endpoints for collecting a payment:
- Create Payment Link — a shareable checkout URL for a fixed amount.
- Create Invoice — a payment link plus payer details, a due date, and optional line items.
All requests must be authenticated with your
API Key. The gateway resolves your merchant identity from the API Key, so you do
not send merchant_id in the body or query — it is ignored if present.
Base URL
https://pay-openapi.morph.network/pro/merchant/payin/v1
Endpoint paths in this page are relative to that base URL.
Response envelope
Every response is wrapped in a common envelope:
{
"error_code": 0,
"msg": "success",
"data": {},
"trace": "..."
}
Business success or failure is determined by error_code (error_code == 0
means success), not by the HTTP status code alone. See the
Error Codes reference for the full list.
Validation rules
Before a payment resource is created, the request is validated. If any check fails, the corresponding error code is returned and nothing is created:
- Receiving token & chain —
(receiving_network, receiving_token_symbol, receiving_token_address)must match a supported, active entry in the Supported Tokens & Networks list. An unsupported chain returns90111; a token that does not match the chain returns90120. - Receiving wallet —
receiving_addressmust be a receiving wallet you have configured at https://account.morph.network/ under your merchant account, and it must be bound toreceiving_network. An address that is not yours returns90112; a wallet not bound to that chain returns90111. - Allowlist —
support_networksandsupport_tokensare required. Eachsupport_tokens[]entry must also match the supported list. The allowlist must include the primary receiving token, andsupport_networksmust equal the deduplicated set ofsupport_tokens[].network.
Create Payment Link
POST /payment-links
Request fields
| Field | Type | Required | Description |
|---|---|---|---|
amount | string | Yes | Payment amount. |
receiving_network | string | Yes | Primary receiving chain. |
receiving_token_symbol | string | Yes | Primary receiving token symbol. |
receiving_token_address | string | Yes | Primary receiving token contract address. |
receiving_address | string | Yes | Receiving address — must be a wallet configured at account.morph.network and bound to the chain. |
description | string | No | Description. |
support_networks | string[] | Yes | Allowlisted chains for the payment. |
support_tokens | object[] | Yes | Allowlisted tokens (network / address / symbol). |
Request example
{
"amount": "100.00",
"receiving_network": "morph",
"receiving_token_symbol": "USDT",
"receiving_token_address": "0xe7cd86e13ac4309349f30b3435a9d337750fc82d",
"receiving_address": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
"description": "July subscription",
"support_networks": ["morph"],
"support_tokens": [
{
"network": "morph",
"address": "0xe7cd86e13ac4309349f30b3435a9d337750fc82d",
"symbol": "USDT"
}
]
}
Success response
{
"error_code": 0,
"msg": "success",
"data": {
"payin_id": "plink_01HXXX",
"payment_link_url": "https://pay.example.com/paylink/eyJ...",
"status": "ACTIVE"
},
"trace": "..."
}
Create Invoice
POST /invoices
An invoice takes every Payment Link field plus the invoice-specific fields
payer, due_date, and items.
Request fields
| Field | Type | Required | Description |
|---|---|---|---|
amount | string | Yes | Payment amount. |
receiving_network | string | Yes | Primary receiving chain. |
receiving_token_symbol | string | Yes | Primary receiving token symbol. |
receiving_token_address | string | Yes | Primary receiving token contract address. |
receiving_address | string | Yes | Receiving address — must be a wallet configured at account.morph.network and bound to the chain. |
description | string | No | Description. |
support_networks | string[] | Yes | Allowlisted chains for the payment. |
support_tokens | object[] | Yes | Allowlisted tokens (network / address / symbol). |
payer | object | Yes | Payer information. |
payer.name | string | Yes | Payer name. |
payer.email | string | No | Valid email address. |
due_date | int64 | Yes | Invoice due time (Unix millisecond timestamp). |
items | object[] | No | Invoice line items. |
items[].name | string | Yes | Item name. |
items[].quantity | int64 | Yes | Quantity, > 0. |
items[].unit_price | string | Yes | Unit price. |
Only name, quantity, and unit_price are read from each items[] entry;
any other fields are discarded.
Request example
{
"amount": "299.00",
"receiving_network": "morph",
"receiving_token_symbol": "USDT",
"receiving_token_address": "0xe7cd86e13ac4309349f30b3435a9d337750fc82d",
"receiving_address": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
"description": "Annual plan",
"payer": {
"name": "Jane Doe",
"email": "[email protected]"
},
"due_date": 1782777600000,
"items": [
{
"name": "Annual plan",
"quantity": 1,
"unit_price": "299.00"
}
],
"support_networks": ["morph"],
"support_tokens": [
{
"network": "morph",
"address": "0xe7cd86e13ac4309349f30b3435a9d337750fc82d",
"symbol": "USDT"
}
]
}
Success response
{
"error_code": 0,
"msg": "success",
"data": {
"invoice_id": "INV-2026-0042",
"checkout_url": "https://pay.example.com/checkout/eyJ...",
"status": "Pending",
"due_date": 1782777600000
},
"trace": "..."
}