POST api/Payment/PostPayment

Unified order

Request Information

Body Parameters

PaymentModel
NameDescriptionTypeAdditional information
IP

IP

string

None.

Money

Price

decimal number

None.

DeviceId

device id

integer

None.

ProductId

Product id

integer

None.

Phone

string

None.

UserId

user id

integer

None.

PayType

integer

None.

Remarks

integer

None.

Version

integer

None.

Token

Get it after logging in Token

string

None.

Language

Language Option

string

None.

AppId

APP Application Identifier

string

None.

Request Formats

application/json, text/json

Sample:
{
  "IP": "sample string 1",
  "Money": 2.0,
  "DeviceId": 3,
  "ProductId": 4,
  "Phone": "sample string 5",
  "UserId": 6,
  "PayType": 7,
  "Remarks": 8,
  "Version": 9,
  "Token": "sample string 10",
  "Language": "sample string 11",
  "AppId": "sample string 12"
}

application/xml, text/xml

Sample:
<PaymentModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/NewGPS2012.AppApi.Models.ParModel">
  <AppId>sample string 12</AppId>
  <Language>sample string 11</Language>
  <Token>sample string 10</Token>
  <DeviceId>3</DeviceId>
  <IP>sample string 1</IP>
  <Money>2</Money>
  <PayType>7</PayType>
  <Phone>sample string 5</Phone>
  <ProductId>4</ProductId>
  <Remarks>8</Remarks>
  <UserId>6</UserId>
  <Version>9</Version>
</PaymentModel>

Response Information

Resource Description

PaymentResult
NameDescriptionTypeAdditional information
prepay_id

Pre-payment transaction session id

string

None.

WeChatAppId

string

None.

MchId

string

None.

State

status code

integer

None.

Response Formats

application/json, text/json

Sample:
{
  "prepay_id": "sample string 1",
  "WeChatAppId": "sample string 2",
  "MchId": "sample string 3",
  "State": 4
}

application/xml, text/xml

Sample:
<PaymentResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/NewGPS2012.AppApi.Models.ResModel">
  <State>4</State>
  <MchId>sample string 3</MchId>
  <WeChatAppId>sample string 2</WeChatAppId>
  <prepay_id>sample string 1</prepay_id>
</PaymentResult>