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.

334 lines
6.7 KiB

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. |Field|M/C/O|Comment|
  12. |---|---|---|
  13. |merchantNo|Mandatory||
  14. |storeNo|Mandatory||
  15. |verifySign|Mandatory|signature|
  16. |profileType|Mandatory|INDIVIDUAL, BUSINESS|
  17. |dateOfBirth|Mandatory|payee's date of birth|
  18. |timestamp|Mandatory|current timestamp in UTC timezone|
  19. ```json
  20. {
  21. "city": "hometown",
  22. "country": "USA",
  23. "countryCode": "US",
  24. "customerCode": "1665425422",
  25. "dateOfBirth": "1999-01-01",
  26. "email": "[email protected]",
  27. "firstName": "John",
  28. "lastName": "Doe",
  29. "merchantNo": "202333",
  30. "phone": "1234567890",
  31. "profileType": "INDIVIDUAL",
  32. "state": "NY",
  33. "storeNo": "301854",
  34. "street": "123 main St",
  35. "street2": "",
  36. "timestamp": "2023-02-13T10:50:58Z",
  37. "verifySign": "2e2294120492ca91b0be1db9a3c98c0e",
  38. "zip": "10005"
  39. }
  40. ```
  41. ### Response
  42. ```json
  43. {
  44. "ret_msg": "success",
  45. "ret_code": "000100",
  46. "customer":
  47. {
  48. "firstName": "John",
  49. "lastName": "Doe",
  50. "customerCode": "1665425422",
  51. "createdTime": "2022-10-10T18:15:19Z",
  52. "customerNo": "2000305228292319592008",
  53. "email": "[email protected]"
  54. }
  55. }
  56. ```
  57. # Rerieve Payee info
  58. ---
  59. * {Domain}/v3/payee/retrieve
  60. ### Request
  61. ```json
  62. {
  63. "customerNo": "2000305228303182610217",
  64. "merchantNo": "202333",
  65. "storeNo": "301854",
  66. "timestamp":"2023-02-13T12:35:14Z",
  67. "verifySign": "d81e8e6f33ecdbff1985dbf0210572ce"
  68. }
  69. ```
  70. ### Response
  71. ```json
  72. {
  73. "ret_msg": "query success",
  74. "ret_code": "000100",
  75. "customer": {
  76. "zip": "10005",
  77. "lastName": "Doe",
  78. "country": "USA",
  79. "updatedTime": "2023-02-13T11:46:37Z",
  80. "payeeStatus": "Activated",
  81. "city": "hometown",
  82. "customerCode": "1665425123",
  83. "dateOfBirth": "1999-01-01",
  84. "firstName": "John",
  85. "profileType": "INDIVIDUAL",
  86. "phone": "1234567890",
  87. "countryCode": "US",
  88. "street": "123 main St",
  89. "createdTime": "2023-02-13T11:45:37Z",
  90. "state": "NY",
  91. "lang": "en",
  92. "customerNo": "2000305228303182610217",
  93. "email": "[email protected]"
  94. }
  95. }
  96. ```
  97. # Update payee info
  98. * {Domain}/v3/payee/update
  99. ---
  100. ### Request
  101. ```json
  102. {
  103. "city": "hometown",
  104. "country": "USA",
  105. "countryCode": "US",
  106. "dateOfBirth": "1999-01-01",
  107. "firstName": "John",
  108. "lastName": "Doe",
  109. "merchantNo": "202333",
  110. "phone": "123456789",
  111. "profileType": "INDIVIDUAL",
  112. "state": "NY",
  113. "storeNo": "301854",
  114. "street": "123 main St",
  115. "street2": "",
  116. "timestamp": "2023-02-13T12:37:58Z",
  117. "customerNo": "2000305228303182610217",
  118. "verifySign": "cb74eb92eebadc97445d559bc5501012",
  119. "zip": "10006"
  120. }
  121. ```
  122. ### Response
  123. ```json
  124. {
  125. "ret_msg": "update success",
  126. "ret_code": "000100"
  127. }
  128. ```
  129. # Add payee funding source account
  130. ---
  131. * `/v3/payee/account/create/bank-account`
  132. ### Request
  133. |value|comments|
  134. |---|---|
  135. |branchId|The 9 digit routing number.|
  136. |bankAccountId|The bank account number.|
  137. |bankAccountPurpose|CHECKING, SAVINGS|
  138. |clientIp|The creator's IP address|
  139. ```json
  140. {
  141. "accountCountry": "US",
  142. "accountCurrency": "USD",
  143. "accountTag": "1a52692711",
  144. "accountType": "BANK_ACCOUNT",
  145. "bankAccountId": "7861053298",
  146. "branchId": "101089292",
  147. "bankAccountPurpose":"CHECKING",
  148. "customerNo": "2000305228303182610217",
  149. "ipnUrl": "https://example.com/webhooks",
  150. "merchantNo": "202333",
  151. "storeNo": "301854",
  152. "timestamp": "2023-02-13T11:50:58Z",
  153. "clientIp":"127.0.0.1",
  154. "verifySign": "23f56c32ddcd8732eced87f139d086d9"
  155. }
  156. ```
  157. ### Response
  158. ```json
  159. {
  160. "result": {
  161. "accountTag": "1a52692711",
  162. "accountStatus": "ACTIVATED",
  163. "country": "US",
  164. "firstName": "John",
  165. "lastName": "Doe",
  166. "accountType": "BANK_ACCOUNT",
  167. "currency": "USD",
  168. "accountToken": "2010305228303182765718",
  169. "customerNo": "2000305228292319592008",
  170. "email": "[email protected]",
  171. "timestamp": "2023-02-13T11:48:12Z"
  172. },
  173. "ret_msg": "success",
  174. "ret_code": "000100"
  175. }
  176. ```
  177. # Retrieve payee funding source accounts(created above)
  178. ---
  179. * {Domain}/v3/payee/payout-accounts
  180. ### Request
  181. ```json
  182. {
  183. "merchantNo": "202333",
  184. "storeNo": "301854",
  185. "customerNo": "2000305228292319592008",
  186. "verifySign": "4b57c4ab6f2f71e7fd7cc6046fa5e78c",
  187. "timestamp": "2023-02-13T11:53:58Z"
  188. }
  189. ```
  190. ### Response
  191. ```json
  192. {
  193. "accounts": [
  194. {
  195. "accountTag": "1a52692711",
  196. "country": "US",
  197. "createdAt": "2023-02-13T11:48:13Z",
  198. "accountType": "BANK_ACCOUNT",
  199. "currency": "USD",
  200. "accountToken": "2010305228303182765718",
  201. "cardNumber": "****3298",
  202. "status": "activated"
  203. }
  204. ],
  205. "ret_msg": "success",
  206. "user": {
  207. "firstName": "John",
  208. "lastName": "Doe",
  209. "customerCode": "1665425123",
  210. "customerNo": "2000305228292319592008",
  211. "email": "[email protected]"
  212. },
  213. "ret_code": "000100"
  214. }
  215. ```
  216. # Transfer
  217. ---
  218. * {Domain}/v3/payouts/pay
  219. ### Request
  220. ```json
  221. {
  222. "accountToken": "2010305228303182765718",
  223. "amount": "500",
  224. "currency": "USD",
  225. "customerNo": "2000305228292319592008",
  226. "description": "thank you",
  227. "invoiceId": "9aae4c685d824c5da746f97620c59eb5",
  228. "ipnUrl": "https://example.com/webhooks",
  229. "merchantNo": "202333",
  230. "note": "Payouts, Thanks",
  231. "storeNo": "301854",
  232. "subject": "Payouts",
  233. "timestamp": "2023-02-13T11:58:58Z",
  234. "verifySign": "8b11e8f0d7f2a412f020f266110b57ba"
  235. }
  236. ```
  237. ### Response
  238. |value|comments|
  239. |---|---|
  240. |pending|Your payout request was received and will be processed|
  241. |success|Funds have been credited to the recipient’s account|
  242. |failed|This payout request has failed, so funds were not deducted from the sender’s account|
  243. |returned|This payout request was cancelled|
  244. ```json
  245. {
  246. "result": {
  247. "amount": "500.00",
  248. "transactionNo": "305588797074336092",
  249. "createdTime": "2023-02-13T11:58:59Z",
  250. "invoiceId": "9aae4c685d824c5da746f97620c59eb5",
  251. "currency": "USD",
  252. "accountToken": "2010305228303182765718",
  253. "customerNo": "2000305228303182610217",
  254. "status": "pending"
  255. },
  256. "ret_msg": "succeeded",
  257. "ret_code": "000100"
  258. }
  259. ```
  260. # Appendix
  261. ### Response Codes
  262. |Code|Detail|
  263. |---|---|
  264. |000000|System Error|
  265. |000020|Parameter Null Error|
  266. |000021|Parameter No Related Information|
  267. |000022|Parameters Do Not Match|
  268. |000023|Parameter Value Error|
  269. |000030|No Rights / Access Denied|
  270. |000040|Account balance is not sufficient|
  271. |000080|Supplier System's Error|
  272. |000100|Success|