Invoices

Methods for creating, listing, and updating invoices in B2BINPAY DeFi API

GET
/api/v1/deployments/{deploymentId}/invoices

Authorization

ApiKeyAuth
x-api-key<token>

Provide API key in X-API-Key header

In: header

Path Parameters

deploymentId*string

Deployment unique identifier

Match^([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)$
Formatuuid

Query Parameters

page?number

Page number (starts from 1)

Range0 < value <= 9007199254740991
Default1
pageSize?number

Number of items per page (max 100)

Range0 < value <= 100
Default10
sortBy?string

Field to sort by

Default"createdAt"

Value in

  • "id"
  • "createdAt"
  • "updatedAt"
sortOrder?string

Sort order (ASC or DESC)

Default"desc"

Value in

  • "asc"
  • "desc"
id?string

Filter by ID that includes the provided string

createdFrom?string

Filter by created date starting from this date

createdTo?string

Filter by created date up to this date

updatedFrom?string

Filter by updated date starting from this date

updatedTo?string

Filter by updated date up to this date

currencyIds?array<string>

Filter by currency IDs

statuses?array<>

Filter by invoice statuses

trackingId?string

Filter by tracking ID that includes the provided string

Response Body

application/json

curl -X GET "https://example.com/api/v1/deployments/123e4567-e89b-12d3-a456-426614174000/invoices"
{  "total": 100,  "page": 1,  "pageSize": 10,  "items": [    {      "requestedAmount": "1500.75",      "availableCurrencies": [        {          "id": "1-0xdac17f958d2ee523a2206206994597c13d831ec7",          "symbol": "USDT",          "name": "Tether USD",          "chainId": "1",          "address": "0xdac17f958d2ee523a2206206994597c13d831ec7",          "decimals": 6,          "isScam": false,          "isVerified": true,          "logoUrl": "https://s2.coinmarketcap.com/static/img/coins/64x64/825.png"        }      ],      "paymentPageButtonUrl": "https://example.com/invoice/pay",      "paymentPageButtonText": "Pay Invoice",      "paymentPageUrl": "https://frontend.example.com/pay/1234567890123456789",      "status": "CREATED",      "createdAt": "2024-01-01T00:00:00.000Z",      "isTron": false,      "id": "1234567890123456789",      "publicId": "1234567890123456789",      "invoiceAddress": "0x1234567890123456789012345678901234567890",      "paidAmount": "0.00",      "paidAmountBaseCurrency": "string",      "trackingId": "INV-2024-0001",      "callbackUrl": "https://example.com/webhook/invoice",      "updatedAt": "2024-01-01T00:00:00.000Z"    }  ]}
Empty
Empty
POST
/api/v1/deployments/{deploymentId}/invoices

Authorization

ApiKeyAuth
x-api-key<token>

Provide API key in X-API-Key header

In: header

Path Parameters

deploymentId*string

Deployment unique identifier

Match^([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)$
Formatuuid

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/api/v1/deployments/123e4567-e89b-12d3-a456-426614174000/invoices" \  -H "Content-Type: application/json" \  -d '{    "requestedAmount": "10.00",    "paymentPageButtonUrl": "https://example.com/callback",    "paymentPageButtonText": "Return to merchant"  }'
{  "requestedAmount": "1500.75",  "availableCurrencies": [    {      "id": "1-0xdac17f958d2ee523a2206206994597c13d831ec7",      "symbol": "USDT",      "name": "Tether USD",      "chainId": "1",      "address": "0xdac17f958d2ee523a2206206994597c13d831ec7",      "decimals": 6,      "isScam": false,      "isVerified": true,      "logoUrl": "https://s2.coinmarketcap.com/static/img/coins/64x64/825.png"    }  ],  "paymentPageButtonUrl": "https://example.com/invoice/pay",  "paymentPageButtonText": "Pay Invoice",  "paymentPageUrl": "https://frontend.example.com/pay/1234567890123456789",  "status": "CREATED",  "createdAt": "2024-01-01T00:00:00.000Z",  "isTron": false,  "id": "1234567890123456789",  "publicId": "1234567890123456789",  "invoiceAddress": "0x1234567890123456789012345678901234567890",  "paidAmount": "0.00",  "paidAmountBaseCurrency": "string",  "trackingId": "INV-2024-0001",  "callbackUrl": "https://example.com/webhook/invoice",  "updatedAt": "2024-01-01T00:00:00.000Z"}
Empty
Empty
Empty
Empty
Empty
GET
/api/v1/deployments/{deploymentId}/invoices/{invoiceId}

Authorization

ApiKeyAuth
x-api-key<token>

Provide API key in X-API-Key header

In: header

Path Parameters

deploymentId*string

Deployment unique identifier

Match^([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)$
Formatuuid
invoiceId*string

Entity ID

Response Body

application/json

curl -X GET "https://example.com/api/v1/deployments/123e4567-e89b-12d3-a456-426614174000/invoices/1234567890123456789"
{  "invoice": {    "requestedAmount": "1500.75",    "availableCurrencies": [      {        "id": "1-0xdac17f958d2ee523a2206206994597c13d831ec7",        "symbol": "USDT",        "name": "Tether USD",        "chainId": "1",        "address": "0xdac17f958d2ee523a2206206994597c13d831ec7",        "decimals": 6,        "isScam": false,        "isVerified": true,        "logoUrl": "https://s2.coinmarketcap.com/static/img/coins/64x64/825.png"      }    ],    "paymentPageButtonUrl": "https://example.com/invoice/pay",    "paymentPageButtonText": "Pay Invoice",    "paymentPageUrl": "https://frontend.example.com/pay/1234567890123456789",    "status": "CREATED",    "createdAt": "2024-01-01T00:00:00.000Z",    "isTron": false,    "id": "1234567890123456789",    "publicId": "1234567890123456789",    "invoiceAddress": "0x1234567890123456789012345678901234567890",    "paidAmount": "0.00",    "paidAmountBaseCurrency": "string",    "trackingId": "INV-2024-0001",    "callbackUrl": "https://example.com/webhook/invoice",    "updatedAt": "2024-01-01T00:00:00.000Z"  }}
Empty
Empty
PUT
/api/v1/deployments/{deploymentId}/invoices/{invoiceId}

Authorization

ApiKeyAuth
x-api-key<token>

Provide API key in X-API-Key header

In: header

Path Parameters

deploymentId*string

Deployment unique identifier

Match^([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)$
Formatuuid
invoiceId*string

Entity ID

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X PUT "https://example.com/api/v1/deployments/123e4567-e89b-12d3-a456-426614174000/invoices/1234567890123456789" \  -H "Content-Type: application/json" \  -d '{    "requestedAmount": "10.00",    "paymentPageButtonUrl": "https://example.com/callback",    "paymentPageButtonText": "Return to merchant"  }'
{  "requestedAmount": "1500.75",  "availableCurrencies": [    {      "id": "1-0xdac17f958d2ee523a2206206994597c13d831ec7",      "symbol": "USDT",      "name": "Tether USD",      "chainId": "1",      "address": "0xdac17f958d2ee523a2206206994597c13d831ec7",      "decimals": 6,      "isScam": false,      "isVerified": true,      "logoUrl": "https://s2.coinmarketcap.com/static/img/coins/64x64/825.png"    }  ],  "paymentPageButtonUrl": "https://example.com/invoice/pay",  "paymentPageButtonText": "Pay Invoice",  "paymentPageUrl": "https://frontend.example.com/pay/1234567890123456789",  "status": "CREATED",  "createdAt": "2024-01-01T00:00:00.000Z",  "isTron": false,  "id": "1234567890123456789",  "publicId": "1234567890123456789",  "invoiceAddress": "0x1234567890123456789012345678901234567890",  "paidAmount": "0.00",  "paidAmountBaseCurrency": "string",  "trackingId": "INV-2024-0001",  "callbackUrl": "https://example.com/webhook/invoice",  "updatedAt": "2024-01-01T00:00:00.000Z"}
Empty
Empty
Empty
Empty

Dernière mise à jour le