Skip to content

Create Payment (POST Payment)

Merchants call this API to initiate a payment (create a transaction). The system routes the request by amount, payment method, country, and terminal type, and returns a unified body with result (code and message) and data (status, optional action for redirects / 3DS, and optional amount).

Request

  • Method: POST
  • Path: /api/v1/payin/createPayment
  • Content-Type: application/json
  • Auth: Include AppId, Timestamp, Signature headers as in Authentication

1. Request body fields

Root fields

FieldTypeLength / limitsRequiredDescription
merchantOrderIdstring≤ 64 charsYesMerchant order ID (unique per merchant)
amountobjectYesAmount; see amount
countrystring2 chars, ISO-3166YesCountry/region code, e.g. CN
transInitiatorobjectYesTerminal that initiates the payment; see transInitiator
paymentMethodobjectYesPayment method; see paymentMethod
userInfoobjectConditionalUser info; required when integrating the Payermax channel; see userInfo
notifyUrlstring≤ 256 chars, URLYesAsync payment result notification URL
returnUrlstring≤ 256 chars, URLNoRedirect URL after payer completes payment
descriptionstring≤ 256 charsNoOrder description

amount object

FieldTypeLength / limitsRequiredDescription
valuestringGreater than 0, total string length ≤ 12YesAmount in minor units (e.g. cents); must match currency rules. Values that violate rules (e.g. decimal-style amounts for zero-decimal currencies) are rejected upfront
currencystring3 chars, ISO-4217YesCurrency, e.g. USD, PHP

Supported country/currency pairs: Country & currency.

transInitiator object

FieldTypeLength / limitsRequiredDescription
terminalTypestringenumYesWEB, WAP, or APP
deviceTypestringenumConditionalAndroid or iOS. Required when paymentMethod.type is e-wallet and terminalType is WAP or APP
browserInfoobjectConditionalRequired for card payments when 3DS is not supplied by the merchant; see browserInfo

browserInfo object

(Under transInitiator.browserInfo, when required.)

FieldTypeLength / limitsRequiredDescription
acceptHeaderstring≤ 2048YesBrowser Accept header
colorDepthstring2 charsYesOne of 1, 4, 8, 15, 16, 24, 32, 48
javaEnabledbooleanYesWhether Java is enabled in the browser
languagestring≤ 8Yese.g. from navigator.language, e.g. en-GB
screenHeightstring≤ 6YesScreen height in pixels
screenWidthstring≤ 6YesScreen width in pixels
timeZoneOffsetstring≤ 5YesOffset between UTC and local browser time, in minutes

paymentMethod object

FieldTypeRequiredDescription
typestringYescard, e-wallet, qr, onlineBanking, or bankTransfer. See Payment methods
e-walletobjectConditionalRequired when type is e-wallet; see below
qrobjectConditionalRequired when type is qr; see below
onlineBankingobjectConditionalRequired when type is onlineBanking; see below
bankTransferobjectConditionalRequired when type is bankTransfer; see below
cardobjectConditionalRequired when type is card; see below
threeDSobjectConditionalRequired when type is card for 3DS strategy; see threeDS

In JSON, the e-wallet nested object key must be "e-wallet" (quoted).

paymentMethod.e-wallet object

FieldTypeRequiredDescription
paymentBrandstringYesEnum: gcash only. See Payment brands

paymentMethod.qr object

FieldTypeRequiredDescription
paymentBrandstringYesSee Payment brands

paymentMethod.onlineBanking object

FieldTypeRequiredDescription
paymentBrandstringYesSee Payment brands

paymentMethod.bankTransfer object

FieldTypeRequiredDescription
paymentBrandstringYesSee Payment brands

paymentMethod.card object

FieldTypeLength / limitsRequiredDescription
cardNumberstring≤ 19YesCard number; required when card is sent
cvcstring≤ 4NoSecurity code
expiryDatestring≤ 4YesExpiry MMYY
holderNamestring≤ 50NoCardholder name

