{"id":1538,"date":"2025-10-01T16:09:46","date_gmt":"2025-10-01T08:09:46","guid":{"rendered":"https:\/\/open-doc.jkos.com\/?post_type=docs&#038;p=1538"},"modified":"2026-04-07T16:24:20","modified_gmt":"2026-04-07T08:24:20","slug":"%e8%a1%97%e5%8f%a3%e5%b9%a3%e7%99%bc%e6%94%be-issue-jkos-coins","status":"publish","type":"docs","link":"https:\/\/open-doc.jkos.com\/?docs=%e8%a1%97%e5%8f%a3%e5%b9%a3%e7%99%bc%e6%94%be-issue-jkoscoin\/api-%e5%88%97%e8%a1%a8-api-lists\/%e8%a1%97%e5%8f%a3%e5%b9%a3%e7%99%bc%e6%94%be-issue-jkos-coins","title":{"rendered":"\u8857\u53e3\u5e63\u767c\u653e Issue JKOS Coins"},"content":{"rendered":"\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<ul class=\"wp-block-list\">\n<li><strong>URL: <\/strong><code>https:\/\/{baseURL}\/<span style=\"background-color: initial; font-family: inherit; font-size: inherit;\">jkocoin\/exchange<\/span><\/code><\/li>\n\n\n\n<li><strong>Method: <\/strong><code>POST<\/code><\/li>\n<\/ul>\n\n\n\n<p><strong>\u8aaa\u660e\uff1a\u5916\u90e8\u5e73\u53f0\u547c\u53eb\u6b64 API \u4f86\u767c\u653e\u8857\u53e3\u5e63\u7d66\u6307\u5b9a\u7528\u6236\uff1b\u82e5\u5e36\u5165\u76f8\u540c exchangeId \u91cd\u8907\u547c\u53eb\u6b64 API \u6703\u56de\u8986\u540c\u7b46\u8a02\u55ae\u7d50\u679c\u3002<\/strong><\/p>\n<cite>The external platform calls this API to issue JKOS Coins to a specified user. If the same <code>exchangeId<\/code> is provided in repeated calls, the API will return the same order result.<\/cite><\/blockquote>\n\n\n\n<h2 class=\"wp-block-heading\">\u6574\u5408\u6d41\u7a0b (Integration Workflow)<\/h2>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"474\" height=\"547\" src=\"https:\/\/open-doc.jkos.com\/wp-content\/uploads\/2025\/09\/issue-2.png\" alt=\"\" class=\"wp-image-1562\" srcset=\"https:\/\/open-doc.jkos.com\/wp-content\/uploads\/2025\/09\/issue-2.png 474w, https:\/\/open-doc.jkos.com\/wp-content\/uploads\/2025\/09\/issue-2-260x300.png 260w\" sizes=\"auto, (max-width: 474px) 100vw, 474px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">\u8acb\u6c42\u53c3\u6578 (Request Parameter)<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Request Header<\/h3>\n\n\n\n<figure class=\"wp-block-table is-style-stripes\"><table><thead><tr><th><strong>\u53c3\u6578\u540d\u7a31<\/strong><br>Parameter<\/th><th><strong>\u8cc7\u6599\u578b\u614b<\/strong><br>Data Type<\/th><th><strong>\u5fc5\u8981<\/strong>\u7684<br>Required<\/th><th><strong>\u8aaa\u660e<\/strong><\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>Content-Type<\/td><td>string<\/td><td>Y<\/td><td>&#8220;<strong><em>application\/json<\/em><\/strong>&#8220;<\/td><td>&#8220;<em><strong>application\/json<\/strong><\/em>&#8220;<\/td><\/tr><tr><td>Api-Key<\/td><td>string<\/td><td>Y<\/td><td>\u5e36\u5165\u8857\u53e3\u63d0\u4f9b\u7684 API Key<\/td><td>API key provided by Jkopay.<\/td><\/tr><tr><td>Digest<\/td><td>string<\/td><td>Y<\/td><td>\u52a0\u7c3d\u52a0\u5bc6\u8aaa\u660e (Signature Generation Rule)<\/td><td>Generating the&nbsp;<strong>digest<\/strong><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Request Body<\/h3>\n\n\n\n<figure class=\"wp-block-table is-style-stripes\"><table><thead><tr><th><strong>\u53c3\u6578\u540d\u7a31<\/strong><br>Parameter<\/th><th><strong>\u8cc7\u6599\u578b\u614b<\/strong><br>Data Type<\/th><th><strong>\u6700\u5927\u9577\u5ea6<\/strong><br>Maximum<\/th><th><strong>\u5fc5\u8981<\/strong>\u7684<br>Required<\/th><th><strong>\u8aaa\u660e<\/strong><\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>clientId<\/td><td>string<\/td><td>100<\/td><td>Y<\/td><td>\u547c\u53eb\u7aef\u8b58\u5225\u78bc\uff08\u7531\u8857\u53e3\u63d0\u4f9b\uff09<\/td><td>Client iIdentifier provided by Jkopay.<\/td><\/tr><tr><td>exchangeId<\/td><td>string<\/td><td>64<\/td><td>Y<\/td><td>\u4ea4\u6613\u552f\u4e00\u8b58\u5225\u78bc\uff08<strong>\u9700\u70ba\u552f\u4e00\u503c\uff0c\u4e0d\u53ef\u91cd\u8907<\/strong>\uff09<\/td><td>Unique ID for every request.<br><strong>This ID needs to be unique and unrepeated.<\/strong><\/td><\/tr><tr><td>amount<\/td><td>decimal<\/td><td>20,0<\/td><td>Y<\/td><td>\u767c\u653e\u91d1\u984d\uff08\u91d1\u984d\u5fc5\u9808\u5927\u65bc 0 \u5143\uff09<\/td><td>JKOSCoins issue amount. (Amount must be greater than zero)<\/td><\/tr><tr><td>jkosId<\/td><td>string<\/td><td>64<\/td><td>Y<\/td><td>\u767c\u653e\u5c0d\u8c61 UUID<\/td><td>Target user ID.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">\u7bc4\u4f8b (Example)<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"\" class=\" line-numbers\">curl --location --request POST 'https:\/\/{\u8857\u53e3\u8def\u5f91}\/jkocoin\/exchange' \\<br>--header 'Api-Key: uOXwSoSkXhk-Nj_JWspyfYiNHgKahikk' \\<br>--header 'Digest: 765f165847cf8cd45e2a00c51df3dd590de5a9956f7a0cd14f804fdf8bd052cb' \\<br>--header 'Content-Type: application\/json' \\<br>--data '{\"exchangeId\":\"testunique1758786827\",\"amount\":10,\"jkosId\":\"user123\",\"clientId\":\"310886531\"}'<\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u8fd4\u56de\u53c3\u6578 (Response Parameter)<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Response Body<\/h3>\n\n\n\n<figure class=\"wp-block-table is-style-stripes\"><table><thead><tr><th><strong>\u53c3\u6578\u540d\u7a31<\/strong><br>Parameter<\/th><th><strong>\u8cc7\u6599\u578b\u614b<\/strong><br>Data Type<\/th><th><strong>\u8aaa\u660e<\/strong><\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>Result<\/td><td>string<\/td><td>\u8acb\u53c3\u7167 API \u56de\u8986\u4ee3\u78bc\uff08<strong>Response Code<\/strong>\uff09<\/td><td>Please refer to API response code (Response Code).<\/td><\/tr><tr><td>Message<\/td><td>string<\/td><td>\u7d50\u679c\u8a0a\u606f\u6216\u5931\u6557\u7406\u7531<\/td><td>Result message or reason of error.<\/td><\/tr><tr><td>ResultObject<\/td><td>object<\/td><td><\/td><td><\/td><\/tr><tr><td>ResultObject.jkosId<\/td><td>string<\/td><td>\u767c\u653e\u5c0d\u8c61<\/td><td>Target user ID.<\/td><\/tr><tr><td>ResultObject.issueTime<\/td><td>string<\/td><td>\u767c\u653e\u6642\u9593<br><strong>ISO-8601<\/strong> \u683c\u5f0f\uff1a<code><strong>yyyy-MM-dd\u2019T\u2019HH:mm:ss.SSS\u2019Z\u2019<\/strong><\/code><\/td><td>Issued time. <br><strong>ISO-8601<\/strong> Format: <strong><code>yyyy-MM-dd\u2019T\u2019HH:mm:ss.SSS\u2019Z\u2019<\/code><\/strong><\/td><\/tr><tr><td>ResultObject.amount<\/td><td>string<\/td><td>\u767c\u653e\u91d1\u984d<\/td><td>Issued amount.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">\u7bc4\u4f8b (Example)<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"\" class=\" line-numbers\">{<br>  \"Result\": \"0001\",<br>  \"Message\": null,<br>  \"ResultObject\": {<br>    \"jkosId\": \"user123\",<br>    \"issueTime\": \"2025-10-01T10:38:22.999Z\",<br>    \"amount\": 20<br>  }<br>}<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"\">{<br>  \"Result\": \"<span style=\"background-color: initial; font-family: inherit; font-size: inherit;\">2-MT-9005<\/span>\",<br>  \"Message\": \"Internal service error\",<br>  \"ResultObject\": null<br>}<\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u56de\u8986\u4ee3\u78bc (Response Code)<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">\u6aa2\u6838\u985e\u932f\u8aa4<\/h3>\n\n\n\n<figure class=\"wp-block-table is-style-stripes\"><table><thead><tr><th>Result Code<\/th><th>\u8aaa\u660e<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>0001<\/td><td>\u6210\u529f<\/td><td>Success<\/td><\/tr><tr><td><strong>2-GW-0997<\/strong><\/td><td>\u670d\u52d9\u7dad\u8b77\u4e2d (Gateway)<\/td><td>Service is under maintenance.<\/td><\/tr><tr><td><strong>2-GW-0201<\/strong><\/td><td>\u9a57\u7c3d\u5931\u6557 (Gateway)<\/td><td>Signature verification failed.<\/td><\/tr><tr><td><strong>2-MT-9001<\/strong><\/td><td>\u6b04\u4f4d\u6aa2\u6838\u5931\u6557<\/td><td>Validation failed.<\/td><\/tr><tr><td><strong>2-MT-9002<\/strong><\/td><td>\u767c\u653e\u5c0d\u8c61\u4e0d\u5b58\u5728<\/td><td>Target user not found.<\/td><\/tr><tr><td><strong>2-MT-9003<\/strong><\/td><td>\u767c\u653e\u91d1\u984d\u9700\u5927\u65bc 0<\/td><td>Amount must be greater than zero.<\/td><\/tr><tr><td><strong>2-MT-9004<\/strong><\/td><td>\u9a57\u8b49\u5931\u6557<\/td><td>Authentication failed.<\/td><\/tr><tr><td><strong>2-MT-9006<\/strong><\/td><td>exchangeId \u8acb\u6c42\u4e0d\u4e00\u81f4<\/td><td>Inconsistent request for exchangeId.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">\u5176\u4ed6\u932f\u8aa4<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u4ee5\u4e0b\u932f\u8aa4\u9700\u7528 <strong><code>\u540c\u500b exchangeId retry<\/code><\/strong> \u76f4\u5230\u53d6\u5f97\u7d50\u679c\u3002(<strong>Please retry with <code>the same exchangeId<\/code>.<\/strong>)<\/li>\n\n\n\n<li>\u82e5\u66f4\u63db exchangeId \u6703\u8996\u70ba\u65b0\u7684\u4ea4\u6613\uff0c\u7121\u6cd5\u5f97\u5230\u539f\u5148\u4ea4\u6613\u7d50\u679c\u4e5f\u6703\u6709\u91cd\u8907\u767c\u653e\u98a8\u96aa\u3002<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-table is-style-stripes\"><table><thead><tr><th>Result Code<\/th><th>\u8aaa\u660e<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td><strong>2-MT-9005<\/strong><\/td><td>Internal service error.<\/td><td>Internal service error. <\/td><\/tr><tr><td><strong>2-MT-9999<\/strong><\/td><td>\u975e\u9810\u671f\u7684\u932f\u8aa4<\/td><td>Unspecified Error.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<h3 class=\"wp-block-heading\">\u70ba\u4ec0\u9ebc\u9700\u8981\u91cd\u8a66\uff1f<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u8a72\u8a02\u55ae\u56e0\u7db2\u8def\u6216\u7cfb\u7d71\u554f\u984c\u72c0\u614b\u5361\u5728\u300c\u8655\u7406\u4e2d\u300d\uff0c\u80cc\u5f8c\u53ef\u80fd\u5df2\u7d93\u767c\u5e63\u6210\u529f\u6216\u5931\u6557\u3002<\/li>\n\n\n\n<li>\u5916\u90e8\u65b9\u9700\u7528\u8a72\u7b46\u4ea4\u6613\u7684 exchangeId \u91cd\u65b0\u5411\u8857\u53e3\u767c\u8d77\u767c\u5e63\u8acb\u6c42\uff0c\u8857\u53e3\u78ba\u8a8d\u72c0\u614b\u4e26\u66f4\u65b0\u70ba\u300c\u6210\u529f\u300d\u6216\u300c\u5931\u6557\u300d\u3002<\/li>\n\n\n\n<li>\u8857\u53e3\u7cfb\u7d71\u4e5f\u6703\u5b9a\u671f retry \u72c0\u614b\u5361\u5728\u300c\u8655\u7406\u4e2d\u300d\u7684\u767c\u653e\u6e05\u55ae\u4e26\u66f4\u65b0\u72c0\u614b\uff0c\u9700\u7531\u5916\u90e8\u518d\u6b21\u7528\u540c\u500b exchangeId \u767c\u8acb\u6c42\u4f86\u78ba\u8a8d\u7d50\u679c\u3002<\/li>\n<\/ul>\n\n\n\n<p>&#8211; <sub>When an internal service error occurs, the order may remain in the <strong>&#8220;processing&#8221;<\/strong> state due to network or system issues.<\/sub><br>&#8211; <sub>The external party must resend the issuance request to JKOPay using the same <code>exchangeId<\/code>. JKOPay will retry the process and update the status to either <strong>&#8220;success&#8221;<\/strong> or <strong>&#8220;failure&#8221;<\/strong>.<\/sub><br><sub>&#8211; JKOPay\u2019s system also periodically retries orders stuck in the <strong>&#8220;processing&#8221;<\/strong> state and updates their status. The external party must either resend the request with the same <code>exchangeId<\/code> to confirm the result.<\/sub><\/p>\n<\/blockquote>\n","protected":false},"featured_media":0,"parent":1511,"menu_order":1,"comment_status":"open","ping_status":"closed","template":"","doc_tag":[],"class_list":["post-1538","docs","type-docs","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/open-doc.jkos.com\/index.php?rest_route=\/wp\/v2\/docs\/1538","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/open-doc.jkos.com\/index.php?rest_route=\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/open-doc.jkos.com\/index.php?rest_route=\/wp\/v2\/types\/docs"}],"replies":[{"embeddable":true,"href":"https:\/\/open-doc.jkos.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1538"}],"version-history":[{"count":44,"href":"https:\/\/open-doc.jkos.com\/index.php?rest_route=\/wp\/v2\/docs\/1538\/revisions"}],"predecessor-version":[{"id":1715,"href":"https:\/\/open-doc.jkos.com\/index.php?rest_route=\/wp\/v2\/docs\/1538\/revisions\/1715"}],"up":[{"embeddable":true,"href":"https:\/\/open-doc.jkos.com\/index.php?rest_route=\/wp\/v2\/docs\/1511"}],"prev":[{"title":"API Domain","link":"https:\/\/open-doc.jkos.com\/?docs=%e8%a1%97%e5%8f%a3%e5%b9%a3%e7%99%bc%e6%94%be-issue-jkoscoin\/api-%e5%88%97%e8%a1%a8-api-lists\/api-domain","href":"https:\/\/open-doc.jkos.com\/index.php?rest_route=\/wp\/v2\/docs\/1578"}],"wp:attachment":[{"href":"https:\/\/open-doc.jkos.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1538"}],"wp:term":[{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/open-doc.jkos.com\/index.php?rest_route=%2Fwp%2Fv2%2Fdoc_tag&post=1538"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}