{"openapi":"3.1.0","info":{"title":"CryptoPay API","version":"2026-10-01","description":"REST API of CryptoPay. Authenticate with `Authorization: Bearer <api key>`. Responses use the envelope `{ data, meta?, error, request_id }`. Amounts are decimal strings; dates are ISO 8601 UTC."},"servers":[{"url":"https://cryptopay.yanselmask.com/api/v1"}],"security":[{"bearer":[]}],"tags":[{"name":"Invoices"},{"name":"Payment links"},{"name":"Products"},{"name":"Payments"},{"name":"Currencies & rates"},{"name":"Webhook endpoints"},{"name":"Testing"}],"paths":{"/invoices":{"get":{"operationId":"listInvoices","tags":["Invoices"],"summary":"List invoices","description":"Invoices of the key mode (live or test), newest first. Filter by status, order_id or creation date.\n\nScope: `invoices:read`.","parameters":[{"name":"limit","in":"query","required":false,"description":"Page size (1–100).","schema":{"default":20,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"Opaque cursor from `meta.next_cursor`.","schema":{"type":"string","maxLength":200}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["new","pending","partial","confirming","paid","overpaid","expired","cancelled"]}},{"name":"order_id","in":"query","required":false,"schema":{"type":"string","maxLength":120}},{"name":"created_after","in":"query","required":false,"schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"created_before","in":"query","required":false,"schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data","error","request_id"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Invoice"}},"meta":{"$ref":"#/components/schemas/ListMeta"},"error":{"type":"null"},"request_id":{"type":"string","examples":["req_01J9ZQ3K5W8X2N4M6P7R9S1T3V"]}}}}}},"400":{"description":"`VALIDATION_ERROR`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"`UNAUTHENTICATED`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"`FORBIDDEN_SCOPE`, `WORKSPACE_SUSPENDED`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`RATE_LIMITED`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"`INTERNAL_ERROR`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-scope":"invoices:read","x-code-samples":[{"lang":"cURL","source":"curl -X GET 'https://cryptopay.yanselmask.com/api/v1/invoices' \\\n  -H 'Authorization: Bearer cp_test_••••'"},{"lang":"JavaScript","source":"const res = await fetch('https://cryptopay.yanselmask.com/api/v1/invoices', {\n  method: 'GET',\n  headers: {\n    Authorization: 'Bearer cp_test_••••',\n  },\n})\nconst { data, error } = await res.json()"},{"lang":"PHP","source":"<?php\n$ch = curl_init('https://cryptopay.yanselmask.com/api/v1/invoices');\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    'Authorization: Bearer cp_test_••••',\n]);\n$response = json_decode(curl_exec($ch), true);"},{"lang":"Python","source":"import requests\n\nres = requests.get(\n    \"https://cryptopay.yanselmask.com/api/v1/invoices\",\n    headers={\n        \"Authorization\": \"Bearer cp_test_••••\",\n    },\n    timeout=30,\n)\nbody = res.json()"}]},"post":{"operationId":"createInvoice","tags":["Invoices"],"summary":"Create an invoice","description":"Creates an invoice and returns its hosted checkout URL (`urls.checkout`). Pass `asset` to lock the currency now: the response already includes the address and the exact crypto amount. Send an `Idempotency-Key` header to retry safely.\n\nScope: `invoices:write`.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Retry safely: the same key and body within 24 h returns the first response.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceCreate"},"example":{"amount":"25.00","currency":"USD","description":"T-shirt","order_id":"SO-1001","asset":"usdt_tron"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","required":["data","error","request_id"],"properties":{"data":{"$ref":"#/components/schemas/Invoice"},"error":{"type":"null"},"request_id":{"type":"string","examples":["req_01J9ZQ3K5W8X2N4M6P7R9S1T3V"]}}}}}},"400":{"description":"`VALIDATION_ERROR`, `UNSUPPORTED_ASSET`, `NO_WALLET_FOR_ASSET`, `AMOUNT_BELOW_MINIMUM`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"`UNAUTHENTICATED`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"`PLAN_LIMIT_REACHED`, `WORKSPACE_RESTRICTED`, `FORBIDDEN_SCOPE`, `WORKSPACE_SUSPENDED`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"`IDEMPOTENCY_MISMATCH`, `IDEMPOTENCY_IN_PROGRESS`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`RATE_LIMITED`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"`INTERNAL_ERROR`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"`RATES_UNAVAILABLE`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-scope":"invoices:write","x-code-samples":[{"lang":"cURL","source":"curl -X POST 'https://cryptopay.yanselmask.com/api/v1/invoices' \\\n  -H 'Authorization: Bearer cp_test_••••' \\\n  -H 'Idempotency-Key: 6f1c2a0e-order-1001' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n  \"amount\": \"25.00\",\n  \"currency\": \"USD\",\n  \"description\": \"T-shirt\",\n  \"order_id\": \"SO-1001\",\n  \"asset\": \"usdt_tron\"\n}'"},{"lang":"JavaScript","source":"const res = await fetch('https://cryptopay.yanselmask.com/api/v1/invoices', {\n  method: 'POST',\n  headers: {\n    Authorization: 'Bearer cp_test_••••',\n    'Content-Type': 'application/json',\n    'Idempotency-Key': '6f1c2a0e-order-1001',\n  },\n  body: JSON.stringify({\n    \"amount\": \"25.00\",\n    \"currency\": \"USD\",\n    \"description\": \"T-shirt\",\n    \"order_id\": \"SO-1001\",\n    \"asset\": \"usdt_tron\"\n  }),\n})\nconst { data, error } = await res.json()"},{"lang":"PHP","source":"<?php\n$ch = curl_init('https://cryptopay.yanselmask.com/api/v1/invoices');\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    'Authorization: Bearer cp_test_••••',\n    'Content-Type: application/json',\n    'Idempotency-Key: 6f1c2a0e-order-1001',\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([\n    'amount' => '25.00',\n    'currency' => 'USD',\n    'description' => 'T-shirt',\n    'order_id' => 'SO-1001',\n    'asset' => 'usdt_tron',\n]));\n$response = json_decode(curl_exec($ch), true);"},{"lang":"Python","source":"import requests\n\nres = requests.post(\n    \"https://cryptopay.yanselmask.com/api/v1/invoices\",\n    headers={\n        \"Authorization\": \"Bearer cp_test_••••\",\n        \"Idempotency-Key\": \"6f1c2a0e-order-1001\",\n    },\n    json={\n        \"amount\": \"25.00\",\n        \"currency\": \"USD\",\n        \"description\": \"T-shirt\",\n        \"order_id\": \"SO-1001\",\n        \"asset\": \"usdt_tron\",\n    },\n    timeout=30,\n)\nbody = res.json()"}]}},"/invoices/{id}":{"get":{"operationId":"getInvoice","tags":["Invoices"],"summary":"Retrieve an invoice","description":"Current state of an invoice, including received and confirmed amounts.\n\nScope: `invoices:read`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data","error","request_id"],"properties":{"data":{"$ref":"#/components/schemas/Invoice"},"error":{"type":"null"},"request_id":{"type":"string","examples":["req_01J9ZQ3K5W8X2N4M6P7R9S1T3V"]}}}}}},"401":{"description":"`UNAUTHENTICATED`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"`FORBIDDEN_SCOPE`, `WORKSPACE_SUSPENDED`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"`NOT_FOUND`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`RATE_LIMITED`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"`INTERNAL_ERROR`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-scope":"invoices:read","x-code-samples":[{"lang":"cURL","source":"curl -X GET 'https://cryptopay.yanselmask.com/api/v1/invoices/7d61d9f9-a9e4-49c1-a1b8-b5d465d7a939' \\\n  -H 'Authorization: Bearer cp_test_••••'"},{"lang":"JavaScript","source":"const res = await fetch('https://cryptopay.yanselmask.com/api/v1/invoices/7d61d9f9-a9e4-49c1-a1b8-b5d465d7a939', {\n  method: 'GET',\n  headers: {\n    Authorization: 'Bearer cp_test_••••',\n  },\n})\nconst { data, error } = await res.json()"},{"lang":"PHP","source":"<?php\n$ch = curl_init('https://cryptopay.yanselmask.com/api/v1/invoices/7d61d9f9-a9e4-49c1-a1b8-b5d465d7a939');\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    'Authorization: Bearer cp_test_••••',\n]);\n$response = json_decode(curl_exec($ch), true);"},{"lang":"Python","source":"import requests\n\nres = requests.get(\n    \"https://cryptopay.yanselmask.com/api/v1/invoices/7d61d9f9-a9e4-49c1-a1b8-b5d465d7a939\",\n    headers={\n        \"Authorization\": \"Bearer cp_test_••••\",\n    },\n    timeout=30,\n)\nbody = res.json()"}]}},"/invoices/{id}/cancel":{"post":{"operationId":"cancelInvoice","tags":["Invoices"],"summary":"Cancel an invoice","description":"Cancels a `new`, `pending` or `expired` invoice that has not received funds.\n\nScope: `invoices:write`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Retry safely: the same key and body within 24 h returns the first response.","schema":{"type":"string","maxLength":255}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data","error","request_id"],"properties":{"data":{"$ref":"#/components/schemas/Invoice"},"error":{"type":"null"},"request_id":{"type":"string","examples":["req_01J9ZQ3K5W8X2N4M6P7R9S1T3V"]}}}}}},"401":{"description":"`UNAUTHENTICATED`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"`FORBIDDEN_SCOPE`, `WORKSPACE_SUSPENDED`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"`NOT_FOUND`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"`INVALID_STATE`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`RATE_LIMITED`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"`INTERNAL_ERROR`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-scope":"invoices:write","x-code-samples":[{"lang":"cURL","source":"curl -X POST 'https://cryptopay.yanselmask.com/api/v1/invoices/7d61d9f9-a9e4-49c1-a1b8-b5d465d7a939/cancel' \\\n  -H 'Authorization: Bearer cp_test_••••'"},{"lang":"JavaScript","source":"const res = await fetch('https://cryptopay.yanselmask.com/api/v1/invoices/7d61d9f9-a9e4-49c1-a1b8-b5d465d7a939/cancel', {\n  method: 'POST',\n  headers: {\n    Authorization: 'Bearer cp_test_••••',\n  },\n})\nconst { data, error } = await res.json()"},{"lang":"PHP","source":"<?php\n$ch = curl_init('https://cryptopay.yanselmask.com/api/v1/invoices/7d61d9f9-a9e4-49c1-a1b8-b5d465d7a939/cancel');\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    'Authorization: Bearer cp_test_••••',\n]);\n$response = json_decode(curl_exec($ch), true);"},{"lang":"Python","source":"import requests\n\nres = requests.post(\n    \"https://cryptopay.yanselmask.com/api/v1/invoices/7d61d9f9-a9e4-49c1-a1b8-b5d465d7a939/cancel\",\n    headers={\n        \"Authorization\": \"Bearer cp_test_••••\",\n    },\n    timeout=30,\n)\nbody = res.json()"}]}},"/payment-links":{"get":{"operationId":"listPaymentLinks","tags":["Payment links"],"summary":"List payment links","description":"Payment links of the workspace, newest first.\n\nScope: `links:read`.","parameters":[{"name":"limit","in":"query","required":false,"description":"Page size (1–100).","schema":{"default":20,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"Opaque cursor from `meta.next_cursor`.","schema":{"type":"string","maxLength":200}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data","error","request_id"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/PaymentLink"}},"meta":{"$ref":"#/components/schemas/ListMeta"},"error":{"type":"null"},"request_id":{"type":"string","examples":["req_01J9ZQ3K5W8X2N4M6P7R9S1T3V"]}}}}}},"400":{"description":"`VALIDATION_ERROR`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"`UNAUTHENTICATED`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"`FORBIDDEN_SCOPE`, `WORKSPACE_SUSPENDED`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`RATE_LIMITED`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"`INTERNAL_ERROR`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-scope":"links:read","x-code-samples":[{"lang":"cURL","source":"curl -X GET 'https://cryptopay.yanselmask.com/api/v1/payment-links' \\\n  -H 'Authorization: Bearer cp_test_••••'"},{"lang":"JavaScript","source":"const res = await fetch('https://cryptopay.yanselmask.com/api/v1/payment-links', {\n  method: 'GET',\n  headers: {\n    Authorization: 'Bearer cp_test_••••',\n  },\n})\nconst { data, error } = await res.json()"},{"lang":"PHP","source":"<?php\n$ch = curl_init('https://cryptopay.yanselmask.com/api/v1/payment-links');\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    'Authorization: Bearer cp_test_••••',\n]);\n$response = json_decode(curl_exec($ch), true);"},{"lang":"Python","source":"import requests\n\nres = requests.get(\n    \"https://cryptopay.yanselmask.com/api/v1/payment-links\",\n    headers={\n        \"Authorization\": \"Bearer cp_test_••••\",\n    },\n    timeout=30,\n)\nbody = res.json()"}]},"post":{"operationId":"createPaymentLink","tags":["Payment links"],"summary":"Create a payment link","description":"With `product_id` the link copies the product title, price and currency. Without it, pass `title`, `currency` and either `amount` or `allow_custom_amount` (with optional `min_amount`/`max_amount`).\n\nScope: `links:write`.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Retry safely: the same key and body within 24 h returns the first response.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentLinkCreate"},"example":{"title":"Donation","currency":"USD","allow_custom_amount":true,"min_amount":"5.00","max_amount":"500.00"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","required":["data","error","request_id"],"properties":{"data":{"$ref":"#/components/schemas/PaymentLink"},"error":{"type":"null"},"request_id":{"type":"string","examples":["req_01J9ZQ3K5W8X2N4M6P7R9S1T3V"]}}}}}},"400":{"description":"`VALIDATION_ERROR`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"`UNAUTHENTICATED`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"`PLAN_LIMIT_REACHED`, `WORKSPACE_RESTRICTED`, `FORBIDDEN_SCOPE`, `WORKSPACE_SUSPENDED`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"`NOT_FOUND`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"`INVALID_STATE`, `IDEMPOTENCY_MISMATCH`, `IDEMPOTENCY_IN_PROGRESS`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`RATE_LIMITED`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"`INTERNAL_ERROR`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-scope":"links:write","x-code-samples":[{"lang":"cURL","source":"curl -X POST 'https://cryptopay.yanselmask.com/api/v1/payment-links' \\\n  -H 'Authorization: Bearer cp_test_••••' \\\n  -H 'Idempotency-Key: 6f1c2a0e-order-1001' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n  \"title\": \"Donation\",\n  \"currency\": \"USD\",\n  \"allow_custom_amount\": true,\n  \"min_amount\": \"5.00\",\n  \"max_amount\": \"500.00\"\n}'"},{"lang":"JavaScript","source":"const res = await fetch('https://cryptopay.yanselmask.com/api/v1/payment-links', {\n  method: 'POST',\n  headers: {\n    Authorization: 'Bearer cp_test_••••',\n    'Content-Type': 'application/json',\n    'Idempotency-Key': '6f1c2a0e-order-1001',\n  },\n  body: JSON.stringify({\n    \"title\": \"Donation\",\n    \"currency\": \"USD\",\n    \"allow_custom_amount\": true,\n    \"min_amount\": \"5.00\",\n    \"max_amount\": \"500.00\"\n  }),\n})\nconst { data, error } = await res.json()"},{"lang":"PHP","source":"<?php\n$ch = curl_init('https://cryptopay.yanselmask.com/api/v1/payment-links');\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    'Authorization: Bearer cp_test_••••',\n    'Content-Type: application/json',\n    'Idempotency-Key: 6f1c2a0e-order-1001',\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([\n    'title' => 'Donation',\n    'currency' => 'USD',\n    'allow_custom_amount' => true,\n    'min_amount' => '5.00',\n    'max_amount' => '500.00',\n]));\n$response = json_decode(curl_exec($ch), true);"},{"lang":"Python","source":"import requests\n\nres = requests.post(\n    \"https://cryptopay.yanselmask.com/api/v1/payment-links\",\n    headers={\n        \"Authorization\": \"Bearer cp_test_••••\",\n        \"Idempotency-Key\": \"6f1c2a0e-order-1001\",\n    },\n    json={\n        \"title\": \"Donation\",\n        \"currency\": \"USD\",\n        \"allow_custom_amount\": True,\n        \"min_amount\": \"5.00\",\n        \"max_amount\": \"500.00\",\n    },\n    timeout=30,\n)\nbody = res.json()"}]}},"/payment-links/{id}":{"get":{"operationId":"getPaymentLink","tags":["Payment links"],"summary":"Retrieve a payment link","description":"A payment link with its status and number of uses.\n\nScope: `links:read`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data","error","request_id"],"properties":{"data":{"$ref":"#/components/schemas/PaymentLink"},"error":{"type":"null"},"request_id":{"type":"string","examples":["req_01J9ZQ3K5W8X2N4M6P7R9S1T3V"]}}}}}},"401":{"description":"`UNAUTHENTICATED`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"`FORBIDDEN_SCOPE`, `WORKSPACE_SUSPENDED`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"`NOT_FOUND`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`RATE_LIMITED`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"`INTERNAL_ERROR`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-scope":"links:read","x-code-samples":[{"lang":"cURL","source":"curl -X GET 'https://cryptopay.yanselmask.com/api/v1/payment-links/7d61d9f9-a9e4-49c1-a1b8-b5d465d7a939' \\\n  -H 'Authorization: Bearer cp_test_••••'"},{"lang":"JavaScript","source":"const res = await fetch('https://cryptopay.yanselmask.com/api/v1/payment-links/7d61d9f9-a9e4-49c1-a1b8-b5d465d7a939', {\n  method: 'GET',\n  headers: {\n    Authorization: 'Bearer cp_test_••••',\n  },\n})\nconst { data, error } = await res.json()"},{"lang":"PHP","source":"<?php\n$ch = curl_init('https://cryptopay.yanselmask.com/api/v1/payment-links/7d61d9f9-a9e4-49c1-a1b8-b5d465d7a939');\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    'Authorization: Bearer cp_test_••••',\n]);\n$response = json_decode(curl_exec($ch), true);"},{"lang":"Python","source":"import requests\n\nres = requests.get(\n    \"https://cryptopay.yanselmask.com/api/v1/payment-links/7d61d9f9-a9e4-49c1-a1b8-b5d465d7a939\",\n    headers={\n        \"Authorization\": \"Bearer cp_test_••••\",\n    },\n    timeout=30,\n)\nbody = res.json()"}]}},"/payment-links/{id}/deactivate":{"post":{"operationId":"deactivatePaymentLink","tags":["Payment links"],"summary":"Deactivate a payment link","description":"The link stops accepting new payments; existing invoices are not affected.\n\nScope: `links:write`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Retry safely: the same key and body within 24 h returns the first response.","schema":{"type":"string","maxLength":255}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data","error","request_id"],"properties":{"data":{"$ref":"#/components/schemas/PaymentLink"},"error":{"type":"null"},"request_id":{"type":"string","examples":["req_01J9ZQ3K5W8X2N4M6P7R9S1T3V"]}}}}}},"401":{"description":"`UNAUTHENTICATED`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"`FORBIDDEN_SCOPE`, `WORKSPACE_SUSPENDED`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"`NOT_FOUND`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`RATE_LIMITED`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"`INTERNAL_ERROR`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-scope":"links:write","x-code-samples":[{"lang":"cURL","source":"curl -X POST 'https://cryptopay.yanselmask.com/api/v1/payment-links/7d61d9f9-a9e4-49c1-a1b8-b5d465d7a939/deactivate' \\\n  -H 'Authorization: Bearer cp_test_••••'"},{"lang":"JavaScript","source":"const res = await fetch('https://cryptopay.yanselmask.com/api/v1/payment-links/7d61d9f9-a9e4-49c1-a1b8-b5d465d7a939/deactivate', {\n  method: 'POST',\n  headers: {\n    Authorization: 'Bearer cp_test_••••',\n  },\n})\nconst { data, error } = await res.json()"},{"lang":"PHP","source":"<?php\n$ch = curl_init('https://cryptopay.yanselmask.com/api/v1/payment-links/7d61d9f9-a9e4-49c1-a1b8-b5d465d7a939/deactivate');\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    'Authorization: Bearer cp_test_••••',\n]);\n$response = json_decode(curl_exec($ch), true);"},{"lang":"Python","source":"import requests\n\nres = requests.post(\n    \"https://cryptopay.yanselmask.com/api/v1/payment-links/7d61d9f9-a9e4-49c1-a1b8-b5d465d7a939/deactivate\",\n    headers={\n        \"Authorization\": \"Bearer cp_test_••••\",\n    },\n    timeout=30,\n)\nbody = res.json()"}]}},"/products":{"get":{"operationId":"listProducts","tags":["Products"],"summary":"List products","description":"Catalog products, newest first.\n\nScope: `products:read`.","parameters":[{"name":"limit","in":"query","required":false,"description":"Page size (1–100).","schema":{"default":20,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"Opaque cursor from `meta.next_cursor`.","schema":{"type":"string","maxLength":200}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data","error","request_id"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Product"}},"meta":{"$ref":"#/components/schemas/ListMeta"},"error":{"type":"null"},"request_id":{"type":"string","examples":["req_01J9ZQ3K5W8X2N4M6P7R9S1T3V"]}}}}}},"400":{"description":"`VALIDATION_ERROR`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"`UNAUTHENTICATED`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"`FORBIDDEN_SCOPE`, `WORKSPACE_SUSPENDED`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`RATE_LIMITED`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"`INTERNAL_ERROR`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-scope":"products:read","x-code-samples":[{"lang":"cURL","source":"curl -X GET 'https://cryptopay.yanselmask.com/api/v1/products' \\\n  -H 'Authorization: Bearer cp_test_••••'"},{"lang":"JavaScript","source":"const res = await fetch('https://cryptopay.yanselmask.com/api/v1/products', {\n  method: 'GET',\n  headers: {\n    Authorization: 'Bearer cp_test_••••',\n  },\n})\nconst { data, error } = await res.json()"},{"lang":"PHP","source":"<?php\n$ch = curl_init('https://cryptopay.yanselmask.com/api/v1/products');\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    'Authorization: Bearer cp_test_••••',\n]);\n$response = json_decode(curl_exec($ch), true);"},{"lang":"Python","source":"import requests\n\nres = requests.get(\n    \"https://cryptopay.yanselmask.com/api/v1/products\",\n    headers={\n        \"Authorization\": \"Bearer cp_test_••••\",\n    },\n    timeout=30,\n)\nbody = res.json()"}]},"post":{"operationId":"createProduct","tags":["Products"],"summary":"Create a product","description":"Adds a product to the catalog. `sku` must be unique in the workspace.\n\nScope: `products:write`.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Retry safely: the same key and body within 24 h returns the first response.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductCreate"},"example":{"name":"T-shirt","price":"25.00","currency":"USD","sku":"TSHIRT-01"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","required":["data","error","request_id"],"properties":{"data":{"$ref":"#/components/schemas/Product"},"error":{"type":"null"},"request_id":{"type":"string","examples":["req_01J9ZQ3K5W8X2N4M6P7R9S1T3V"]}}}}}},"400":{"description":"`VALIDATION_ERROR`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"`UNAUTHENTICATED`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"`WORKSPACE_RESTRICTED`, `FORBIDDEN_SCOPE`, `WORKSPACE_SUSPENDED`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"`IDEMPOTENCY_MISMATCH`, `IDEMPOTENCY_IN_PROGRESS`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`RATE_LIMITED`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"`INTERNAL_ERROR`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-scope":"products:write","x-code-samples":[{"lang":"cURL","source":"curl -X POST 'https://cryptopay.yanselmask.com/api/v1/products' \\\n  -H 'Authorization: Bearer cp_test_••••' \\\n  -H 'Idempotency-Key: 6f1c2a0e-order-1001' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n  \"name\": \"T-shirt\",\n  \"price\": \"25.00\",\n  \"currency\": \"USD\",\n  \"sku\": \"TSHIRT-01\"\n}'"},{"lang":"JavaScript","source":"const res = await fetch('https://cryptopay.yanselmask.com/api/v1/products', {\n  method: 'POST',\n  headers: {\n    Authorization: 'Bearer cp_test_••••',\n    'Content-Type': 'application/json',\n    'Idempotency-Key': '6f1c2a0e-order-1001',\n  },\n  body: JSON.stringify({\n    \"name\": \"T-shirt\",\n    \"price\": \"25.00\",\n    \"currency\": \"USD\",\n    \"sku\": \"TSHIRT-01\"\n  }),\n})\nconst { data, error } = await res.json()"},{"lang":"PHP","source":"<?php\n$ch = curl_init('https://cryptopay.yanselmask.com/api/v1/products');\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    'Authorization: Bearer cp_test_••••',\n    'Content-Type: application/json',\n    'Idempotency-Key: 6f1c2a0e-order-1001',\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([\n    'name' => 'T-shirt',\n    'price' => '25.00',\n    'currency' => 'USD',\n    'sku' => 'TSHIRT-01',\n]));\n$response = json_decode(curl_exec($ch), true);"},{"lang":"Python","source":"import requests\n\nres = requests.post(\n    \"https://cryptopay.yanselmask.com/api/v1/products\",\n    headers={\n        \"Authorization\": \"Bearer cp_test_••••\",\n        \"Idempotency-Key\": \"6f1c2a0e-order-1001\",\n    },\n    json={\n        \"name\": \"T-shirt\",\n        \"price\": \"25.00\",\n        \"currency\": \"USD\",\n        \"sku\": \"TSHIRT-01\",\n    },\n    timeout=30,\n)\nbody = res.json()"}]}},"/products/{id}":{"get":{"operationId":"getProduct","tags":["Products"],"summary":"Retrieve a product","description":"A catalog product.\n\nScope: `products:read`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data","error","request_id"],"properties":{"data":{"$ref":"#/components/schemas/Product"},"error":{"type":"null"},"request_id":{"type":"string","examples":["req_01J9ZQ3K5W8X2N4M6P7R9S1T3V"]}}}}}},"401":{"description":"`UNAUTHENTICATED`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"`FORBIDDEN_SCOPE`, `WORKSPACE_SUSPENDED`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"`NOT_FOUND`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`RATE_LIMITED`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"`INTERNAL_ERROR`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-scope":"products:read","x-code-samples":[{"lang":"cURL","source":"curl -X GET 'https://cryptopay.yanselmask.com/api/v1/products/7d61d9f9-a9e4-49c1-a1b8-b5d465d7a939' \\\n  -H 'Authorization: Bearer cp_test_••••'"},{"lang":"JavaScript","source":"const res = await fetch('https://cryptopay.yanselmask.com/api/v1/products/7d61d9f9-a9e4-49c1-a1b8-b5d465d7a939', {\n  method: 'GET',\n  headers: {\n    Authorization: 'Bearer cp_test_••••',\n  },\n})\nconst { data, error } = await res.json()"},{"lang":"PHP","source":"<?php\n$ch = curl_init('https://cryptopay.yanselmask.com/api/v1/products/7d61d9f9-a9e4-49c1-a1b8-b5d465d7a939');\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    'Authorization: Bearer cp_test_••••',\n]);\n$response = json_decode(curl_exec($ch), true);"},{"lang":"Python","source":"import requests\n\nres = requests.get(\n    \"https://cryptopay.yanselmask.com/api/v1/products/7d61d9f9-a9e4-49c1-a1b8-b5d465d7a939\",\n    headers={\n        \"Authorization\": \"Bearer cp_test_••••\",\n    },\n    timeout=30,\n)\nbody = res.json()"}]}},"/payments":{"get":{"operationId":"listPayments","tags":["Payments"],"summary":"List payments","description":"On-chain transfers attributed to invoices of the key mode, newest first. Filter by `invoice_id`.\n\nScope: `payments:read`.","parameters":[{"name":"limit","in":"query","required":false,"description":"Page size (1–100).","schema":{"default":20,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"Opaque cursor from `meta.next_cursor`.","schema":{"type":"string","maxLength":200}},{"name":"invoice_id","in":"query","required":false,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data","error","request_id"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Payment"}},"meta":{"$ref":"#/components/schemas/ListMeta"},"error":{"type":"null"},"request_id":{"type":"string","examples":["req_01J9ZQ3K5W8X2N4M6P7R9S1T3V"]}}}}}},"400":{"description":"`VALIDATION_ERROR`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"`UNAUTHENTICATED`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"`FORBIDDEN_SCOPE`, `WORKSPACE_SUSPENDED`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`RATE_LIMITED`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"`INTERNAL_ERROR`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-scope":"payments:read","x-code-samples":[{"lang":"cURL","source":"curl -X GET 'https://cryptopay.yanselmask.com/api/v1/payments' \\\n  -H 'Authorization: Bearer cp_test_••••'"},{"lang":"JavaScript","source":"const res = await fetch('https://cryptopay.yanselmask.com/api/v1/payments', {\n  method: 'GET',\n  headers: {\n    Authorization: 'Bearer cp_test_••••',\n  },\n})\nconst { data, error } = await res.json()"},{"lang":"PHP","source":"<?php\n$ch = curl_init('https://cryptopay.yanselmask.com/api/v1/payments');\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    'Authorization: Bearer cp_test_••••',\n]);\n$response = json_decode(curl_exec($ch), true);"},{"lang":"Python","source":"import requests\n\nres = requests.get(\n    \"https://cryptopay.yanselmask.com/api/v1/payments\",\n    headers={\n        \"Authorization\": \"Bearer cp_test_••••\",\n    },\n    timeout=30,\n)\nbody = res.json()"}]}},"/currencies":{"get":{"operationId":"listCurrencies","tags":["Currencies & rates"],"summary":"List currencies","description":"Crypto assets the platform supports, with minimum amount, confirmations and whether this workspace can receive them now.\n\nScope: `rates:read`.","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data","error","request_id"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Currency"}},"meta":{"$ref":"#/components/schemas/ListMeta"},"error":{"type":"null"},"request_id":{"type":"string","examples":["req_01J9ZQ3K5W8X2N4M6P7R9S1T3V"]}}}}}},"401":{"description":"`UNAUTHENTICATED`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"`FORBIDDEN_SCOPE`, `WORKSPACE_SUSPENDED`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`RATE_LIMITED`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"`INTERNAL_ERROR`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-scope":"rates:read","x-code-samples":[{"lang":"cURL","source":"curl -X GET 'https://cryptopay.yanselmask.com/api/v1/currencies' \\\n  -H 'Authorization: Bearer cp_test_••••'"},{"lang":"JavaScript","source":"const res = await fetch('https://cryptopay.yanselmask.com/api/v1/currencies', {\n  method: 'GET',\n  headers: {\n    Authorization: 'Bearer cp_test_••••',\n  },\n})\nconst { data, error } = await res.json()"},{"lang":"PHP","source":"<?php\n$ch = curl_init('https://cryptopay.yanselmask.com/api/v1/currencies');\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    'Authorization: Bearer cp_test_••••',\n]);\n$response = json_decode(curl_exec($ch), true);"},{"lang":"Python","source":"import requests\n\nres = requests.get(\n    \"https://cryptopay.yanselmask.com/api/v1/currencies\",\n    headers={\n        \"Authorization\": \"Bearer cp_test_••••\",\n    },\n    timeout=30,\n)\nbody = res.json()"}]}},"/rates":{"get":{"operationId":"listRates","tags":["Currencies & rates"],"summary":"Get exchange rates","description":"Current price of each asset in a fiat currency (`fiat`, default USD). Pass `asset` for a single asset.\n\nScope: `rates:read`.","parameters":[{"name":"fiat","in":"query","required":false,"description":"ISO 4217 fiat currency.","schema":{"default":"USD","type":"string","enum":["USD","EUR","DOP","MXN","COP","BRL","GBP","ARS","CLP","PEN"],"examples":["USD"]}},{"name":"asset","in":"query","required":false,"description":"Asset id: `<symbol>_<network>`.","schema":{"type":"string","enum":["btc_bitcoin","ltc_litecoin","doge_dogecoin","eth_ethereum","usdt_ethereum","usdc_ethereum","bnb_bsc","usdt_bsc","usdc_bsc","pol_polygon","usdt_polygon","usdc_polygon","eth_base","usdc_base","eth_arbitrum","usdt_arbitrum","usdc_arbitrum","trx_tron","usdt_tron","sol_solana","usdc_solana","usdt_solana"],"examples":["usdt_tron"]}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data","error","request_id"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Rate"}},"meta":{"$ref":"#/components/schemas/ListMeta"},"error":{"type":"null"},"request_id":{"type":"string","examples":["req_01J9ZQ3K5W8X2N4M6P7R9S1T3V"]}}}}}},"400":{"description":"`VALIDATION_ERROR`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"`UNAUTHENTICATED`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"`FORBIDDEN_SCOPE`, `WORKSPACE_SUSPENDED`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`RATE_LIMITED`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"`INTERNAL_ERROR`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"`RATES_UNAVAILABLE`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-scope":"rates:read","x-code-samples":[{"lang":"cURL","source":"curl -X GET 'https://cryptopay.yanselmask.com/api/v1/rates' \\\n  -H 'Authorization: Bearer cp_test_••••'"},{"lang":"JavaScript","source":"const res = await fetch('https://cryptopay.yanselmask.com/api/v1/rates', {\n  method: 'GET',\n  headers: {\n    Authorization: 'Bearer cp_test_••••',\n  },\n})\nconst { data, error } = await res.json()"},{"lang":"PHP","source":"<?php\n$ch = curl_init('https://cryptopay.yanselmask.com/api/v1/rates');\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    'Authorization: Bearer cp_test_••••',\n]);\n$response = json_decode(curl_exec($ch), true);"},{"lang":"Python","source":"import requests\n\nres = requests.get(\n    \"https://cryptopay.yanselmask.com/api/v1/rates\",\n    headers={\n        \"Authorization\": \"Bearer cp_test_••••\",\n    },\n    timeout=30,\n)\nbody = res.json()"}]}},"/estimate":{"post":{"operationId":"estimate","tags":["Currencies & rates"],"summary":"Estimate a crypto amount","description":"Converts a fiat price to an asset at the current rate. The rate is not locked: create an invoice to lock it.\n\nScope: `rates:read`.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Retry safely: the same key and body within 24 h returns the first response.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EstimateRequest"},"example":{"amount":"100.00","currency":"EUR","asset":"btc_bitcoin"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data","error","request_id"],"properties":{"data":{"$ref":"#/components/schemas/Estimate"},"error":{"type":"null"},"request_id":{"type":"string","examples":["req_01J9ZQ3K5W8X2N4M6P7R9S1T3V"]}}}}}},"400":{"description":"`VALIDATION_ERROR`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"`UNAUTHENTICATED`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"`FORBIDDEN_SCOPE`, `WORKSPACE_SUSPENDED`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`RATE_LIMITED`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"`INTERNAL_ERROR`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"`RATES_UNAVAILABLE`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-scope":"rates:read","x-code-samples":[{"lang":"cURL","source":"curl -X POST 'https://cryptopay.yanselmask.com/api/v1/estimate' \\\n  -H 'Authorization: Bearer cp_test_••••' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n  \"amount\": \"100.00\",\n  \"currency\": \"EUR\",\n  \"asset\": \"btc_bitcoin\"\n}'"},{"lang":"JavaScript","source":"const res = await fetch('https://cryptopay.yanselmask.com/api/v1/estimate', {\n  method: 'POST',\n  headers: {\n    Authorization: 'Bearer cp_test_••••',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({\n    \"amount\": \"100.00\",\n    \"currency\": \"EUR\",\n    \"asset\": \"btc_bitcoin\"\n  }),\n})\nconst { data, error } = await res.json()"},{"lang":"PHP","source":"<?php\n$ch = curl_init('https://cryptopay.yanselmask.com/api/v1/estimate');\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    'Authorization: Bearer cp_test_••••',\n    'Content-Type: application/json',\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([\n    'amount' => '100.00',\n    'currency' => 'EUR',\n    'asset' => 'btc_bitcoin',\n]));\n$response = json_decode(curl_exec($ch), true);"},{"lang":"Python","source":"import requests\n\nres = requests.post(\n    \"https://cryptopay.yanselmask.com/api/v1/estimate\",\n    headers={\n        \"Authorization\": \"Bearer cp_test_••••\",\n    },\n    json={\n        \"amount\": \"100.00\",\n        \"currency\": \"EUR\",\n        \"asset\": \"btc_bitcoin\",\n    },\n    timeout=30,\n)\nbody = res.json()"}]}},"/webhook-endpoints":{"get":{"operationId":"listWebhookEndpoints","tags":["Webhook endpoints"],"summary":"List webhook endpoints","description":"Endpoints that receive events. Secrets are never returned here.\n\nScope: `webhooks:manage`.","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data","error","request_id"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/WebhookEndpoint"}},"meta":{"$ref":"#/components/schemas/ListMeta"},"error":{"type":"null"},"request_id":{"type":"string","examples":["req_01J9ZQ3K5W8X2N4M6P7R9S1T3V"]}}}}}},"401":{"description":"`UNAUTHENTICATED`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"`FORBIDDEN_SCOPE`, `WORKSPACE_SUSPENDED`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`RATE_LIMITED`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"`INTERNAL_ERROR`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-scope":"webhooks:manage","x-code-samples":[{"lang":"cURL","source":"curl -X GET 'https://cryptopay.yanselmask.com/api/v1/webhook-endpoints' \\\n  -H 'Authorization: Bearer cp_test_••••'"},{"lang":"JavaScript","source":"const res = await fetch('https://cryptopay.yanselmask.com/api/v1/webhook-endpoints', {\n  method: 'GET',\n  headers: {\n    Authorization: 'Bearer cp_test_••••',\n  },\n})\nconst { data, error } = await res.json()"},{"lang":"PHP","source":"<?php\n$ch = curl_init('https://cryptopay.yanselmask.com/api/v1/webhook-endpoints');\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    'Authorization: Bearer cp_test_••••',\n]);\n$response = json_decode(curl_exec($ch), true);"},{"lang":"Python","source":"import requests\n\nres = requests.get(\n    \"https://cryptopay.yanselmask.com/api/v1/webhook-endpoints\",\n    headers={\n        \"Authorization\": \"Bearer cp_test_••••\",\n    },\n    timeout=30,\n)\nbody = res.json()"}]},"post":{"operationId":"createWebhookEndpoint","tags":["Webhook endpoints"],"summary":"Create a webhook endpoint","description":"The URL must be public `https://` (`http://localhost` only for test endpoints). The signing `secret` is returned only in this response.\n\nScope: `webhooks:manage`.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Retry safely: the same key and body within 24 h returns the first response.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointCreate"},"example":{"url":"https://shop.example.com/webhooks/crypto","events":["*"]}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","required":["data","error","request_id"],"properties":{"data":{"$ref":"#/components/schemas/WebhookEndpoint"},"error":{"type":"null"},"request_id":{"type":"string","examples":["req_01J9ZQ3K5W8X2N4M6P7R9S1T3V"]}}}}}},"400":{"description":"`VALIDATION_ERROR`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"`UNAUTHENTICATED`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"`PLAN_LIMIT_REACHED`, `FORBIDDEN_SCOPE`, `WORKSPACE_SUSPENDED`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"`INVALID_STATE`, `IDEMPOTENCY_MISMATCH`, `IDEMPOTENCY_IN_PROGRESS`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`RATE_LIMITED`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"`INTERNAL_ERROR`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-scope":"webhooks:manage","x-code-samples":[{"lang":"cURL","source":"curl -X POST 'https://cryptopay.yanselmask.com/api/v1/webhook-endpoints' \\\n  -H 'Authorization: Bearer cp_test_••••' \\\n  -H 'Idempotency-Key: 6f1c2a0e-order-1001' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n  \"url\": \"https://shop.example.com/webhooks/crypto\",\n  \"events\": [\n    \"*\"\n  ]\n}'"},{"lang":"JavaScript","source":"const res = await fetch('https://cryptopay.yanselmask.com/api/v1/webhook-endpoints', {\n  method: 'POST',\n  headers: {\n    Authorization: 'Bearer cp_test_••••',\n    'Content-Type': 'application/json',\n    'Idempotency-Key': '6f1c2a0e-order-1001',\n  },\n  body: JSON.stringify({\n    \"url\": \"https://shop.example.com/webhooks/crypto\",\n    \"events\": [\n      \"*\"\n    ]\n  }),\n})\nconst { data, error } = await res.json()"},{"lang":"PHP","source":"<?php\n$ch = curl_init('https://cryptopay.yanselmask.com/api/v1/webhook-endpoints');\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    'Authorization: Bearer cp_test_••••',\n    'Content-Type: application/json',\n    'Idempotency-Key: 6f1c2a0e-order-1001',\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([\n    'url' => 'https://shop.example.com/webhooks/crypto',\n    'events' => [\n        '*',\n    ],\n]));\n$response = json_decode(curl_exec($ch), true);"},{"lang":"Python","source":"import requests\n\nres = requests.post(\n    \"https://cryptopay.yanselmask.com/api/v1/webhook-endpoints\",\n    headers={\n        \"Authorization\": \"Bearer cp_test_••••\",\n        \"Idempotency-Key\": \"6f1c2a0e-order-1001\",\n    },\n    json={\n        \"url\": \"https://shop.example.com/webhooks/crypto\",\n        \"events\": [\n            \"*\",\n        ],\n    },\n    timeout=30,\n)\nbody = res.json()"}]}},"/webhook-endpoints/{id}":{"delete":{"operationId":"deleteWebhookEndpoint","tags":["Webhook endpoints"],"summary":"Delete a webhook endpoint","description":"Deletes the endpoint and its pending deliveries.\n\nScope: `webhooks:manage`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data","error","request_id"],"properties":{"data":{"$ref":"#/components/schemas/Deleted"},"error":{"type":"null"},"request_id":{"type":"string","examples":["req_01J9ZQ3K5W8X2N4M6P7R9S1T3V"]}}}}}},"401":{"description":"`UNAUTHENTICATED`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"`FORBIDDEN_SCOPE`, `WORKSPACE_SUSPENDED`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"`NOT_FOUND`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`RATE_LIMITED`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"`INTERNAL_ERROR`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-scope":"webhooks:manage","x-code-samples":[{"lang":"cURL","source":"curl -X DELETE 'https://cryptopay.yanselmask.com/api/v1/webhook-endpoints/7d61d9f9-a9e4-49c1-a1b8-b5d465d7a939' \\\n  -H 'Authorization: Bearer cp_test_••••'"},{"lang":"JavaScript","source":"const res = await fetch('https://cryptopay.yanselmask.com/api/v1/webhook-endpoints/7d61d9f9-a9e4-49c1-a1b8-b5d465d7a939', {\n  method: 'DELETE',\n  headers: {\n    Authorization: 'Bearer cp_test_••••',\n  },\n})\nconst { data, error } = await res.json()"},{"lang":"PHP","source":"<?php\n$ch = curl_init('https://cryptopay.yanselmask.com/api/v1/webhook-endpoints/7d61d9f9-a9e4-49c1-a1b8-b5d465d7a939');\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'DELETE');\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    'Authorization: Bearer cp_test_••••',\n]);\n$response = json_decode(curl_exec($ch), true);"},{"lang":"Python","source":"import requests\n\nres = requests.delete(\n    \"https://cryptopay.yanselmask.com/api/v1/webhook-endpoints/7d61d9f9-a9e4-49c1-a1b8-b5d465d7a939\",\n    headers={\n        \"Authorization\": \"Bearer cp_test_••••\",\n    },\n    timeout=30,\n)\nbody = res.json()"}]}},"/test/invoices/{id}/simulate":{"post":{"operationId":"simulateInvoice","tags":["Testing"],"summary":"Simulate a payment","description":"Test keys only. Moves a test invoice to `paid`, `partial`, `overpaid` or `expired` through the same state machine as real payments, emitting events and webhooks with `livemode: false`. An invoice in `new` first takes the first asset the workspace can receive.\n\nScope: `invoices:write`. Test keys only.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Retry safely: the same key and body within 24 h returns the first response.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimulateRequest"},"example":{"scenario":"paid"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data","error","request_id"],"properties":{"data":{"$ref":"#/components/schemas/Invoice"},"error":{"type":"null"},"request_id":{"type":"string","examples":["req_01J9ZQ3K5W8X2N4M6P7R9S1T3V"]}}}}}},"400":{"description":"`VALIDATION_ERROR`, `NO_WALLET_FOR_ASSET`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"`UNAUTHENTICATED`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"`TEST_MODE_ONLY`, `FORBIDDEN_SCOPE`, `WORKSPACE_SUSPENDED`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"`NOT_FOUND`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"`INVALID_STATE`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`RATE_LIMITED`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"`INTERNAL_ERROR`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-scope":"invoices:write","x-code-samples":[{"lang":"cURL","source":"curl -X POST 'https://cryptopay.yanselmask.com/api/v1/test/invoices/7d61d9f9-a9e4-49c1-a1b8-b5d465d7a939/simulate' \\\n  -H 'Authorization: Bearer cp_test_••••' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n  \"scenario\": \"paid\"\n}'"},{"lang":"JavaScript","source":"const res = await fetch('https://cryptopay.yanselmask.com/api/v1/test/invoices/7d61d9f9-a9e4-49c1-a1b8-b5d465d7a939/simulate', {\n  method: 'POST',\n  headers: {\n    Authorization: 'Bearer cp_test_••••',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({\n    \"scenario\": \"paid\"\n  }),\n})\nconst { data, error } = await res.json()"},{"lang":"PHP","source":"<?php\n$ch = curl_init('https://cryptopay.yanselmask.com/api/v1/test/invoices/7d61d9f9-a9e4-49c1-a1b8-b5d465d7a939/simulate');\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    'Authorization: Bearer cp_test_••••',\n    'Content-Type: application/json',\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([\n    'scenario' => 'paid',\n]));\n$response = json_decode(curl_exec($ch), true);"},{"lang":"Python","source":"import requests\n\nres = requests.post(\n    \"https://cryptopay.yanselmask.com/api/v1/test/invoices/7d61d9f9-a9e4-49c1-a1b8-b5d465d7a939/simulate\",\n    headers={\n        \"Authorization\": \"Bearer cp_test_••••\",\n    },\n    json={\n        \"scenario\": \"paid\",\n    },\n    timeout=30,\n)\nbody = res.json()"}]}}},"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"API key (`cp_live_…` or `cp_test_…`)."}},"schemas":{"ListMeta":{"type":"object","properties":{"next_cursor":{"type":["string","null"]},"has_more":{"type":"boolean"}},"required":["next_cursor","has_more"],"additionalProperties":false,"description":"Pagination of list responses: pass `next_cursor` as `cursor` to get the next page."},"Error":{"type":"object","properties":{"data":{"type":"null"},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["code","message"],"additionalProperties":false},"request_id":{"type":"string"}},"required":["data","error","request_id"],"additionalProperties":false,"description":"Error envelope.","examples":[{"data":null,"error":{"code":"VALIDATION_ERROR","message":"The request body is not valid.","details":[{"path":"amount","message":"Too small"}]},"request_id":"req_01J9…"}]},"Invoice":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","const":"invoice"},"number":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"status":{"type":"string","enum":["new","pending","partial","confirming","paid","overpaid","expired","cancelled"]},"livemode":{"type":"boolean"},"description":{"type":["string","null"]},"order_id":{"type":["string","null"]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"amount":{"$ref":"#/components/schemas/Money"},"crypto":{"anyOf":[{"type":"object","properties":{"asset":{"type":"string"},"network":{"type":"string"},"symbol":{"type":"string"},"amount":{"type":"string"},"amount_base_units":{"type":"string"},"decimals":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"address":{"type":"string"},"uri":{"type":"string"},"required_confirmations":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["asset","network","symbol","amount","amount_base_units","decimals","address","uri","required_confirmations"],"additionalProperties":false},{"type":"null"}]},"rate":{"anyOf":[{"type":"object","properties":{"fiat_per_asset":{"type":"string"},"locked_at":{"type":"string","description":"ISO 8601 UTC timestamp.","examples":["2026-10-10T12:00:00.000Z"]},"expires_at":{"type":"string","description":"ISO 8601 UTC timestamp.","examples":["2026-10-10T12:00:00.000Z"]}},"required":["fiat_per_asset","locked_at","expires_at"],"additionalProperties":false},{"type":"null"}]},"received":{"type":"object","properties":{"amount":{"type":"string"},"amount_base_units":{"type":"string"},"confirmed_base_units":{"type":"string"}},"required":["amount","amount_base_units","confirmed_base_units"],"additionalProperties":false},"flags":{"type":"object","properties":{"paid_late":{"type":"boolean"},"underpaid_accepted":{"type":"boolean"}},"required":["paid_late","underpaid_accepted"],"additionalProperties":false},"customer":{"type":"object","properties":{"email":{"type":["string","null"]},"name":{"type":["string","null"]}},"required":["email","name"],"additionalProperties":false},"urls":{"type":"object","properties":{"checkout":{"type":"string"},"receipt":{"type":"string"},"success":{"type":["string","null"]},"cancel":{"type":["string","null"]}},"required":["checkout","receipt","success","cancel"],"additionalProperties":false},"payment_link_id":{"type":["string","null"]},"product_id":{"type":["string","null"]},"source":{"type":"string","enum":["link","api","manual","billing"]},"created_at":{"type":"string","description":"ISO 8601 UTC timestamp.","examples":["2026-10-10T12:00:00.000Z"]},"expires_at":{"type":"string","description":"ISO 8601 UTC timestamp.","examples":["2026-10-10T12:00:00.000Z"]},"paid_at":{"anyOf":[{"type":"string","description":"ISO 8601 UTC timestamp.","examples":["2026-10-10T12:00:00.000Z"]},{"type":"null"}]},"updated_at":{"type":"string","description":"ISO 8601 UTC timestamp.","examples":["2026-10-10T12:00:00.000Z"]}},"required":["id","object","number","status","livemode","description","order_id","metadata","amount","crypto","rate","received","flags","customer","urls","payment_link_id","product_id","source","created_at","expires_at","paid_at","updated_at"],"additionalProperties":false,"description":"A payment request. `crypto` is null until a currency is chosen (status `new`).","examples":[{"id":"7d61d9f9-a9e4-49c1-a1b8-b5d465d7a939","object":"invoice","number":120,"status":"pending","livemode":true,"description":"T-shirt","order_id":"SO-1001","metadata":{},"amount":{"value":"25.00","currency":"USD","minor":2500},"crypto":{"asset":"usdt_tron","network":"tron","symbol":"USDT","amount":"25.02","amount_base_units":"25020000","decimals":6,"address":"TJYeasTPa6gpEEfYqeoTBpFkqZ4jhy5zj7","uri":"TJYeasTPa6gpEEfYqeoTBpFkqZ4jhy5zj7","required_confirmations":19},"rate":{"fiat_per_asset":"1","locked_at":"2026-10-10T12:00:00.000Z","expires_at":"2026-10-10T13:00:00.000Z"},"received":{"amount":"0","amount_base_units":"0","confirmed_base_units":"0"},"flags":{"paid_late":false,"underpaid_accepted":false},"customer":{"email":null,"name":null},"urls":{"checkout":"https://pay.example.com/pay/7d61…","receipt":"https://pay.example.com/pay/7d61…/receipt","success":null,"cancel":null},"payment_link_id":null,"product_id":null,"source":"api","created_at":"2026-10-10T12:00:00.000Z","expires_at":"2026-10-10T13:00:00.000Z","paid_at":null,"updated_at":"2026-10-10T12:00:00.000Z"}]},"Money":{"type":"object","properties":{"value":{"type":"string"},"currency":{"type":"string"},"minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["value","currency","minor"],"additionalProperties":false,"description":"Fiat amount.","examples":[{"value":"25.00","currency":"USD","minor":2500}]},"InvoiceCreate":{"type":"object","properties":{"amount":{"anyOf":[{"type":"string","pattern":"^\\d{1,13}(\\.\\d{1,8})?$"},{"type":"number","exclusiveMinimum":0}],"description":"Decimal amount as a string (recommended) or number.","examples":["25.00"]},"currency":{"type":"string","enum":["USD","EUR","DOP","MXN","COP","BRL","GBP","ARS","CLP","PEN"],"description":"ISO 4217 fiat currency.","examples":["USD"]},"description":{"type":"string","maxLength":500},"order_id":{"type":"string","maxLength":120},"customer":{"type":"object","properties":{"email":{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"name":{"type":"string","maxLength":120}}},"success_url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"cancel_url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"metadata":{"type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z0-9_.-]{1,40}$"},"additionalProperties":{"type":"string","maxLength":500},"description":"Your own key/value pairs (up to 20). Returned in webhooks.","examples":[{"order_ref":"SO-1001"}]},"asset":{"description":"Lock the currency now: the response already includes `crypto`.","type":"string","enum":["btc_bitcoin","ltc_litecoin","doge_dogecoin","eth_ethereum","usdt_ethereum","usdc_ethereum","bnb_bsc","usdt_bsc","usdc_bsc","pol_polygon","usdt_polygon","usdc_polygon","eth_base","usdc_base","eth_arbitrum","usdt_arbitrum","usdc_arbitrum","trx_tron","usdt_tron","sol_solana","usdc_solana","usdt_solana"],"examples":["usdt_tron"]},"ttl_minutes":{"type":"integer","minimum":15,"maximum":1440}},"required":["amount","currency"],"examples":[{"amount":"25.00","currency":"USD","description":"T-shirt","order_id":"SO-1001","asset":"usdt_tron"}]},"PaymentLink":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","const":"payment_link"},"url":{"type":"string"},"slug":{"type":"string"},"kind":{"type":"string","enum":["product","custom"]},"product_id":{"type":["string","null"]},"title":{"type":"string"},"description":{"type":["string","null"]},"amount":{"anyOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}]},"allow_custom_amount":{"type":"boolean"},"min_amount":{"anyOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}]},"max_amount":{"anyOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}]},"reusable":{"type":"boolean"},"max_uses":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"uses_count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"expires_at":{"anyOf":[{"type":"string","description":"ISO 8601 UTC timestamp.","examples":["2026-10-10T12:00:00.000Z"]},{"type":"null"}]},"success_url":{"type":["string","null"]},"cancel_url":{"type":["string","null"]},"collect_email":{"type":"boolean"},"collect_name":{"type":"boolean"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"is_active":{"type":"boolean"},"status":{"type":"string","enum":["active","inactive","expired","exhausted"]},"created_at":{"type":"string","description":"ISO 8601 UTC timestamp.","examples":["2026-10-10T12:00:00.000Z"]}},"required":["id","object","url","slug","kind","product_id","title","description","amount","allow_custom_amount","min_amount","max_amount","reusable","max_uses","uses_count","expires_at","success_url","cancel_url","collect_email","collect_name","metadata","is_active","status","created_at"],"additionalProperties":false,"description":"A shareable payment page (`url`)."},"PaymentLinkCreate":{"type":"object","properties":{"product_id":{"description":"Create the link from a product (copies title, price and currency).","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"title":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":2000},"amount":{"anyOf":[{"type":"string","pattern":"^\\d{1,13}(\\.\\d{1,8})?$"},{"type":"number","exclusiveMinimum":0}],"description":"Decimal amount as a string (recommended) or number.","examples":["25.00"]},"currency":{"type":"string","enum":["USD","EUR","DOP","MXN","COP","BRL","GBP","ARS","CLP","PEN"],"description":"ISO 4217 fiat currency.","examples":["USD"]},"allow_custom_amount":{"type":"boolean"},"min_amount":{"anyOf":[{"type":"string","pattern":"^\\d{1,13}(\\.\\d{1,8})?$"},{"type":"number","exclusiveMinimum":0}],"description":"Decimal amount as a string (recommended) or number.","examples":["25.00"]},"max_amount":{"anyOf":[{"type":"string","pattern":"^\\d{1,13}(\\.\\d{1,8})?$"},{"type":"number","exclusiveMinimum":0}],"description":"Decimal amount as a string (recommended) or number.","examples":["25.00"]},"reusable":{"type":"boolean"},"max_uses":{"type":"integer","minimum":1,"maximum":1000000},"expires_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"success_url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"cancel_url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"collect_email":{"type":"boolean"},"collect_name":{"type":"boolean"},"metadata":{"type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z0-9_.-]{1,40}$"},"additionalProperties":{"type":"string","maxLength":500},"description":"Your own key/value pairs (up to 20). Returned in webhooks.","examples":[{"order_ref":"SO-1001"}]}},"examples":[{"title":"Donation","currency":"USD","allow_custom_amount":true,"min_amount":"5.00","max_amount":"500.00"}]},"Product":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","const":"product"},"name":{"type":"string"},"description":{"type":["string","null"]},"image_url":{"type":["string","null"]},"price":{"$ref":"#/components/schemas/Money"},"sku":{"type":["string","null"]},"is_active":{"type":"boolean"},"created_at":{"type":"string","description":"ISO 8601 UTC timestamp.","examples":["2026-10-10T12:00:00.000Z"]},"updated_at":{"type":"string","description":"ISO 8601 UTC timestamp.","examples":["2026-10-10T12:00:00.000Z"]}},"required":["id","object","name","description","image_url","price","sku","is_active","created_at","updated_at"],"additionalProperties":false,"description":"A catalog product."},"ProductCreate":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":2000},"price":{"anyOf":[{"type":"string","pattern":"^\\d{1,13}(\\.\\d{1,8})?$"},{"type":"number","exclusiveMinimum":0}],"description":"Decimal amount as a string (recommended) or number.","examples":["25.00"]},"currency":{"type":"string","enum":["USD","EUR","DOP","MXN","COP","BRL","GBP","ARS","CLP","PEN"],"description":"ISO 4217 fiat currency.","examples":["USD"]},"sku":{"type":"string","maxLength":64,"pattern":"^[A-Za-z0-9._-]+$"}},"required":["name","price","currency"],"examples":[{"name":"T-shirt","price":"25.00","currency":"USD","sku":"TSHIRT-01"}]},"Payment":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","const":"payment"},"invoice_id":{"type":"string"},"livemode":{"type":"boolean"},"network":{"type":"string"},"asset":{"type":"string"},"txid":{"type":"string"},"output_index":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"from_address":{"type":["string","null"]},"to_address":{"type":"string"},"amount":{"type":"string"},"amount_base_units":{"type":"string"},"confirmations":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"status":{"type":"string","enum":["detected","confirmed","failed"]},"block_height":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"block_time":{"anyOf":[{"type":"string","description":"ISO 8601 UTC timestamp.","examples":["2026-10-10T12:00:00.000Z"]},{"type":"null"}]},"explorer_url":{"type":["string","null"]},"first_seen_at":{"type":"string","description":"ISO 8601 UTC timestamp.","examples":["2026-10-10T12:00:00.000Z"]},"confirmed_at":{"anyOf":[{"type":"string","description":"ISO 8601 UTC timestamp.","examples":["2026-10-10T12:00:00.000Z"]},{"type":"null"}]}},"required":["id","object","invoice_id","livemode","network","asset","txid","output_index","from_address","to_address","amount","amount_base_units","confirmations","status","block_height","block_time","explorer_url","first_seen_at","confirmed_at"],"additionalProperties":false,"description":"An on-chain transfer attributed to an invoice."},"Currency":{"type":"object","properties":{"asset":{"type":"string"},"network":{"type":"string"},"symbol":{"type":"string"},"name":{"type":"string"},"decimals":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"kind":{"type":"string","enum":["native","token"]},"contract":{"type":["string","null"]},"min_amount":{"type":"string"},"min_amount_base_units":{"type":"string"},"required_confirmations":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"enabled_for_workspace":{"type":"boolean"}},"required":["asset","network","symbol","name","decimals","kind","contract","min_amount","min_amount_base_units","required_confirmations","enabled_for_workspace"],"additionalProperties":false,"description":"A crypto asset the platform supports."},"Rate":{"type":"object","properties":{"fiat":{"type":"string"},"asset":{"type":"string"},"fiat_per_asset":{"type":"string"},"asset_usd":{"type":"string"},"fetched_at":{"type":"string","description":"ISO 8601 UTC timestamp.","examples":["2026-10-10T12:00:00.000Z"]},"stale":{"type":"boolean"}},"required":["fiat","asset","fiat_per_asset","asset_usd","fetched_at","stale"],"additionalProperties":false,"description":"Price of 1 unit of the asset in the fiat currency."},"Estimate":{"type":"object","properties":{"amount":{"$ref":"#/components/schemas/Money"},"asset":{"type":"string"},"crypto_amount":{"type":"string"},"amount_base_units":{"type":"string"},"rate":{"$ref":"#/components/schemas/Rate"}},"required":["amount","asset","crypto_amount","amount_base_units","rate"],"additionalProperties":false,"description":"Crypto amount for a fiat price at the current rate (not locked)."},"EstimateRequest":{"type":"object","properties":{"amount":{"anyOf":[{"type":"string","pattern":"^\\d{1,13}(\\.\\d{1,8})?$"},{"type":"number","exclusiveMinimum":0}],"description":"Decimal amount as a string (recommended) or number.","examples":["25.00"]},"currency":{"type":"string","enum":["USD","EUR","DOP","MXN","COP","BRL","GBP","ARS","CLP","PEN"],"description":"ISO 4217 fiat currency.","examples":["USD"]},"asset":{"type":"string","enum":["btc_bitcoin","ltc_litecoin","doge_dogecoin","eth_ethereum","usdt_ethereum","usdc_ethereum","bnb_bsc","usdt_bsc","usdc_bsc","pol_polygon","usdt_polygon","usdc_polygon","eth_base","usdc_base","eth_arbitrum","usdt_arbitrum","usdc_arbitrum","trx_tron","usdt_tron","sol_solana","usdc_solana","usdt_solana"],"description":"Asset id: `<symbol>_<network>`.","examples":["usdt_tron"]}},"required":["amount","currency","asset"],"examples":[{"amount":"100.00","currency":"EUR","asset":"btc_bitcoin"}]},"WebhookEndpoint":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","const":"webhook_endpoint"},"url":{"type":"string"},"description":{"type":["string","null"]},"events":{"type":"array","items":{"type":"string"}},"mode":{"type":"string","enum":["live","test","both"]},"is_active":{"type":"boolean"},"secret":{"description":"Only returned once, when the endpoint is created.","type":"string"},"created_at":{"type":"string","description":"ISO 8601 UTC timestamp.","examples":["2026-10-10T12:00:00.000Z"]}},"required":["id","object","url","description","events","mode","is_active","created_at"],"additionalProperties":false,"description":"Where events are delivered, signed with the endpoint secret."},"WebhookEndpointCreate":{"type":"object","properties":{"url":{"type":"string","maxLength":500,"format":"uri"},"description":{"type":"string","maxLength":200},"events":{"default":["*"],"minItems":1,"type":"array","items":{"type":"string","enum":["*","invoice.created","invoice.pending","invoice.partial","invoice.confirming","invoice.paid","invoice.overpaid","invoice.expired","invoice.late_payment","invoice.cancelled","payment.detected","payment.confirmed","webhook.test"]}},"mode":{"type":"string","enum":["live","test","both"]}},"required":["url"],"examples":[{"url":"https://shop.example.com/webhooks/crypto","events":["*"]}]},"Deleted":{"type":"object","properties":{"id":{"type":"string"},"deleted":{"type":"boolean","const":true}},"required":["id","deleted"],"additionalProperties":false},"SimulateRequest":{"type":"object","properties":{"scenario":{"type":"string","enum":["paid","partial","overpaid","expired"]}},"required":["scenario"],"examples":[{"scenario":"paid"}]}}}}