threeDS object

(Under paymentMethod.threeDS.)

FieldTypeRequiredDescription
threeDSStrategystringYesForce: force 3DS (inner); None: no 3DS (none); External: merchant-handled 3DS result

userInfo object

FieldTypeLength / limitsRequiredDescription
merchantUserIdstring≤ 128 charsNoUnique merchant-side user identifier for risk control, payment instrument binding, repeat purchase recognition, and dispute tracking
phoneNumberstring≤ 32 charsNoUser phone number
shopperIPstring≤ 64NoUser IP
userAgentstring≤ 2048NoHTTP User-Agent value
emailstring≤ 254NoUser email
billingAddressobjectNoBilling address; may be required by some channels for identity; see billingAddress
nameobjectNoName; see name

billingAddress object

(Under userInfo.billingAddress. When this object is sent, fields marked Yes below must be provided.)

FieldTypeLength / limitsRequiredDescription
addressstring≤ 1024NoStreet / line address
citystring≤ 50YesCity
countrystring2 charsYesISO-3166 country code, e.g. CN
postalCodestring≤ 16NoPostal code
stateOrProvincestring≤ 3NoState/province, ISO 3166-2
emailstring≤ 254YesEmail

name object

(Under userInfo.name.)

FieldTypeLength / limitsRequiredDescription
firstNamestring≤ 64NoGiven name
lastNamestring≤ 64NoFamily name

2. Request examples

E-wallet

When terminalType is WEB, omit deviceType. When paymentMethod.type is e-wallet and terminalType is WAP or APP, deviceType (Android or iOS) is required. When integrating the Payermax channel, userInfo is required.

json
{
  "merchantOrderId": "M202512180001",
  "amount": {
    "value": "1099",
    "currency": "HKD"
  },
  "country": "HK",
  "transInitiator": {
    "terminalType": "APP",
    "deviceType": "Android"
  },
  "paymentMethod": {
    "type": "e-wallet",
    "e-wallet": {
      "paymentBrand": "gcash"
    }
  },
  "userInfo": {
    "merchantUserId": "user_10001",
    "phoneNumber": "7151923499",
    "shopperIP": "112.198.100.1",
    "userAgent": "Mozilla/5.0 (Linux; Android 13; SM-S911B)",
    "email": "excample@gmail.com"
  },
  "notifyUrl": "https://merchant.com/webhook/payment",
  "returnUrl": "https://merchant.com/pay/result",
  "description": "MU ticket 2025-12-18"
}

Card (with browserInfo and threeDS)

json
{
  "merchantOrderId": "ORDER_20260330_153728_AO1002",
  "amount": {
    "value": "20",
    "currency": "PHP"
  },
  "country": "PH",
  "transInitiator": {
    "terminalType": "WEB",
    "browserInfo": {
      "acceptHeader": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
      "colorDepth": "24",
      "javaEnabled": false,
      "language": "zh-CN",
      "screenHeight": "1440",
      "screenWidth": "2560",
      "timeZoneOffset": "480"
    }
  },
  "paymentMethod": {
    "type": "card",
    "card": {
      "cardNumber": "36563",
      "cvc": "123",
      "expiryDate": "1026",
      "holderName": "Bhns Josn",
      "threeDS": {
        "threeDSStrategy": "None"
      }
    }
  },
  "notifyUrl": "https://xxxxxx/api/v1/payin/test/webhook/notify",
  "returnUrl": "https://www.baidu.com",
  "description": "Test Order – Payment Testing",
  "userInfo": {
    "merchantUserId": "user_20001",
    "phoneNumber": "7151923499",
    "shopperIP": "178.49.15.251",
    "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15) Gecko/20100101 Firefox/122.0",
    "email": "jane.brown307@example.com",
    "billingAddress": {
      "city": "New York",
      "country": "US",
      "email": "jane.brown307@example.com",
      "address": "123 Broadway Ave",
      "postalCode": "10001",
      "stateOrProvince": "NY"
    },
    "name": {
      "firstName": "Jane",
      "lastName": "Brown"
    }
  }
}

