     ///     - userToken: user token
     ///     - onSuccess: success callback
     ///     - onError: fail callback with APIError
-    public func updateTransactionWithCoupon(_ transactionId: String, userToken:  String, onSuccess: @escaping (_ transaction: TransactionData) -> Void,
-        onError: @escaping ErrorHandler) {
+    public func updateTransactionWithCoupon(_ transactionId: String, userToken: String, onSuccess: @escaping (_ transaction: TransactionData) -> Void, onError: @escaping ErrorHandler) {
+        
+        let builder = URLBuilder(client: client)
+            .setPath("shop/\(transactionId)")
+            .addParameter(key: "usertoken", value: userToken)
+        
+        guard let requestURL = try? builder.build() else {
+            return onError(APIError.getDefaultError())
+        }
  
-        let url = URLBuilder(client: client)
-            .setPath("shop/\(transactionId)")
-            .addParameter(key: "usertoken", value: userToken)
-            .build()
- 
-        client.restClient.GET(url: url, onSuccess: { (response) in
-             guard let transaction = JSONDecoder().decodeDict(of:  TransactionData.self, from: response) else {
+        client.restClient.GET(request: requestURL, onSuccess: { (response) in
+             guard let transaction = JSONDecoder().decodeDict(of: TransactionData.self, from: response) else {
                     onError(APIError.getDefaultError())
                     return
              }

    ///   - onSuccess: success callback
    ///   - onError: fail callback
    public func applyCouponToPayment(transactionId: String, code: String, userToken: String, onSuccess: @escaping () -> Void, onError: @escaping ErrorHandler) {
        let url = URLBuilder(client: client)
            .setPath("shop/\(transactionId)/coupon")
            .addParameter(key: "usertoken", value: userToken)
            .build()

        let params = ["code": code]

        client.restClient.POST(url: url, parameters: params, onSuccess: { (_) in
            onSuccess()
        }, onError: onError)
    }

    public func removeCouponToPayment(transactionId: String, userToken: String, onSuccess: @escaping () -> Void, onError: @escaping ErrorHandler) {
        let url = URLBuilder(client: client)
            .setPath("shop/\(transactionId)/coupon")
            .addParameter(key: "usertoken", value: userToken)
            .build()

        client.restClient.DELETE(url: url,  parameters: [:], onSuccess: { (_) in
            onSuccess()
        }, onError: onError)
    }

        }, onError: onError)
    }

    /// Apply coupom in transaction
    ///
    /// - Parameters:
