/** * @apiDefine API API * API List */ /** * @apiDefine Sign * @apiParam (QueryParam) {Long} time Required, UTC timestamp in milliseconds * @apiParam (QueryParam) {String} nonce_str Required, Random string * @apiParam (QueryParam) {String} sign Required, Sign */ /** * @apiDefine PathVariable Path Variable */ /** * @apiDefine QueryParam Query Params */ /** * @apiDefine JSON JSON keys */ /** * @apiDefine ERROR_CODE Error Code */ /** * @apiDefine GlobalError * @apiError (ERROR) return_code Error Code * @apiError (ERROR) return_msg Error Description * @apiError (ERROR_CODE) SYSTEMERROR Exception inside system * @apiError (ERROR_CODE) INVALID_SHORT_ID Partner code is invalid or there is no partner associated with this code * @apiError (ERROR_CODE) SIGN_TIMEOUT Sign expired, the difference between time and the server time is more than 5 minutes * @apiError (ERROR_CODE) INVALID_SIGN Invalid sign * @apiError (ERROR_CODE) PARAM_INVALID Parameters are invalid. See return_msg for more details. * @apiError (ERROR_CODE) NOT_PERMITTED Gateway payment permission has not been enabled for this partner * @apiError (ERROR_CODE) INVALID_CHANNEL Channel name is not available, check the Capitalize * */ /** * @api {GET} /api/v1.0/gateway/partners/{partner_code}/exchange_rate Get Current Exchange Rate * @apiName GetExchange * @apiGroup CommonApi * @apiVersion 1.0.0 * @apiDescription * Get current exchange rate from AUD to CNY provided by WeChat and Alipay(AUD 1=CNY ?). This exchange rate shown is for reference only, please refer to the real time exchange rate when processing the actual transaction. * @apiHeader Accept application/json * @apiParam (PathVariable) {String} partner_code Required, Partner Code * @apiUse Sign * * @apiSuccess {String} return_code Execution result * @apiSuccess {Double} wechat_rate Exchange rate for WeChat * @apiSuccess {Double} alipay_retail_rate Exchange rate for Alipay Retail Trade * @apiSuccess {Double} alipay_online_rate Exchange rate for Alipay Online Trade * * @apiUse GlobalError */ /** * @api {PUT} /api/v1.0/gateway/partners/{partner_code}/orders/{order_id} Create QR Code Payment * @apiName NewQRCode * @apiGroup QRCode * @apiVersion 1.0.0 * @apiDescription * QR Code Payment is used for webpage/application on PC. Customers use WeChat or Alipay app to scan QR Code generated when creating order and finish the payment.
*
* Return value contains QR Code string, QR Ccode image and payment page address. Partners can decide how to finish the payment. * If the currency is CNY, equivalent AUD amount shall never less than 0.01AUD, * otherwise user will get Invalid Amount Error from WeChat when making the payment. * @apiHeader Accept application/json * @apiHeader Content-Type application/json * @apiParam (PathVariable) {String} partner_code Required, Partner Code * @apiParam (PathVariable) {String} order_id Required, Partner order id. Shall be unique for the same partner. If repeated, order will be recognized as an existing order. * @apiUse Sign * @apiParam (JSON) {String} description Required, Description of an order. * @apiParam (JSON) {int} price Required, Price of the order. Use the base unit of the currency. * @apiParam (JSON) {String=AUD,CNY} currency=AUD Currency * @apiParam (JSON) {String=Alipay,Wechat} channel Payment channel, case sensitive * @apiParam (JSON) {String} notify_url System will call the notify url if provided when the payment succeeds * @apiParam (JSON) {String} operator Note for the operator who created this order. * * @apiSuccess {String} return_code Execution result * @apiSuccess {String} result_code SUCCESS means order created successfully, EXISTS means order has already existed. * @apiSuccess {String} channel Payment channel * @apiSuccess {String} partner_code Partner code * @apiSuccess {String} full_name Partner's full company name when registered * @apiSuccess {String} partner_name Partner's name * @apiSuccess {String} order_id Order id in RoyalPay, which is also WeChat order id. The final order id which is paid may be different from this one. * @apiSuccess {String} partner_order_id Partner order id * @apiSuccess {String} code_url QR Code string. Partners can create the payment QR Code according to this value. * @apiSuccess {String} qrcode_img QR Code image formatted in Base64. Can be used as the src attribute on img element * @apiSuccess {String} pay_url Payment page in RoyalPay * * @apiUse GlobalError * @apiError (ERROR_CODE) ORDER_MISMATCH Order is not belong to this partner. * @apiError (ERROR_CODE) ORDER_PAID Order has already been paid * */ /** * @api {GET} /api/v1.0/gateway/partners/{partner_code}/orders/{order_id}/pay QR Code Payment Page in RoyalPay * @apiName QRCodePay * @apiDescription * This page mush be called after payment order has been created. * When jumping back to redirection URL, it is recommended to call the order query API to make sure the payment has succeeded. * @apiVersion 1.0.0 * @apiGroup QRCode * @apiParam (PathVariable) {String} partner_code Required, Partner code * @apiParam (PathVariable) {String} order_id Required, Partner order id. It shall have already been created * @apiUse Sign * @apiParam (QueryParam) {String} redirect Required, Redirect url when payment succeeded. Contain sign parameters for validation. * * @apiUse GlobalError * @apiError (ERROR_CODE) ORDER_NOT_EXIST Order does not exist * @apiError (ERROR_CODE) ORDER_MISMATCH Order is not belong to this partner */ /** * @api {PUT} /api/v1.0/h5_payment/partners/{partner_code}/orders/{order_id} Create H5 Payment * @apiName NewMobileH5Pay * @apiGroup MobileH5 * @apiVersion 1.0.0 * @apiDescription * Warning:H5 Payment socket requires application separately and requires agreement from Tencent. Merchants who needs this socket please contact RoyalPay first. * Alipay has no limit at the moment.
* H5 Payment is used for payment in Webpage or App on mobile outside WeChat or Alipay App. The browser would redirect to a webpage from WeChat or Alipay and call the App to finish the payment.
* Return value contains a payment page. Partners shall guide users to redirect to this page. Sign params are required. * If the currency is CNY, equivalent AUD amount shall never less than 0.01AUD, * otherwise user will get Invalid Amount Error from WeChat when making the payment.
* * @apiHeader Accept application/json * @apiHeader Content-Type application/json * @apiParam (PathVariable) {String} partner_code Required, Partner code * @apiParam (PathVariable) {String} order_id Required, Partner order id * @apiUse Sign * @apiParam (JSON) {String} description Required, Order description * @apiParam (JSON) {int} price Required, Price of the order. Use the base unit of the currency. * @apiParam (JSON) {String=AUD,CNY} currency=AUD currency * @apiParam (JSON) {String=Alipay,Wechat} channel Payment channel, case sensitive * @apiParam (JSON) {String} notify_url System will call the notify url if provided when the payment succeeds * @apiParam (JSON) {String} operator Note for the operator who created this order. * * @apiSuccess {String} return_code Execution result * @apiSuccess {String} result_code SUCCESS means order created successfully, EXISTS means order has already existed. * @apiSuccess {String} partner_code Partner code * @apiSuccess {String} channel Payment channel * @apiSuccess {String} full_name Partner's full company name when registered * @apiSuccess {String} partner_name Partner's name * @apiSuccess {String} order_id Order id in RoyalPay, which is also WeChat order id. * @apiSuccess {String} partner_order_id Partner order id * @apiSuccess {String} pay_url Payment page in RoyalPay. * * @apiUse GlobalError * @apiError (ERROR_CODE) ORDER_MISMATCH Order is not belong to this partner * @apiError (ERROR_CODE) ORDER_PAID Order has already been paid * */ /** * @api {GET} /api/v1.0/h5_payment/partners/{partner_code}/orders/{order_id}/pay H5 Payment Page * @apiName MobileH5Pay * @apiDescription This page mush be called after payment order has been created. * When jumping back to redirection URL, it is recommended to call the order query API to make sure the payment has succeeded. * @apiVersion 1.0.0 * @apiGroup MobileH5 * @apiParam (PathVariable) {String} partner_code Required, Partner code * @apiParam (PathVariable) {String} order_id Required, Partner order id. It shall have already been created * @apiUse Sign * @apiParam (QueryParam) {String} redirect Required, Redirect url when payment succeeded. Contain sign parameters for validation. * * @apiUse GlobalError * @apiError (ERROR_CODE) ORDER_NOT_EXIST Order does not exist * @apiError (ERROR_CODE) ORDER_MISMATCH Order is not belong to this partner */ /** * @api {PUT} /api/v1.0/jsapi_gateway/partners/{partner_code}/orders/{order_id} Create JSAPI Payment Order * @apiName NewJSAPI * @apiGroup JSApi * @apiVersion 1.1.0 * @apiDescription * JSAPI Payment is used to pay in webpage which was opened in WeChat or Alipay App. If customers enter this page from WeChat Official Account, this Official Account is required to be authorized. * Customers will jump to RoyalPay order page and call WeChat or Alipay Payment Board to finish payment.
*
* Return value contains a payment page. Partners shall guide users to redirect to the page. Sign params is required when redirect happens. * If the currency is CNY, equivalent AUD amount shall never less than 0.01AUD, * otherwise user will get Invalid Amount Error from WeChat when making the payment. * @apiHeader Accept application/json * @apiHeader Content-Type application/json * @apiParam (PathVariable) {String} partner_code Required, Partner code * @apiParam (PathVariable) {String} order_id Required, Partner order id * @apiUse Sign * @apiParam (JSON) {String} description Required, Order description * @apiParam (JSON) {int} price Required, Price of the order. Use the base unit of the currency. * @apiParam (JSON) {String=AUD,CNY} currency=AUD currency * @apiParam (JSON) {String=Alipay,Wechat} channel Payment channel, case sensitive * @apiParam (JSON) {String} notify_url System will call the notify url if provided when the payment succeeds * @apiParam (JSON) {String} operator Note for the operator who created this order. * * @apiSuccess {String} return_code Execution result * @apiSuccess {String} result_code SUCCESS means order created successfully, EXISTS means order has already existed. * @apiSuccess {String} partner_code Partner code * @apiSuccess {String} channel Payment Channel * @apiSuccess {String} full_name Partner's full company name when registered * @apiSuccess {String} partner_name Partner's name * @apiSuccess {String} order_id Order id in RoyalPay, which is also WeChat order id. The final order id which is paid may be different from this one * @apiSuccess {String} partner_order_id Partner order id * @apiSuccess {String} pay_url Payment page in RoyalPay. Can only be accessed through WeChat * * @apiUse GlobalError * @apiError (ERROR_CODE) ORDER_MISMATCH Order is not belong to this partner * @apiError (ERROR_CODE) ORDER_PAID Order has already been paid * */ /** * @api {GET} /api/v1.0/wechat_jsapi_gateway/partners/{partner_code}_order_{order_id} WeChat JSAPI Payment Page in RoyalPay * @apiName WxJSAPIPay * @apiDescription This page must be called after Payment Order has been created. Actural url shall be according to pay_url param from order creation * @apiVersion 1.0.0 * @apiGroup JSApi * @apiParam (PathVariable) {String} partner_code Required, Partner code * @apiParam (PathVariable) {String} order_id Required, Partner order id. Must have already been created * @apiUse Sign * @apiParam (QueryParam) {String} redirect Required, Redirect url when the payment succeeded * @apiParam (QueryParam) {Boolean=true,false} directpay='false' whether open direct pay mode. * * @apiUse GlobalError * @apiError (ERROR_CODE) ORDER_NOT_EXIST Order does not exist * @apiError (ERROR_CODE) ORDER_MISMATCH Order is not belong to this partner */ /** * @api {GET} /api/v1.0/gateway/alipay/partners/{partner_code}/orders/{order_id}/app_pay Alipay JSAPI Payment Page in RoyalPay * @apiName AliJSAPIPay * @apiDescription This page must be called after Payment Order has been created. Actural url shall be according to pay_url param from order creation * @apiVersion 1.0.0 * @apiGroup JSApi * @apiParam (PathVariable) {String} partner_code Required, Partner code * @apiParam (PathVariable) {String} order_id Required, Partner order id. Must have already been created * @apiUse Sign * @apiParam (QueryParam) {String} redirect Required, Redirect url when the payment succeeded * @apiParam (QueryParam) {Boolean=true,false} directpay='false' whether open direct pay mode. * * @apiUse GlobalError * @apiError (ERROR_CODE) ORDER_NOT_EXIST Order does not exist * @apiError (ERROR_CODE) ORDER_MISMATCH Order is not belong to this partner */ /** * @api {PUT} /api/v1.0/micropay/partners/{partner_code}/orders/{order_id} Create Retail Passive Payment Order * @apiName RetailMicroPay * @apiDescription * Retail Passive Payment is used for cashier terminals which can scan BarCode or QRCode. * Shop staff input the payment amount and ask customers for their payment code, then system send price and payment code to server and finish the payment. * Retail Passive Payment now support both Alipay and WeChat
* * @apiVersion 1.0.2 * @apiGroup RetailPay * @apiParam (PathVariable) {String} partner_code Required, Partner code * @apiParam (PathVariable) {String} order_id Required, Partner order id * @apiUse Sign * @apiParam (JSON) {String} description Required, Order description * @apiParam (JSON) {int} price Required, Price of the order. Use the base unit of the currency. * @apiParam (JSON) {String=AUD,CNY} currency=AUD currency * @apiParam (JSON) {String} device_id Required, ID of the device which sends the request * @apiParam (JSON) {String} auth_code Required, The Payment QR Code scanned from customer's WeChat Wallet. * @apiParam (JSON) {String} notify_url System will call the notify url if provided when the payment succeeds. * * @apiSuccess {String} return_code Execution result * @apiSuccess {String} result_code Order status * * @apiSuccess {String} order_id Order id in RoyalPay, which is also WeChat order id. * @apiSuccess {String} partner_order_id Partner order id * @apiSuccess {int} total_fee Order amount, which uses the base unit of current currency * @apiSuccess {int} real_fee Actual paid amount.(The same as total fee at the moment. After coupon feature is finished, this may be different.) * @apiSuccess {String} pay_time Time when order is paid(yyyy-MM-dd HH:mm:ss, UTC+10) * @apiSuccess {String} create_time Time when order is created(according to the latest order)(yyyy-MM-dd HH:mm:ss, UTC+10) * @apiSuccess {String} currency Currency. Default value is AUD. * @apiSuccess {String} channel Currency. Channel. Alipay,Wechat,Bestpay. * * @apiUse GlobalError * @apiError (ERROR_CODE) ORDER_MISMATCH Order ID does not belongs to current partner. * @apiError (ERROR_CODE) ORDER_PAID Order has already been paid * @apiError (ERROR_CODE) AUTHCODEEXPIRE QR Code expired * @apiError (ERROR_CODE) NOTENOUGH The customer does not have enough balance to finish the payment * @apiError (ERROR_CODE) NOTSUPORTCARD Card type is not supported * @apiError (ERROR_CODE) AUTH_CODE_ERROR Payment QR Code has been used twice * @apiError (ERROR_CODE) AUTH_CODE_INVALID The submitted QR Code is not a WeChat Payment QR Code */ /** * @api {PUT} /api/v1.0/retail_qrcode/partners/{partner_code}/orders/{order_id} Create Retail Active Payment Order * @apiName RetailQRCode * @apiGroup RetailPay * @apiVersion 1.0.2 * @apiDescription * Retail Active Payment is used for cashier terminals which cannot scan Barcode or QRCode. * Get the Code url after create the order, convert this url to a QRCode and ask customers use their app to scan this QRCode then finish the payment. * Retail Active Payment now support Alipay, WeChat and Bestpay
*
* If the currency is CNY, equivalent AUD amount shall never less than 0.01AUD, * otherwise user will get Invalid Amount Error from WeChat when making the payment. * @apiHeader Accept application/json * @apiHeader Content-Type application/json * @apiParam (PathVariable) {String} partner_code Required, Partner Code * @apiParam (PathVariable) {String} order_id Required, Partner order id. Shall be unique for the same partner. If repeated, order will be recognized as an existed order. * @apiUse Sign * @apiParam (JSON) {String} description Required, Description of order. * @apiParam (JSON) {int} price Required, Price of the order. Use the base unit of the currency. * @apiParam (JSON) {String=AUD,CNY} currency=AUD Currency * @apiParam (JSON) {String} device_id Required, ID of the device which sends the request. * @apiParam (JSON) {String} notify_url System will call the notify url if provided when the payment succeeds * * @apiSuccess {String} return_code Execution result * @apiSuccess {String} result_code SUCCESS means order created successfully, EXISTS means order has already existed. * @apiSuccess {String} partner_code Partner code * @apiSuccess {String} full_name Partner's full company name when registered * @apiSuccess {String} partner_name Partner's name * @apiSuccess {String} order_id Order id in RoyalPay, which is also WeChat order id. The final order id which is paid may be different from this one * @apiSuccess {String} partner_order_id Partner order id * @apiSuccess {String} code_url QR Code string. Partners can create the payment QR Code according to this value. * * @apiUse GlobalError * @apiError (ERROR_CODE) ORDER_MISMATCH Order is not belong to this partner. * @apiError (ERROR_CODE) ORDER_PAID Order has already been paid */ /** * @api {GET} /api/v1.0/gateway/partners/{partner_code}/orders/{order_id} Query Order Status * @apiName OrderStatus * @apiGroup CommonApi * @apiVersion 1.0.1 * @apiDescription Including QR Code orders, JSAPI orders and Retail orders * @apiHeader Accept application/json * * @apiParam (PathVariable) {String} partner_code Required, Partner code * @apiParam (PathVariable) {String} order_id Required, Partner order id * @apiUse Sign * * @apiSuccess {String} return_code Execution result * @apiSuccess {String} result_code * * Use the same order id to call create order API can renew the order. PAYING, PAY_SUCCESS orders cannot be renewed. * @apiSuccess {String} order_id Order id in RoyalPay, which is also WeChat order id. The final order id which is paid may be different from this one * @apiSuccess {String} partner_order_id Partner order id * @apiSuccess {int} total_fee Order amount, which uses the base unit of current currency * @apiSuccess {int} real_fee Actual paid amount.(Equal to total fee at the moment. After coupon feature is finished, this value may be different. ) * @apiSuccess {Double} rate Exchange Rate used while trading. 1AUD=?CNY * @apiSuccess {String} pay_time Time when order is paid(yyyy-MM-dd HH:mm:ss, UTC+10) * @apiSuccess {String} create_time Time when order is created(according to the latest order)(yyyy-MM-dd HH:mm:ss, UTC+10) * @apiSuccess {String} currency Currency. Default value is AUD. * @apiSuccess {String} channel Channel. Alipay,Wechat,Bestpay. * * @apiUse GlobalError * @apiError (ERROR_CODE) ORDER_NOT_EXIST Order does not exist * @apiError (ERROR_CODE) ORDER_MISMATCH Order is not belong to this partner * */ /** * @api {PUT} /api/v1.0/gateway/partners/{partner_code}/orders/{order_id}/refunds/{refund_id} Apply for Refund * @apiName RefundOrder * @apiGroup CommonApi * @apiVersion 1.0.0 * @apiHeader Accept application/json * @apiHeader Content-Type application/json * @apiDescription * One payment order can create more than one refund orders. Total amount of all refund orders must be less than or equal to the actual paid amount and the currency of refund order is the same as the payment order. * @apiParam (PathVariable) {String} partner_code Required, Partner code * @apiParam (PathVariable) {String} order_id Required, Partner payment order id * @apiParam (PathVariable) {String} refund_id Required, Partner refund order id * @apiUse Sign * @apiParam (JSON) {int} fee Required, Refund amount. Use base unit of the currency. Total amount of all refund orders must be less than actual paid amount. * * @apiSuccess {String} return_code Execution result * @apiSuccess {String} result_code * * @apiSuccess {String} refund_id RoyalPay Refund id * @apiSuccess {String} partner_refund_id Partner refund id * @apiSuccess {int} amount Refund amount * @apiSuccess {String} currency Refund currency * * @apiUse GlobalError * @apiError (ERROR_CODE) ORDER_NOT_EXIST Payment order does not exist * @apiError (ERROR_CODE) ORDER_MISMATCH Payment order is not belong to this partner * @apiError (ERROR_CODE) ORDER_NOT_PAID Payment order is not paid */ /** * @api {GET} /api/v1.0/gateway/partners/{partner_code}/orders/{order_id}/refunds/{refund_id} Query Refund Order Status * @apiName RefundQuery * @apiGroup CommonApi * @apiVersion 1.0.0 * @apiHeader Accept application/json * @apiHeader Content-Type application/json * * @apiParam (PathVariable) {String} partner_code Required, Partner code * @apiParam (PathVariable) {String} order_id Required, Partner payment order id * @apiParam (PathVariable) {String} refund_id Required, Partner refund order id * @apiUse Sign * * @apiSuccess {String} return_code Execution result * @apiSuccess {String} result_code * * @apiSuccess {String} refund_id RoyalPay Refund id * @apiSuccess {String} partner_refund_id Partner refund id * @apiSuccess {int} amount refund Amount * @apiSuccess {String} currency Refund currency * * @apiUse GlobalError * @apiError (ERROR_CODE) ORDER_NOT_EXIST Payment order does not exist * @apiError (ERROR_CODE) ORDER_MISMATCH Payment order is not belong to this partner * @apiError (ERROR_CODE) ORDER_NOT_PAID Payment order is not paid * @apiError (ERROR_CODE) REFUND_NOT_EXIST Refund order does not exist * @apiError (ERROR_CODE) REFUND_MISMATCH Refund order is not belong to this payment order */ /** * @api {GET} /api/v1.0/gateway/partners/{partner_code}/orders Check Orders * @apiName ListOrder * @apiGroup CommonApi * @apiVersion 1.0.0 * @apiDescription * Get a list of orders. This api may change in the future. * @apiHeader Accept application/json * @apiHeader Content-Type application/json * @apiParam (PathVariable) {String} partner_code Required, Partner code * @apiUse Sign * @apiParam (QueryParam) {String} date Payment order creation date,which is formatted in 'yyyyMMdd' ,UTC+10. Query all orders if not provided * @apiParam (QueryParam) {String='ALL','PAID','REFUNDED'} status='ALL' * Order status * * @apiParam (QueryParam) {int} page=1 Page number. start with 1 * @apiParam (QueryParam) {int} limit=10 Rows per page * * @apiSuccess (ROOT) {String} return_code Execution result * @apiSuccess (ROOT) {JSON[]} data Orders list * @apiSuccess (ROOT) {JSON} pagination Pagination information * @apiSuccess (ROOT) {JSON} analysis Payment analysis * * @apiSuccess (data) {String} order_id RoyalPay Order ID * @apiSuccess (data) {String} partner_order_id Partner Order ID * @apiSuccess (data) {int} total_fee Order amount * @apiSuccess (data) {int} real_fee Actual paid amount * @apiSuccess (data) {String} payment via channel: Alipay, Bestpay, Wechat * @apiSuccess (data) {String} currency Currency * @apiSuccess (data) {String} create_time Time when order is created, which is formatted in 'yyyy-MM-dd HH:mm:ss', UTC+10 * @apiSuccess (data) {String} pay_time Time when order is paid, which is formatted in 'yyyy-MM-dd HH:mm:ss', UTC+10. will be null if not paid * @apiSuccess (data) {String} status * order status * * @apiSuccess (data) {String} order_body Order description * @apiSuccess (data) {String} gateway * * @apiSuccess (data) {String} partner_code Partner code * @apiSuccess (data) {String} partner_name Partner name * @apiSuccess (data) {String} refund_fee Total refund amount of this order * * @apiSuccess (pagination) {int} page Page number,start with 1 * @apiSuccess (pagination) {int} limit Rows per page * @apiSuccess (pagination) {int} totalCount Total rows * @apiSuccess (pagination) {int} totalPages Total pages * * @apiSuccess (analysis) {int} order_count Order count of successful payment (including orders which have refunds) * @apiSuccess (analysis) {int} total_fee Total amount * @apiSuccess (analysis) {int} real_fee Actual paid amount * * @apiUse GlobalError */ /** * @api {GET} /api/v1.0/gateway/partners/{partner_code}/transactions Query Daily Transactions * @apiName ListTransaction * @apiGroup CommonApi * @apiVersion 1.0.0 * @apiDescription This Api will list all transactions for current merchant in the day, * containing all payment methods(include no gateway methods) and all payment channels such as * payment, RoyalPay discount cashback, refunds, credit for failure refunds, system pay back, * cashback account income/outcome, etc. Settlement transactions will not be contained.
* Notice: A payment order or refund order can contains several transaction records * @apiHeader Accept application/json * @apiHeader Content-Type application/json * @apiParam (PathVariable) {String} partner_code Required, Partner code * @apiUse Sign * @apiParam (QueryParam) {String} date Required, Transaction date. Format as 'yyyyMMdd',GMT+10 * * @apiSuccess (ROOT) {String} return_code Execution result,SUCCESS * @apiSuccess (ROOT) {String} result_code Process result * @apiSuccess (ROOT) {int} transaction_count transaction record count * @apiSuccess (ROOT) {int} order_count payment order count * @apiSuccess (ROOT) {int} refund_count refund order count * @apiSuccess (ROOT) {JSON[]} transactions transaction list * * @apiSuccess (transactions) {String} transaction_time Trade time, format as yyyyMMddHHmmss,GMT+10 * @apiSuccess (transactions) {String} order_id RoyalPay Order ID * @apiSuccess (transactions) {String} partner_order_id Partner Order ID * @apiSuccess (transactions) {String} channel_order_id Order ID in payment channel (Alipay/Bestpay/Wechat) * @apiSuccess (transactions) {String} refund_id RoyalPay Refund ID (Only in refunds or refunds failure cashback) * @apiSuccess (transactions) {String} partner_refund_id Partner refund ID (Only in refunds or refunds failure cashback) * @apiSuccess (transactions) {String} gateway Payment method * * @apiSuccess (transactions) {String} channel Payment Channel (Alipay, Wechat, Bestpay) * @apiSuccess (transactions) {String} type Trade Direction * * @apiSuccess (transactions) {String} currency currency(AUD/CNY) * @apiSuccess (transactions) {int} total_amount Total payment amount, which uses the base unit of order currency * @apiSuccess (transactions) {int} input_amount Order input amount, which uses the base unit of order currency * @apiSuccess (transactions) {int} settle_amount Settle amount, AUD cents * @apiSuccess (transactions) {double} exchange_rate Using exchange rate * @apiSuccess (transactions) {String} remark Remark * * @apiUse GlobalError */ /** * @api {GET} /api/v1.0/gateway/partners/{partner_code}/transactions Query Settlement Details * @apiName SettleLog * @apiGroup CommonApi * @apiVersion 1.0.0 * @apiDescription This Api will list all transactions with the settlement this day, * containing all payment methods(include no gateway methods) and all payment channels such as * payment, RoyalPay discount cashback, refunds, credit for failure refunds, system pay back, * cashback account income/outcome, etc.
* Notice: A payment order or refund order can contains several transaction records * @apiHeader Accept application/json * @apiHeader Content-Type application/json * @apiParam (PathVariable) {String} partner_code Required, Partner code * @apiUse Sign * @apiParam (QueryParam) {String} date Required, Transaction date. Format as 'yyyyMMdd',GMT+10 * * @apiSuccess (ROOT) {String} return_code Execution result,SUCCESS * @apiSuccess (ROOT) {String} result_code Process result * @apiSuccess (ROOT) {String} settle_from Transaction date from,yyyyMMdd * @apiSuccess (ROOT) {String} settle_to Transaction date to, yyyyMMdd * @apiSuccess (ROOT) {String} settle_days Settle delay(T+n) * @apiSuccess (ROOT) {int} transaction_count transaction record count * @apiSuccess (ROOT) {int} order_count payment order count * @apiSuccess (ROOT) {int} refund_count refund order count * @apiSuccess (ROOT) {int} total_credit Total credit amount (AUD cent) * @apiSuccess (ROOT) {int} total_debit Total debit amount (AUD cent) * @apiSuccess (ROOT) {int} total_surcharge Total surcharge amount(AUD cent) * @apiSuccess (ROOT) {int} total_transfer Total amount sending to merchant's bank account(AUD cent) * @apiSuccess (ROOT) {JSON[]} transactions transaction list * * @apiSuccess (transactions) {String} transaction_time Trade time, format as yyyyMMddHHmmss,GMT+10 * @apiSuccess (transactions) {String} order_id RoyalPay Order ID * @apiSuccess (transactions) {String} partner_order_id Partner Order ID * @apiSuccess (transactions) {String} channel_order_id Order ID in payment channel (Alipay/Bestpay/Wechat) * @apiSuccess (transactions) {String} refund_id RoyalPay Refund ID (Only in refunds or refunds failure cashback) * @apiSuccess (transactions) {String} partner_refund_id Partner refund ID (Only in refunds or refunds failure cashback) * @apiSuccess (transactions) {String} gateway Payment method * * @apiSuccess (transactions) {String} channel Payment Channel (Alipay, Wechat, Bestpay) * @apiSuccess (transactions) {String} type Trade Direction * * @apiSuccess (transactions) {String} currency currency(AUD/CNY) * @apiSuccess (transactions) {int} total_amount Total payment amount, which uses the base unit of order currency * @apiSuccess (transactions) {int} input_amount Order input amount, which uses the base unit of order currency * @apiSuccess (transactions) {int} settle_amount Amount to make settlement, AUD cents * @apiSuccess (transactions) {String} surcharge_rate Rate of surcharge (x%) * @apiSuccess (transactions) {int} surcharge Surcharge amount, AUD cents * @apiSuccess (transactions) {int} transfer_amount Amount send to merchant's bank account, AUD cents * @apiSuccess (transactions) {double} exchange_rate Using exchange rate * @apiSuccess (transactions) {String} remark Remark * * @apiUse GlobalError */ /** * @api {POST} /notify_url Payment Success Notice * @apiName PayNotice * @apiGroup API * @apiVersion 1.0.0 * @apiDescription * If notify_url is provided when order is created. System will post request to this url when the payment succeeds. Request method is POST. * Different from Server APIs, sign parameters will be included in json entity. Partner system shall valid them to prevent fake requests. * Partner system shall response with correct parameters. If RoyalPay did not receive valid response, system will regard as receiving failed and retry the notification. * System will retry up to3 times. Partner system shall be able to handle the repeated requests. * @apiHeader Accept application/json * @apiHeader Content-Type application/json * @apiParam (JSON) {long} time UTC timestamp in millis * @apiParam (JSON) {String} nonce_str Random string * @apiParam (JSON) {String} sign Sign * @apiParam (JSON) {String} partner_order_id Partner order id * @apiParam (JSON) {String} order_id RoyalPay order id * @apiParam (JSON) {int} total_fee Order amount * @apiParam (JSON) {int} real_fee Actual paid amount * @apiParam (JSON) {Double} rate Exchange Rate used while trading. 1AUD=?CNY * @apiParam (JSON) {String} currency Currency,AUD * @apiParam (JSON) {String} channel Payment Channel Alipay、Wechat、Bestpay * @apiParam (JSON) {String} create_time Time when order is created, which is formatted in 'yyyy-MM-dd HH:mm:ss', UTC+10 * @apiParam (JSON) {String} pay_time Time when order is paid, which is formatted in 'yyyy-MM-dd HH:mm:ss', UTC+10. * * @apiSuccess {String} return_code SUCCESS */ /** * @api {PUT} /api/v1.0/jd_gateway/partners/{partner_code}/orders/{order_id} Create JD Payment Order * @apiName JDPAY * @apiDescription * Use for JD Payment in PC Website. After create order, jump to the pay_url returned and attach sign params and redirect param. * Then enter JD Pay page to finish payment.
* JD Channel Only.
* * @apiVersion 1.0.0 * @apiGroup JD_Online_Payment * @apiHeader Accept application/json * @apiHeader Content-Type application/json * @apiParam (PathVariable) {String} partner_code Required, Partner code * @apiParam (PathVariable) {String} order_id Required, Partner order id * @apiUse Sign * @apiParam (JSON) {String} description Required, Order description * @apiParam (JSON) {String} user_id Required,Only account number of the user on the merchant platform * @apiParam (JSON) {String} mobile Required,Mobile phone * @apiParam (JSON) {int} price Required, Price of the order. Use the base unit of the currency (cent). * @apiParam (JSON) {String=AUD,CNY} currency=AUD Currency * @apiParam (JSON) {String} notify_url System will call the notify url if provided when the payment succeeds * @apiParam (JSON) {String} operator Note for the operator who created this order. * * @apiSuccess {String} return_code Execution result * @apiSuccess {String} result_code SUCCESS means order created successfully, EXISTS means order has already existed. * @apiSuccess {String} partner_code Partner code * @apiSuccess {String} full_name Partner's full company name when registered * @apiSuccess {String} partner_name Partner's name * @apiSuccess {String} order_id Order id in RoyalPay, which is also WeChat order id. The final order id which is paid may be different from this one * @apiSuccess {String} partner_order_id Partner order id * @apiSuccess {String} pay_url Payment page in RoyalPay. Can only be accessed through WeChat * * @apiUse GlobalError * @apiError (ERROR_CODE) ORDER_MISMATCH Order is not belong to this partner * @apiError (ERROR_CODE) ORDER_PAID Order has already been paid * */ /** * @api {PUT} /api/v1.0/gateway/partners/{partner_code}/microapp_orders/{order_id} Create Miniprogram Order * @apiName microapp * @apiDescription Use for wechat Payment in miniprogram. After create order, returned and redirect param. * wechat Channel Only.
*
* MiniProgram_WechatPay doc * * @apiVersion 1.0.0 * @apiGroup Miniprogram_Payment * @apiHeader Accept application/json * @apiHeader Content-Type application/json * @apiParam (PathVariable) {String} partner_code Required, Partner code * @apiParam (PathVariable) {String} order_id Required, Partner order id * @apiUse Sign * @apiParam (JSON) {String} description Required, Order description * @apiParam (JSON) {int} price Required, Price of the order. Use the base unit of the currency. * @apiParam (JSON) {String=AUD,CNY} currency=AUD Currency * @apiParam (JSON) {String} notify_url System will call the notify url if provided when the payment succeeds * @apiParam (JSON) {String} operator Note for the operator who created this order. * @apiParam (JSON) {String} appid wechat app app_id * @apiParam (JSON) {String} customer_id wechat app open_id * * @apiSuccess {String} return_code Execution result * @apiSuccess {String} result_code SUCCESS means order created successfully, EXISTS means order has already existed. * @apiSuccess {String} partner_code Partner code * @apiSuccess {String} full_name Partner's full company name when registered * @apiSuccess {String} partner_name Partner's name * @apiSuccess {String} order_id Order id in RoyalPay, which is also WeChat order id. The final order id which is paid may be different from this one * @apiSuccess {String} partner_order_id Partner order id * @apiSuccess {String} pay_url Payment page in RoyalPay. Can only be accessed through WeChat * @apiSuccess {String} sdk_params The required parameters for payment.(Json String) * * @apiUse GlobalError * @apiError (ERROR_CODE) ORDER_MISMATCH Order is not belong to this partner * @apiError (ERROR_CODE) ORDER_PAID Order has already been paid * */ /** * @api {PUT} /api/v1.0/alipay/partners/{partner_code}/orders/{order_id} Create Alipay Online Order * @apiName AlipayOnline * @apiDescription * Use for Alipay Payment in PC Website. After create order, jump to the pay_url returned and attach sign params and redirect param. * Then enter Alipay page to finish payment.
* Alipay Channel Only.
* * @apiVersion 1.0.0 * @apiGroup Alipay_Online_Payment * @apiHeader Accept application/json * @apiHeader Content-Type application/json * @apiParam (PathVariable) {String} partner_code Required, Partner code * @apiParam (PathVariable) {String} order_id Required, Partner order id * @apiUse Sign * @apiParam (JSON) {String} description Required, Order description * @apiParam (JSON) {int} price Required, Price of the order. Use the base unit of the currency. * @apiParam (JSON) {String=AUD,CNY} currency=AUD Currency * @apiParam (JSON) {String} notify_url System will call the notify url if provided when the payment succeeds * @apiParam (JSON) {String} operator Note for the operator who created this order. * * @apiSuccess {String} return_code Execution result * @apiSuccess {String} result_code SUCCESS means order created successfully, EXISTS means order has already existed. * @apiSuccess {String} partner_code Partner code * @apiSuccess {String} full_name Partner's full company name when registered * @apiSuccess {String} partner_name Partner's name * @apiSuccess {String} order_id Order id in RoyalPay, which is also WeChat order id. The final order id which is paid may be different from this one * @apiSuccess {String} partner_order_id Partner order id * @apiSuccess {String} pay_url Payment page in RoyalPay. Can only be accessed through WeChat * * @apiUse GlobalError * @apiError (ERROR_CODE) ORDER_MISMATCH Order is not belong to this partner * @apiError (ERROR_CODE) ORDER_PAID Order has already been paid * */ /** * @api {PUT} /api/v1.0/alipay/partners/{partner_code}/app_orders/{order_id} 创建支付宝SDK订单 * @apiName AlipaySDK * @apiDescription * Used for mobile Apps calling Alipay payment with Alipay SDK. Call this api to create order and get param string for SDK calling. Call SDK api with the param to start payment and get payment result from Alipay app * It is strongly advised to request RoyalPay order query Api to confirm that the order has been paid in order to cancelling order by system at the same time.
*
* More information for integration with Alipay: Alipay SDK Document
* SDK for Android
* SDK for iOS * @apiVersion 1.0.0 * @apiGroup SDKPayment * @apiHeader Accept application/json * @apiHeader Content-Type application/json * @apiParam (PathVariable) {String} partner_code Required, Partner code * @apiParam (PathVariable) {String} order_id Required, Partner order id * @apiUse Sign * @apiParam (JSON) {String} description Required, Order description * @apiParam (JSON) {int} price Required, Price of the order. Use the base unit of the currency. * @apiParam (JSON) {String=AUD,CNY} currency=AUD Currency * @apiParam (JSON) {String} notify_url System will call the notify url if provided when the payment succeeds * @apiParam (JSON) {String} operator Note for the operator who created this order. * @apiParam (JSON) {String=android,iphone,ipad} system os type of client app, optional * @apiParam (JSON) {String} version client app version, optional * * @apiSuccess {String} return_code Execution result * @apiSuccess {String} result_code SUCCESS means order created successfully, EXISTS means order has already existed. * @apiSuccess {String} partner_code Partner code * @apiSuccess {String} full_name Partner's full company name when registered * @apiSuccess {String} partner_name Partner's name * @apiSuccess {String} order_id Order id in RoyalPay, which is also WeChat order id. The final order id which is paid may be different from this one * @apiSuccess {String} partner_order_id Partner order id * @apiSuccess {String} sdk_params param string for calling SDK * * @apiUse GlobalError * @apiError (ERROR_CODE) ORDER_MISMATCH Order is not belong to this partner * @apiError (ERROR_CODE) ORDER_PAID Order has already been paid * */ /** * @api {PUT} /api/v1.0/gateway/partners/{partner_code}/app_orders/{order_id} Create Wechat SDK Order * @apiName WechatSDK * @apiDescription * Used for mobile Apps calling Wechat payment with Wechat SDK. Call this api to create order and get param string for SDK calling. Call SDK api with the param to start payment and get payment result from Wechat app * It is strongly advised to request RoyalPay order query Api to confirm that the order has been paid in order to cancelling order by system at the same time.
*
* @apiVersion 1.0.0 * @apiGroup SDKPayment * @apiHeader Accept application/json * @apiHeader Content-Type application/json * @apiParam (PathVariable) {String} partner_code Required, Partner code * @apiParam (PathVariable) {String} order_id Required, Partner order id * @apiUse Sign * @apiParam (JSON) {String} description Required, Order description * @apiParam (JSON) {int} price Required, Price of the order. Use the base unit of the currency. * @apiParam (JSON) {String=AUD,CNY} currency=AUD Currency * @apiParam (JSON) {String} notify_url System will call the notify url if provided when the payment succeeds * @apiParam (JSON) {String} operator Note for the operator who created this order. * @apiParam (JSON) {String=android,iphone,ipad} system os type of client app, optional * @apiParam (JSON) {String} version client app version, optional * @apiParam (JSON) {String} appid wechat appid * * @apiSuccess {String} return_code Execution result * @apiSuccess {String} result_code SUCCESS means order created successfully, EXISTS means order has already existed. * @apiSuccess {String} partner_code Partner code * @apiSuccess {String} full_name Partner's full company name when registered * @apiSuccess {String} partner_name Partner's name * @apiSuccess {String} order_id Order id in RoyalPay, which is also WeChat order id. The final order id which is paid may be different from this one * @apiSuccess {String} partner_order_id Partner order id * @apiSuccess {String} sdk_params param string for calling SDK * * @apiUse GlobalError * @apiError (ERROR_CODE) ORDER_MISMATCH Order is not belong to this partner * @apiError (ERROR_CODE) ORDER_PAID Order has already been paid * */ function apis() { }