PostSettlementReceiver

POST /settlement/receiver/{merchant}

Create a settlement receiver

Path parameters

  • merchant string Required

    Merchant name to payment company, e.g. wechat.sh_smk

application/json

Body

  • type string

    Receiver type of profit sharing. MERCHANT_ID: merchants, PERSONAL_OPENID: personal. PERSONAL_OPENID is not available

    Values are MERCHANT_ID or PERSONAL_OPENID.

  • account string

    The receiver account.

  • name string

    The receiver name.

  • Relationship between sub-merchant and recipient.

    Values are SUPPLIER, DISTRIBUTOR, SERVICE_PROVIDER, PLATFORM, or OTHERS.

  • Ciphertext of individual name(verify if value is passed)

  • The Settlement receiver description.

  • Payment method, must be wechatpay or alipay

    Values are wechatpay or alipay.

Responses

  • 200

    Create a profit receiver successfully.

    Hide response attributes Show response attributes object
    • code integer(int32)
    • message string | null

      Response message

    • type string | null

      Receiver type of profit sharing. MERCHANT_ID: merchants, PERSONAL_OPENID: personal.

      Values are MERCHANT_ID or PERSONAL_OPENID.

    • account string | null

      The receiver account.

    • receivers array[object]
      Hide receivers attributes Show receivers attributes
      • type string

        Receiver type of profit sharing. MERCHANT_ID: merchants, PERSONAL_OPENID: personal. PERSONAL_OPENID is not available

        Values are MERCHANT_ID or PERSONAL_OPENID.

      • The receiver account.

      • name string

        The receiver account.

      • amount integer(int32)

        The amount of account allocation, in cent, cannot exceed the payment amount of the original order and the maximum proportion of account allocation

      • Payment method, must be wechatpay or alipay

        Values are wechatpay or alipay.

      • The description of profit sharing.

      • Merchant ID of receiver.

      • result string | null

        Profit sharing order result

        Values are PENDING, SUCCESS, REFUND, or CLOSED.

      • The finish time of profit sharing with the rfc3339 standard format.

      • The failed reason of profit sharing.

        Values are ACCOUNT_ABNORMAL, NO_RELATION, or RECEIVER_HIGH_RISK.

      • detailId string

        Profit sharing detailed order number, which can be used for reconciliation with the fund bill.

  • 400

    Request validation failure

    Hide response attributes Show response attributes object
  • 401

    Not Authenticated.

    Hide response attributes Show response attributes object
  • 500

    Something wrong when query the payout.

    Hide response attributes Show response attributes object
POST /settlement/receiver/{merchant}
curl \
 -X POST https://nomad.samarkand-global.cn/broker/v1/settlement/receiver/wechat.sh_smk \
 -H "app-api-key: $API_KEY" \
 -H "Content-Type: application/json" \
 -d '{"type":"MERCHANT_ID","account":"1900000109","name":"张三","relationType":"OTHERS","encryptedName":"hu89ohu89ohu89o","description":"网络公司","paymentMethod":"wechatpay"}'
Request example
{
  "type": "MERCHANT_ID",
  "account": "1900000109",
  "name": "张三",
  "relationType": "OTHERS",
  "encryptedName": "hu89ohu89ohu89o",
  "description": "网络公司",
  "paymentMethod": "wechatpay"
}
Response examples (200)
{
  "code": 200,
  "message": "success",
  "type": "MERCHANT_ID",
  "account": "1900000109",
  "receivers": [
    {
      "type": "MERCHANT_ID",
      "receiverAccount": "1900000109",
      "name": "1900000109",
      "amount": 12,
      "paymentMethod": "wechatpay",
      "description": "分帐1900000110",
      "receiverMchid": "Orange",
      "result": "SUCCESS",
      "finishTime": "2015-05-20T13:29:35.120+08:00",
      "failReason": "NO_RELATION",
      "detailId": "3601111111111111111111"
    }
  ]
}
Response examples (400)
{
  "code": 200,
  "message": "success"
}
Response examples (401)
{
  "code": 200,
  "message": "success"
}
Response examples (500)
{
  "code": 200,
  "message": "success",
  "errors": "Something wrong when making the service."
}