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.

342 lines
6.8 KiB

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