3. Response body

The response root has result and data:

FieldTypeLength / limitsAlways returnedDescription
resultobjectYesPayment outcome (code and message)
dataobjectPayment record; see fields below

result object

FieldTypeLength / limitsAlways returnedDescription
codestring≤ 32 charsYesResult code (success/failure identifier). See Response codes
msgstring≤ 255 charsYesResult message

data object

FieldTypeLength / limitsAlways returnedDescription
paymentIdstring≤ 64 charsYesVelora platform payment ID
merchantOrderIdstring/NoMerchant order ID
pspstring/NoPSP identifier that actually processes the order
channelOrderIdstring≤ 64 charsNoOrder ID on the PSP / channel side
statusstringPending / Success / FailedYesCurrent payment status
amountobjectNoAmount; may be returned on success or failure; see data.amount
actionobjectNoNext step (redirect / 3DS); see data.action

data.amount object

FieldTypeLength / limitsAlways returnedDescription
valuestringGreater than 0, ≤ 12 charsYes when amount is presentAmount in minor units (e.g. cents); must match currency rules (invalid values such as fractional amounts for zero-decimal currencies are not accepted)
currencystring3 chars, ISO-4217Yes when amount is presente.g. USD, PHP

data.action object

FieldTypeLength / limitsAlways returnedDescription
typestring≤ 32NoRedirect or threeDSRedirect
paymentUrlstring≤ 255, URLNoPay-by-redirect URL; returned when action.type is Redirect
redirectUrlstring≤ 1024No3DS authentication URL; returned when action.type is threeDSRedirect
expireAtstringISO-8601NoExpiry time; passed through from the channel when provided

4. Response examples

Pending payment (Redirect)

json
{
  "result": {
    "code": "P0001",
    "msg": "Payment is processing."
  },
  "data": {
    "paymentId": "payin_202512180001",
    "merchantOrderId": "M202512180001",
    "psp": "omnipay",
    "channelOrderId": "OMNI202512180001",
    "status": "Pending",
    "action": {
      "type": "Redirect",
      "paymentUrl": "https://checkout.omnipay.com/pay/abc123",
      "expireAt": "2025-12-18T18:30:00+08:00"
    }
  }
}

Pending payment (threeDSRedirect)

json
{
  "result": {
    "code": "P0001",
    "msg": "Payment is processing."
  },
  "data": {
    "paymentId": "payin_202512180002",
    "merchantOrderId": "M202512180002",
    "psp": "bankcard_acquirer",
    "channelOrderId": "ACQ202512180002",
    "status": "Pending",
    "action": {
      "type": "threeDSRedirect",
      "redirectUrl": "https://acs.bank.example.com/3ds-challenge",
      "expireAt": "2025-12-18T18:30:00+08:00"
    }
  }
}

Success (with amount)

json
{
  "result": {
    "code": "S0000",
    "msg": "Success"
  },
  "data": {
    "paymentId": "payin_202512180003",
    "merchantOrderId": "M202512180003",
    "psp": "wallet_partner",
    "channelOrderId": "WALLET202512180003",
    "status": "Success",
    "amount": {
      "value": "1099",
      "currency": "HKD"
    }
  }
}

Creation failed (with amount example)

json
{
  "result": {
    "code": "P0012",
    "msg": "Transaction rejected by risk control"
  },
  "data": {
    "paymentId": "payin_202512180006",
    "merchantOrderId": "M202512180006",
    "psp": "risk_gateway",
    "channelOrderId": "RISK202512180006",
    "status": "Failed",
    "amount": {
      "value": "1099",
      "currency": "HKD"
    }
  }
}

For full description of result.code, see Response codes.

See also