KukaPay Document
/
/
create_invoice

Create Invoice

Create invoice at KukaPay and redirect shopper to invoice payment url.

Reqeust

Endpoint:

POST https://api.kukapay.com/v1/invoice

Request Body:

field type description
merchant string operation address of the merchant
orderId string order id assigned by merchant
orderDesc string order description
orderAmount double total amount to pay of the order, in orderCurrency
orderCurrency string orderAmount is in this currency
notifyUrl string url to recieve payment state

Response

Status Code

  • 200: success
  • 500: internal error

Response Body

field type description
id int generated invoice id
paymentUrl string payment url on kukapay.com
state int invoice state

Example

Request:

curl -XPOST -d '{
  "merchant": "0xFDeda15e2922C5ed41fc1fdF36DA2FB2623666b3",
  "orderId": "a1b33ee88e6d",
  "orderDesc": "iPhone 12 plus 256G",
  "orderAmount": 7123.45,
  "orderCurrency": "CNY",
  "notifyUrl": "https://yourshop.com/kukapay/notify"
}' -H "Content-Type: application/json" https://api.kukapay.com/api/invoice

Response:

{
  "id": 1728,
  "paymentUrl": "https://www.kukapay.com/invoice/1728",
  "state": 1
}