You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

166 lines
3.3 KiB

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. # API Domain URL
  2. ---
  3. ## Sandbox
  4. * https://mapi.yuansfer.yunkeguan.com
  5. ## Production
  6. * https://mapi.yuansfer.com
  7. # Payee Registration
  8. ---
  9. * {Domain}/v3/payee/register
  10. ### Request
  11. * `governmentIdType`: 中国大陆用户需要使用身份证号码,type = `ID_CARD`
  12. * 注册成功之后,Payee会收到注册通知邮件,根据指引登录Yuansfer Portal提交相关信息,激活账户之后才可以接收转账。
  13. ```json
  14. {
  15. "city": "hometown",
  16. "country": "USA",
  17. "countryCode": "US",
  18. "customerCode": "1665425422",
  19. "dateOfBirth": "1999-01-01",
  20. "email": "[email protected]",
  21. "firstName": "John",
  22. "governmentId": "123456789",
  23. "governmentIdType": "ID_CARD",
  24. "lastName": "Doe",
  25. "merchantNo": "202333",
  26. "phone": "1234567890",
  27. "profileType": "INDIVIDUAL",
  28. "state": "WA",
  29. "storeNo": "301854",
  30. "street": "123 main St",
  31. "street2": "",
  32. "verifySign": "2e2294120492ca91b0be1db9a3c98c0e",
  33. "zip": "10005"
  34. }
  35. ```
  36. ### Response
  37. ```json
  38. {
  39. "ret_msg": "success",
  40. "ret_code": "000100",
  41. "customer":
  42. {
  43. "firstName": "John",
  44. "lastName": "Doe",
  45. "customerCode": "1665425422",
  46. "createdTime": "2022-10-10T18:15:19Z",
  47. "customerNo": "2000305228292319592008",
  48. "email": "[email protected]"
  49. }
  50. }
  51. ```
  52. # 查询收款人账号信息
  53. ---
  54. * {Domain}/v3/payee/payout-accounts
  55. ### Request
  56. * 查询由收款人登录portal,自己添加的银行账号,PayPal账号,Alipay账号等
  57. ```json
  58. {
  59. "merchantNo": "202333",
  60. "storeNo": "301854",
  61. "customerNo": "2000305228289295850180",
  62. "verifySign": "05a150f56706f9a435748eb986c2daad",
  63. "timestamp": "2022-10-10T18:25:52Z"
  64. }
  65. ```
  66. ### Response
  67. ```json
  68. {
  69. "accounts": [
  70. {
  71. "accountTag": "ee1d4197-36aa-4991-952c-0a9b35f505dd",
  72. "country": "CN",
  73. "createdAt": "2022-09-05T18:27:40Z",
  74. "accountType": "BANK_ACCOUNT",
  75. "currency": "CNY",
  76. "accountToken": "2010305228289296332658",
  77. "cardNumber": "****5655",
  78. "status": "activated"
  79. }
  80. ],
  81. "ret_msg": "success",
  82. "user": {
  83. "firstName": "俊义",
  84. "lastName": "卢",
  85. "customerNo": "2000305228289295850180",
  86. "email": "[email protected]"
  87. },
  88. "ret_code": "000100"
  89. }
  90. ```
  91. # Transfer
  92. ---
  93. * 需要首先通过查询API获得收款账号: `accountToken`
  94. * {Domain}/v3/payee/payout-accounts
  95. ### Request
  96. ```json
  97. {
  98. "accountToken": "2010305228264750806137",
  99. "amount": "500",
  100. "currency": "USD",
  101. "customerNo": "2000305228264750734154",
  102. "description": "thank you",
  103. "invoiceId": "9aae4c685d824c5da746f97620c59eb3",
  104. "ipnUrl": "https://example.com/notify",
  105. "merchantNo": "202333",
  106. "note": "Payouts, Thanks",
  107. "storeNo": "301854",
  108. "subject": "Payouts",
  109. "verifySign": "5110a71cfda71dc5d05bf67ce7b7e4b4"
  110. }
  111. ```
  112. ### Response
  113. ```json
  114. {
  115. "result":
  116. {
  117. "amount": "500.00",
  118. "transactionFee": "20.00",
  119. "transactionNo": "305464260013338582",
  120. "createdTime": "2022-10-10T18:33:32Z",
  121. "invoiceId": "9aae4c685d824c5da746f97620c59eb3",
  122. "currency": "USD",
  123. "accountToken": "2010305228264750806137",
  124. "customerNo": "2000305228264750734154",
  125. "status": "pending"
  126. },
  127. "ret_msg": "pending",
  128. "ret_code": "000100"
  129. }
  130. ```