POST
/
merchant
/
payment
/
new
curl --request POST \
  --url https://api.unibee.top/merchant/payment/new \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "cancelUrl": "<string>",
  "countryCode": "<string>",
  "currency": "<string>",
  "description": "<string>",
  "email": "<string>",
  "externalPaymentId": "<string>",
  "externalUserId": "<string>",
  "gasPayer": "<string>",
  "gatewayId": 123,
  "gatewayPaymentType": "<string>",
  "items": [
    {
      "amount": 123,
      "amountExcludingTax": 123,
      "currency": "<string>",
      "description": "<string>",
      "name": "<string>",
      "quantity": 123,
      "tax": 123,
      "taxPercentage": 123,
      "unitAmountExcludingTax": 123
    }
  ],
  "metadata": {},
  "name": "<string>",
  "paymentType": "<string>",
  "planId": 123,
  "redirectUrl": "<string>",
  "sendInvoice": false,
  "totalAmount": 123,
  "userId": 123
}'
{
  "code": 123,
  "data": {
    "action": {},
    "externalPaymentId": "<string>",
    "link": "<string>",
    "paymentId": "<string>",
    "status": 123
  },
  "message": "<string>",
  "redirect": "<string>",
  "requestId": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
gatewayId
integer
required

GatewayId

cancelUrl
string

CancelUrl

countryCode
string

CountryCode

currency
string

Currency, either Currency&TotalAmount or PlanId needed

description
string

Description

email
string

Email, either ExternalUserId&Email or UserId needed

externalPaymentId
string

ExternalPaymentId should unique for payment

externalUserId
string

ExternalUserId, unique, either ExternalUserId&Email or UserId needed

gasPayer
string

who pay the gas, merchant|user

gatewayPaymentType
string

GatewayPaymentType

items
object[]

Items

metadata
object

Metadata,Map

name
string

Name

paymentType
string

Payment Type

planId
integer

PlanId, either TotalAmount&Currency or PlanId needed

redirectUrl
string

Redirect Url

sendInvoice
boolean
default:false

Whether sen invoice email to customer or not,default false

totalAmount
integer

Total PaymentAmount, Cent, either TotalAmount&Currency or PlanId needed

userId
integer

UserId, either ExternalUserId&Email or UserId needed

Response

200 - application/json
code
integer
data
object
message
string
redirect
string
requestId
string