Skip to content

Apply Drop-In Session

  • Endpoint: POST /aggregate-pay/api/gateway/applyDropinSession
  • Tags: Collection Service/DropIn Payment

Description

Call this interface from the merchant server to retrieve the primary parameters required for initializing Drop-In components.

Note: If you have foreign exchange or marketing needs, please contact PayerMax technical support.

Parameters

FieldInTypeRequiredConstraintsDescription
Content-TypeheaderstringYes
signheaderstringYes签名信息请参考技术文档

Parameter Examples

  • Content-Type: "application/json"
  • sign: "FPFVT3o227JrFRbqu19boZCpVVTF9KznxyRawUmxpfXilHV/0yK46haPhAjNu1hPUMy7Vw/ILXhfzffNm4Fj0apWknlTY9OJxnSoQxS9BTFtc61tn5yV1q69x/kkBl82/qwg+XTJ4fOzy7Mar3VaC1E2PlDA6RkkKBUyNE6RYgsdB+Su7an4+4HVTNAnoe74WyvBgxTLMNg28igBTdqxaO3w/UBY6ObVp7vkqkQGdL1Y+HgmMYaAVwrM3+ALWGId0sJ+YqTY4WJ+0xCRGhaSnybiIjZsQEYyID68WNUfuavDLDsEhaMm/HfQvf5p0R1Ltovp3wwJnEbQcjY458iX5A=="

Request Body

Content-Type: application/json

FieldTypeRequiredConstraintsDescriptionEnum
versionstringYesAPI version. Current value: 1.5
keyVersionstringYesSignature Algorithm Version, Current value: 1
requestTimestringYesRequest time, compliant with rfc3339 specification, format: yyyy-MM-dd'T'HH:mm:ss.SSSXXX The time must be within two minutes of the current time
appIdstringYesMerchant AppId,The unique identifier assigned to the merchant app by PayerMax
merchantNostringNomaxLength: 32Merchant Id, the unique identifier generated when the merchant signs the contract with PayerMax
dataobjectYesRequest data body.
data.totalAmountnumberYesThe order amount is passed in by the merchant. The unit of the amount is yuan, and it is sent according to the decimal point supported by the currency of each country. Note: Bahrain, Kuwait, Jordan, Omar,Tunisia, the local currency only supports two decimal places; In Indonesia, Taiwan (China), South Korea, Vietnam, Chile,Pakistan, Colombia, Japan, Iceland, Paraguay, the local currency does not support decimal amounts.See【Supported Country/Region and Currency
data.mitTypestringNomaxLength: 64mit type
data.currencystringYesmaxLength: 3Currency code, capital letter see【Supported Country/Region and Currency
data.countrystringYesmaxLength: 2Country code, capital letters,If the passed country code does not match the currency, the cashier will be displayed in the region corresponding to the currency code. If a payment method is specified, the country must be sent, see【Supported Country/Region and Currency
data.userIdstringYesmaxLength: 64The user ID of the merchant, needs to ensure the uniqueness of each user ID. After the payment method is bound, the payment method will be recommended according to the userId.
data.referralCodestringNomaxLength: 32Used for more accurate payment method recommendations, such as device ID, device fingerprint, etc.
data.tokenForFutureUsebooleanNoA value of true indicates support for token payments, false indicates no support. Defaults to false.
data.componentListarray[string]NoList of payment method types requested for support.

Example

json
{
  "version": "1.1",
  "keyVersion": "1",
  "requestTime": "2022-01-17T09:05:52.194+00:00",
  "appId": "3b242b56a8b64274bcc37dac281120e3",
  "merchantNo": "020213827212251",
  "data": {
    "currency": "IDR",
    "country": "ID",
    "userId": "U10001",
    "tokenForFutureUse": false,
    "componentList": [
      "CARD",
      "APPLEPAY"
    ]
  }
}

Responses

200

FieldTypeRequiredConstraintsDescriptionEnum
codestringYesReturn code, ‘APPLY_SUCCESS’ means success.It only represents the success of the interface request, not the order status.
msgstringYesReturn message, ‘Success.’.It only represents the success of the interface request, not the order status.
dataobjectNoReturn data body.
data.sessionKeystringYesmaxLength: 64Drop-in sessionKey
data.clientKeystringYesmaxLength: 64clientKey
data.notSupportedComponentarray[string]YesUnsupported payment method types.

Response Example

json
{
  "code": "APPLY_SUCCESS",
  "msg": "Success.",
  "data": {
    "clientKey": "37114858239eur2384237r810482390",
    "sessionKey": "bdsf8982348974hhf82934bf8239424",
    "notSupportedComponent": []
  }
}

Was this page helpful?

Thank you for your help in improving PayerMax Product Docs!

Released under the MIT License.