---
title: NFT v2 API
tags: v2
---
`/api/v2/payment/checkout/:order_id/tappay`
`/api/v2/payment/tappay/checkout/:order_id`
## NFT v2 API
### URL: [POST] `/api/v2/nft/:project_id/tokens/draft`
```
input: {
owner: (string), required // wallet address
chain_name: (string), required
chain_type: (string), required
image_url: (string), required
external_link: (string),
description: (string), // 顯示在 opensea 的 description
creator_name: (string), // 顯示在 opensea 的 description
creator_bio: (string), // 顯示在 opensea 的 description
type: (string), // Type of NFT
name: (string), required // Name of NFT
}
output: {
}
example input: {
owner: "0x8bE68E449266b953682b5031E740246a6652618F",
chain_name: "POLYGON",
chain_type: "PUBLIC",
description: "test",
image_url: "https://pbs.twimg.com/media/Epe-dICWwAA7x8z?format=jpg&name=900x900",
external_link: "https://pbs.twimg.com/media/",
type: Art,
name: Giraffe,
creator_name: Micky,
creator_bio: I'm handsome,
}
example responses: {
order: {
"id": 331,
"product_name": "NFT_MATIC",
"amount": 1,
"currency": "TWD",
"status": "unpaid",
"created_at": "2022-03-24T05:49:50.628Z"
},
asset: {
"owner": "0x8bE68E449266b953682b5031E740246a6652618F",
"name": "takuya",
"description": "test",
"image_url": "https://pbs.twimg.com/media/Epe-dICWwAA7x8z?format=jpg&name=900x900",
"external_link": "https://pbs.twimg.com/media/",
"creator_name": "Micky",
"creator_bio": "I'm so handsome",
"type": "selfi",
"token_id": 2553
},
blockchain: {
typ": "public",
network: "devnet",
name: "MATIC"
},
need_to_pay_now: true
}
```
* need_to_pay_now === false 就直接去 mint
* 需要補上 order_id, token_id 已補上[name=Micky]
### URL: [POST] `/api/v2/payment/tappay/orders/:order_id/checkout/pay-by-prime`
```
input: {
phone_number: (string), // required
cardholder: (string), // required
zip: (string), // required
address: (string), // required
country: (string), // required
card: {
prime // required
}
}
output: {
}
example input: {
}
example responses: {
code: 0 // success
}
```
### URL: [POST] `/api/v2/nft/:project_id/tokens/:token_id/mint`
```
input: {
order_id: (string) required
}
output: {
}
example input: {
order_id: 123
}
example responses: {
"token_id": 2512,
"on_chain_status": "Pending",
"transaction_hash": "0xd83ad61d5240e6e83264e4e27d200de991ac5641c2bcbed94cb3d134d0f54230",
"transaction_time": "2022-03-22T06:29:13.811Z"
}
```
### URL: [GET] `/api/v2/nft/:project_id/orders/:order_id/checkout`
```
input: {
}
output: {
}
example input: {
}
example responses: {
id: "624177b6a0cab6abd3668a4b"
created_at: "2022-03-28T08:54:14.196Z"
updated_at: "2022-03-28T08:54:14.202Z"
contract_address: "0x180360dfEC860b2E007E0fbEE9980Be4195F88A7"
token_id: 2657
on_chain_status: Pending
order: {
"id": 331,
"product_name": "NFT_MATIC",
"amount": 1,
"currency": "TWD",
"status": "unpaid",
"created_at": "2022-03-24T05:49:50.628Z"
},
asset: {
"owner": "0x8bE68E449266b953682b5031E740246a6652618F",
"name": "takuya",
"description": "test",
"image_url": "https://pbs.twimg.com/media/Epe-dICWwAA7x8z?format=jpg&name=900x900",
"external_link": "https://pbs.twimg.com/media/",
"creator_name": "Micky",
"creator_bio": "I'm so handsome",
"type": "selfi",
"token_id": 2553,
"created_at": "2022-03-28T07:10:02.769Z",
"updated_at": "2022-03-28T07:10:02.772Z",
"id": "62415f4a0ae487793b76cf7e"
},
blockchain: {
"type": "public",
"network": "devnet",
"name": "MATIC",
"created_at": "2022-03-28T07:10:02.769Z",
"updated_at": "2022-03-28T07:10:02.772Z",
"id": "62415f4a0ae487793b76cf7e"
}
}
```
### URL: [GET] `/api/v2/nft/:project_id/orders/:order_id/status`
```
input: {
}
output: {
}
example input: {
}
example responses: {
last_four: 4242,
token_id: 2512,
on_chain_status: "Pending",
transaction_hash: "0xd83ad61d5240e6e83264e4e27d200de991ac5641c2bcbed94cb3d134d0f54230",
transaction_time: "2022-03-22T06:29:13.811Z",
order: {
"id": 331,
"product_name": "NFT_MATIC",
"amount": 1,
"currency": "TWD",
"status": "unpaid",
"created_at": "2022-03-24T05:49:50.628Z"
},
asset: {
"owner": "0x8bE68E449266b953682b5031E740246a6652618F",
"name": "takuya",
"description": "test",
"image_url": "https://pbs.twimg.com/media/Epe-dICWwAA7x8z?format=jpg&name=900x900",
"external_link": "https://pbs.twimg.com/media/",
"creator_name": "Micky",
"creator_bio": "I'm so handsome",
"type": "selfi",
"token_id": 2553,
"created_at": "2022-03-28T07:10:02.769Z",
"updated_at": "2022-03-28T07:10:02.773Z",
"id": "62415f4a0ae487793b76cf7f"
},
blockchain: {
"type": "public",
"network": "devnet",
"name": "MATIC",
"created_at": "2022-03-28T07:10:02.769Z",
"updated_at": "2022-03-28T07:10:02.772Z",
"id": "62415f4a0ae487793b76cf7e"
}
}
```
### URL: [GET] `/api/v2/nft/:project_id?status=paid`
```
query: {
status (string) // paid/unpaid
}
output: {
}
example query: {
status: paid
}
example responses: [
{
"token_id": 2646,
"order_id": 358,
"token_url": "https://dev.fio.one/api/v2/opensea/0x180360dfEC860b2E007E0fbEE9980Be4195F88A7/2646",
"transaction_url": "https://mumbai.polygonscan.com/tx/undefined",
"on_chain_status": "Pending",
"asset": {
"owner": "0x8bE68E449266b953682b5031E740246a6652618F",
"name": "takuya",
"description": "test",
"image_url": "https://pbs.twimg.com/media/Epe-dICWwAA7x8z?format=jpg&name=900x900",
"external_link": "https://pbs.twimg.com/media/",
"meta": null,
"type": "selfi",
"creator_name": "Micky",
"creator_bio": "I'm so handsome"
"created_at": "2022-03-22T06:29:13.811Z"
}
},
{
"token_id": 2651,
"order_id": 359,
"token_url": "https://dev.fio.one/api/v2/opensea/0x180360dfEC860b2E007E0fbEE9980Be4195F88A7/2651",
"transaction_url": "https://mumbai.polygonscan.com/tx/0x5f8070a078df1989118ad4e63e02c30efc2932b50a75e1412af432564fa29525",
"transaction_hash": "0x5f8070a078df1989118ad4e63e02c30efc2932b50a75e1412af432564fa29525",
"transaction_date": "2022-03-28T07:05:43.016Z",
"on_chain_status": "Pending",
"asset": {
"owner": "0x8bE68E449266b953682b5031E740246a6652618F",
"name": "takuya",
"description": "test",
"image_url": "https://pbs.twimg.com/media/Epe-dICWwAA7x8z?format=jpg&name=900x900",
"external_link": "https://pbs.twimg.com/media/",
"meta": null,
"type": "selfi",
"creator_name": "Micky",
"creator_bio": "I'm so handsome"
}
},
{
"token_id": 2654,
"order_id": 360,
"token_url": "https://dev.fio.one/api/v2/opensea/0x180360dfEC860b2E007E0fbEE9980Be4195F88A7/2654",
"transaction_url": "https://mumbai.polygonscan.com/tx/undefined",
"on_chain_status": "Pending",
"asset": {
"owner": "0x8bE68E449266b953682b5031E740246a6652618F",
"name": "takuya",
"description": "test",
"image_url": "https://pbs.twimg.com/media/Epe-dICWwAA7x8z?format=jpg&name=900x900",
"external_link": "https://pbs.twimg.com/media/",
"meta": null,
"type": "selfi",
"creator_name": "Micky",
"creator_bio": "I'm so handsome"
}
},
{
"token_id": 2656,
"order_id": 361,
"token_url": "https://dev.fio.one/api/v2/opensea/0x180360dfEC860b2E007E0fbEE9980Be4195F88A7/2656",
"transaction_url": "https://mumbai.polygonscan.com/tx/undefined",
"on_chain_status": "Pending",
"asset": {
"owner": "0x8bE68E449266b953682b5031E740246a6652618F",
"name": "takuya",
"description": "test",
"image_url": "https://pbs.twimg.com/media/Epe-dICWwAA7x8z?format=jpg&name=900x900",
"external_link": "https://pbs.twimg.com/media/",
"meta": null,
"type": "selfi",
"creator_name": "Micky",
"creator_bio": "I'm so handsome"
}
}
]
```
### URL: [GET] `/api/v2/nft/products`
```
input: {
}
output: {
}
example : {
}
example responses: [
{
chain_name: 'polygon',
chain_type: 'public',
currency: 'TWD',
price: 1,
},
{
chain_name: 'ethereum',
chain_type: 'public',
currency: 'TWD',
price: 2300,
}
]
```