{"swagger":"2.0","info":{"description":"Klix Merchants API V2 release-1.55.54\nbuild from commit: 778c587\ncommit time: 2020-12-05T12:01+0000\nbuild time: 2020-12-05T13:16+0000","version":"2","title":"Klix Merchants API V2","contact":{"name":"Klix","url":"https://klx.app","email":"info@klix.app"}},"host":"api.stage.klix.app","basePath":"/","tags":[{"name":"Merchant orders","description":"Merchant Order Controller"},{"name":"Merchant transactions","description":"Merchant Transaction Controller"}],"paths":{"/v2/merchants/{merchantId}/orders":{"post":{"tags":["Merchant orders"],"summary":"createOrder","operationId":"createOrderUsingPOST_1","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"merchantId","in":"path","description":"merchantId","required":true,"type":"string","format":"uuid"},{"in":"body","name":"request","description":"request","required":true,"schema":{"$ref":"#/definitions/CreateMerchantOrderRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/MerchantOrder"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/ErrorResponseModel"}}},"deprecated":false}},"/v2/merchants/{merchantId}/orders/{orderId}":{"get":{"tags":["Merchant orders"],"summary":"getOrder","operationId":"getOrderUsingGET_3","produces":["application/json"],"parameters":[{"name":"merchantId","in":"path","description":"merchantId","required":true,"type":"string","format":"uuid"},{"name":"orderId","in":"path","description":"orderId","required":true,"type":"string"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/MerchantOrder"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/ErrorResponseModel"}}},"deprecated":false}},"/v2/merchants/{merchantId}/orders/{orderId}/recurring-payment":{"post":{"tags":["Merchant orders"],"summary":"Recurring payment","operationId":"recurring_1","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"merchantId","in":"path","description":"merchantId","required":true,"type":"string","format":"uuid"},{"name":"orderId","in":"path","description":"orderId","required":true,"type":"string"},{"in":"body","name":"request","description":"request","required":true,"schema":{"$ref":"#/definitions/ChargeRecurringPaymentRequest"}}],"responses":{"200":{"description":"OK"},"400":{"description":"Error","schema":{"$ref":"#/definitions/ErrorResponseModel"}},"403":{"description":"Payment request was blocked","schema":{"$ref":"#/definitions/ErrorResponseModel"}},"404":{"description":"Order not found","schema":{"$ref":"#/definitions/ErrorResponseModel"}},"410":{"description":"Recurring contract expired","schema":{"$ref":"#/definitions/ErrorResponseModel"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/ErrorResponseModel"}}},"deprecated":false}},"/v2/merchants/{merchantId}/orders/{orderId}/refunds":{"post":{"tags":["Merchant orders"],"summary":"refundOrderTransaction","operationId":"refundOrderTransactionUsingPOST_1","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"merchantId","in":"path","description":"merchantId","required":true,"type":"string","format":"uuid"},{"name":"orderId","in":"path","description":"orderId","required":true,"type":"string"},{"in":"body","name":"refundOrderRequest","description":"refundOrderRequest","required":true,"schema":{"$ref":"#/definitions/RefundOrderRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/RefundOrderResponse"}},"400":{"description":"Validation Error","schema":{"$ref":"#/definitions/ErrorResponseModel"}},"403":{"description":"Unauthorized","schema":{"$ref":"#/definitions/ErrorResponseModel"}},"404":{"description":"Not found","schema":{"$ref":"#/definitions/ErrorResponseModel"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/ErrorResponseModel"}}},"deprecated":false}},"/v2/merchants/{merchantId}/refunds":{"post":{"tags":["Merchant transactions"],"summary":"refundTransactionByParams","operationId":"refundTransactionByParamsUsingPOST_1","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"merchantId","in":"path","description":"merchantId","required":true,"type":"string","format":"uuid"},{"name":"reportParams","in":"query","description":"reportParams","required":true,"items":{"type":"object","additionalProperties":{"type":"string"}}},{"in":"body","name":"request","description":"request","required":true,"schema":{"$ref":"#/definitions/RefundRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/RefundTransactionResponse"}},"400":{"description":"Validation Error","schema":{"$ref":"#/definitions/ErrorResponseModel"}},"403":{"description":"Unauthorized","schema":{"$ref":"#/definitions/ErrorResponseModel"}},"404":{"description":"Not found","schema":{"$ref":"#/definitions/ErrorResponseModel"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/ErrorResponseModel"}}},"deprecated":false}},"/v2/merchants/{merchantId}/transactions":{"get":{"tags":["Merchant transactions"],"summary":"getTransactionsByDateTime","operationId":"getTransactionsByDateTimeUsingGET_1","produces":["application/json"],"parameters":[{"name":"from","in":"query","description":"from","required":false,"type":"string","default":"2015-01-01 00:00:00 001","format":"date-time"},{"name":"limit","in":"query","description":"limit","required":false,"type":"integer","format":"int32"},{"name":"merchantId","in":"path","description":"merchantId","required":true,"type":"string","format":"uuid"},{"name":"to","in":"query","description":"to","required":false,"type":"string","format":"date-time"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/TransactionHistoryResponse"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/ErrorResponseModel"}}},"deprecated":false}},"/v2/merchants/{merchantId}/transactions/{transactionId}/refunds":{"post":{"tags":["Merchant transactions"],"summary":"refundTransaction","operationId":"refundTransactionUsingPOST_1","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"merchantId","in":"path","description":"merchantId","required":true,"type":"string","format":"uuid"},{"in":"body","name":"request","description":"request","required":true,"schema":{"$ref":"#/definitions/RefundRequest"}},{"name":"transactionId","in":"path","description":"transactionId","required":true,"type":"string","format":"uuid"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/RefundTransactionResponse"}},"400":{"description":"Validation Error","schema":{"$ref":"#/definitions/ErrorResponseModel"}},"403":{"description":"Unauthorized","schema":{"$ref":"#/definitions/ErrorResponseModel"}},"404":{"description":"Not found","schema":{"$ref":"#/definitions/ErrorResponseModel"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/ErrorResponseModel"}}},"deprecated":false}}},"definitions":{"Address":{"type":"object","properties":{"city":{"type":"string"},"country":{"type":"string"},"latitude":{"type":"number","format":"double"},"longitude":{"type":"number","format":"double"},"postal_code":{"type":"string"},"street":{"type":"string"}},"title":"Address"},"Card":{"type":"object","properties":{"bin":{"type":"string"},"network":{"type":"string"}},"title":"Card"},"ChargeRecurringPaymentRequest":{"type":"object","properties":{"amount":{"type":"number"},"currency":{"type":"string"},"description":{"type":"string"}},"title":"ChargeRecurringPaymentRequest"},"Company":{"type":"object","properties":{"address":{"type":"string"},"name":{"type":"string"},"registration_number":{"type":"string"},"vat_number":{"type":"string"}},"title":"Company"},"ConsumerCredit":{"type":"object","properties":{"agreementNumber":{"type":"string"},"financingInstitution":{"$ref":"#/definitions/FinancingInstitution"}},"title":"ConsumerCredit"},"CreateMerchantOrderItemRequest":{"type":"object","properties":{"amount":{"type":"number"},"count":{"type":"number"},"label":{"type":"string"},"orderItemId":{"type":"string"},"unit":{"type":"string","enum":["PIECE","KILOGRAM","METER","LITRE","HOUR"]}},"title":"CreateMerchantOrderItemRequest"},"CreateMerchantOrderRequest":{"type":"object","properties":{"backToMerchantUrl":{"type":"string"},"currency":{"type":"string"},"items":{"type":"array","items":{"$ref":"#/definitions/CreateMerchantOrderItemRequest"}},"language":{"type":"string"},"orderId":{"type":"string"},"successRedirectUrl":{"type":"string"}},"title":"CreateMerchantOrderRequest"},"Customer":{"type":"object","properties":{"email":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"phone_number":{"type":"string"}},"title":"Customer"},"ErrorModel":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"title":"ErrorModel"},"ErrorResponseModel":{"type":"object","properties":{"errorCode":{"type":"string","enum":["INTERNAL_ERROR","VALIDATION_FAILURE","DATA_CONSTRAINT","PROCESSING_ERROR","CLIENT_ERROR","FORBIDDEN","BAD_REQUEST","OTP_MAX_ATTEMPTS_REACHED","OTP_TIMEOUT","WRONG_PIN_LAST_ATTEMPT","WRONG_PIN_MULTIPLE_ATTEMPTS_LEFT","WRONG_DEVICE","EMAIL_MAX_ATTEMPTS_REACHED","EMAIL_TIMEOUT","PAYMENT_REQUEST_BLOCKED","PAYMENT_REQUEST_EXPIRED","RECURRING_CONTRACT_EXPIRED","DEVICE_NOT_SAFE","AUTOFILL_EXPIRED","ORDER_NOT_FOUND","INVALID_API_KEY","INVALID_SIGNATURE","ORDER_ALREADY_PROCESSED","MERCHANT_NOT_FOUND","NO_ACTIVE_API_KEY","ORDER_EXPIRED","UNSUPPORTED_ORDER_AUTHORIZATION_TYPE","PAYMENT_METHOD_NOT_AVAILABLE"]},"errorId":{"type":"string"},"errors":{"type":"array","items":{"$ref":"#/definitions/ErrorModel"}},"timestamp":{"type":"string","format":"date-time"}},"title":"ErrorResponseModel"},"FinancingInstitution":{"type":"object","properties":{"code":{"type":"string"},"name":{"type":"string"}},"title":"FinancingInstitution"},"MerchantOrder":{"type":"object","properties":{"amount":{"type":"number"},"checkout_url":{"type":"string"},"company":{"$ref":"#/definitions/Company"},"currency":{"type":"string"},"customer":{"$ref":"#/definitions/Customer"},"effective_amount":{"type":"number"},"id":{"type":"string","format":"uuid"},"items":{"type":"array","items":{"$ref":"#/definitions/OrderItem"}},"merchant_urls":{"$ref":"#/definitions/MerchantUrls"},"order_id":{"type":"string"},"payment":{"$ref":"#/definitions/Payment"},"shipping":{"$ref":"#/definitions/Shipment"},"status":{"type":"string"},"tax_amount":{"type":"number"},"total_amount":{"type":"number"}},"title":"MerchantOrder"},"MerchantShippingMethod":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"title":"MerchantShippingMethod"},"MerchantUrls":{"type":"object","properties":{"confirmation":{"type":"string"},"place_order":{"type":"string"},"terms":{"type":"string"},"verification":{"type":"string"}},"title":"MerchantUrls"},"OrderItem":{"type":"object","properties":{"amount":{"type":"number"},"label":{"type":"string"},"order_item_id":{"type":"string"},"quantity":{"type":"number"},"tax_amount":{"type":"number"},"tax_rate":{"type":"number"},"total_amount":{"type":"number"},"type":{"type":"string"},"unit":{"type":"string"}},"title":"OrderItem"},"Payment":{"type":"object","properties":{"accountStatementReference":{"type":"string"},"card":{"$ref":"#/definitions/Card"},"consumerCredit":{"$ref":"#/definitions/ConsumerCredit"},"error":{"$ref":"#/definitions/PaymentError"},"method":{"type":"string","enum":["CARD","FINANCING"]},"status":{"type":"string","enum":["FAILED","SUCCEEDED"]},"transactionId":{"type":"string","format":"uuid"}},"title":"Payment"},"PaymentError":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"title":"PaymentError"},"PickupPoint":{"type":"object","properties":{"comments":{"type":"string"},"external_id":{"type":"string"},"name":{"type":"string"},"service_hours":{"type":"string"}},"title":"PickupPoint"},"RefundOrderRequest":{"type":"object","properties":{"amount":{"type":"number"},"note":{"type":"string"},"reason":{"type":"string","enum":["PRODUCT_OUT_OF_STOCK","RETURNED_PRODUCT","CANCELLED_SERVICE","PRICE_ADJUSTMENT","OTHER_REFUND","RESERVATION_EXPIRED","REFUNDED_MANUALLY"]}},"title":"RefundOrderRequest"},"RefundOrderResponse":{"type":"object","properties":{"orderEffectiveAmount":{"type":"number"},"totalRefundedAmount":{"type":"number"}},"title":"RefundOrderResponse"},"RefundRequest":{"type":"object","properties":{"amount":{"type":"number"},"note":{"type":"string"},"reason":{"type":"string","enum":["PRODUCT_OUT_OF_STOCK","RETURNED_PRODUCT","CANCELLED_SERVICE","PRICE_ADJUSTMENT","OTHER_REFUND","RESERVATION_EXPIRED","REFUNDED_MANUALLY"]}},"title":"RefundRequest"},"RefundTransactionResponse":{"type":"object","properties":{"effectiveAmount":{"type":"number"},"refundTransactionId":{"type":"string","format":"uuid"},"totalRefundedAmount":{"type":"number"}},"title":"RefundTransactionResponse"},"Shipment":{"type":"object","properties":{"address":{"$ref":"#/definitions/Address"},"contact_phone":{"type":"string"},"date":{"type":"string","example":"yyyy-MM-dd"},"method":{"$ref":"#/definitions/MerchantShippingMethod"},"pickup_point":{"$ref":"#/definitions/PickupPoint"},"type":{"type":"string"}},"title":"Shipment"},"TransactionHistoryResponse":{"type":"object","properties":{"transactions":{"type":"array","items":{"$ref":"#/definitions/TransactionModel"}}},"title":"TransactionHistoryResponse"},"TransactionModel":{"type":"object","properties":{"amount":{"type":"number"},"cardId":{"type":"string","format":"uuid"},"currencyCode":{"type":"string"},"customerId":{"type":"string","format":"uuid"},"date":{"type":"string","format":"date-time"},"description":{"type":"string"},"id":{"type":"string","format":"uuid"},"merchantId":{"type":"string","format":"uuid"},"paymentRequestId":{"type":"string","format":"uuid"},"refund":{"type":"boolean"},"reportData":{"type":"object","additionalProperties":{"type":"string"}},"status":{"type":"string","enum":["PENDING","SUCCESS","FAILED","CANCELLED","REVERSED","DECLINED"]}},"title":"TransactionModel"}}}