Skip to content

Latest commit

 

History

History
632 lines (410 loc) · 17.3 KB

File metadata and controls

632 lines (410 loc) · 17.3 KB

\PaymentAPI

All URIs are relative to https://api.click.uz

Method HTTP request Description
CheckPaymentStatus Get /v2/merchant/payment/status/{service_id}/{payment_id} Payment status check
CheckPaymentStatusByMTI Get /v2/merchant/payment/status_by_mti/{service_id}/{merchant_trans_id} Payment status check by merchant_trans_id
ConfirmPayment Post /v2/merchant/click_pass/confirm Payment confirmation
CreatePaymentWithClickPass Post /v2/merchant/click_pass/payment Payment with CLICK Pass
DisableConfirmationMode Delete /v2/merchant/click_pass/confirmation/{service_id} Disable confirmation mode
EnableConfirmationMode Put /v2/merchant/click_pass/confirmation/{service_id} Enable confirmation mode
PartialRefund Delete /v2/merchant/payment/partial_reversal/{service_id}/{payment_id}/{amount} Partial refund
PaymentWithToken Post /v2/merchant/card_token/payment Payment with token
ReversePayment Delete /v2/merchant/payment/reversal/{service_id}/{payment_id} Payment reversal (cancel)

CheckPaymentStatus

PaymentStatusResponse CheckPaymentStatus(ctx, serviceId, paymentId).Execute()

Payment status check

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/iota-uz/click/clickapi"
)

func main() {
	serviceId := int64(789) // int64 | 
	paymentId := int64(789) // int64 | 

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.PaymentAPI.CheckPaymentStatus(context.Background(), serviceId, paymentId).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `PaymentAPI.CheckPaymentStatus``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `CheckPaymentStatus`: PaymentStatusResponse
	fmt.Fprintf(os.Stdout, "Response from `PaymentAPI.CheckPaymentStatus`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
serviceId int64
paymentId int64

Other Parameters

Other parameters are passed through a pointer to a apiCheckPaymentStatusRequest struct via the builder pattern

Name Type Description Notes

Return type

PaymentStatusResponse

Authorization

AuthHeader

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

CheckPaymentStatusByMTI

PaymentStatusByMTIResponse CheckPaymentStatusByMTI(ctx, serviceId, merchantTransId).Execute()

Payment status check by merchant_trans_id

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/iota-uz/click/clickapi"
)

func main() {
	serviceId := int64(789) // int64 | 
	merchantTransId := "merchantTransId_example" // string | 

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.PaymentAPI.CheckPaymentStatusByMTI(context.Background(), serviceId, merchantTransId).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `PaymentAPI.CheckPaymentStatusByMTI``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `CheckPaymentStatusByMTI`: PaymentStatusByMTIResponse
	fmt.Fprintf(os.Stdout, "Response from `PaymentAPI.CheckPaymentStatusByMTI`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
serviceId int64
merchantTransId string

Other Parameters

Other parameters are passed through a pointer to a apiCheckPaymentStatusByMTIRequest struct via the builder pattern

Name Type Description Notes

Return type

PaymentStatusByMTIResponse

Authorization

AuthHeader

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

ConfirmPayment

PaymentConfirmationResponse ConfirmPayment(ctx).PaymentConfirmationRequest(paymentConfirmationRequest).Execute()

Payment confirmation

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/iota-uz/click/clickapi"
)

func main() {
	paymentConfirmationRequest := *openapiclient.NewPaymentConfirmationRequest(int64(123), int64(123)) // PaymentConfirmationRequest | 

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.PaymentAPI.ConfirmPayment(context.Background()).PaymentConfirmationRequest(paymentConfirmationRequest).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `PaymentAPI.ConfirmPayment``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `ConfirmPayment`: PaymentConfirmationResponse
	fmt.Fprintf(os.Stdout, "Response from `PaymentAPI.ConfirmPayment`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiConfirmPaymentRequest struct via the builder pattern

Name Type Description Notes
paymentConfirmationRequest PaymentConfirmationRequest

Return type

PaymentConfirmationResponse

Authorization

AuthHeader

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

CreatePaymentWithClickPass

ClickPassPaymentResponse CreatePaymentWithClickPass(ctx).ClickPassPaymentRequest(clickPassPaymentRequest).Execute()

Payment with CLICK Pass

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/iota-uz/click/clickapi"
)

func main() {
	clickPassPaymentRequest := *openapiclient.NewClickPassPaymentRequest(int64(123), "OtpData_example", float64(123)) // ClickPassPaymentRequest | 

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.PaymentAPI.CreatePaymentWithClickPass(context.Background()).ClickPassPaymentRequest(clickPassPaymentRequest).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `PaymentAPI.CreatePaymentWithClickPass``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `CreatePaymentWithClickPass`: ClickPassPaymentResponse
	fmt.Fprintf(os.Stdout, "Response from `PaymentAPI.CreatePaymentWithClickPass`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiCreatePaymentWithClickPassRequest struct via the builder pattern

Name Type Description Notes
clickPassPaymentRequest ClickPassPaymentRequest

Return type

ClickPassPaymentResponse

Authorization

AuthHeader

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

DisableConfirmationMode

ConfirmationModeResponse DisableConfirmationMode(ctx, serviceId).Execute()

Disable confirmation mode

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/iota-uz/click/clickapi"
)

func main() {
	serviceId := int64(789) // int64 | 

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.PaymentAPI.DisableConfirmationMode(context.Background(), serviceId).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `PaymentAPI.DisableConfirmationMode``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `DisableConfirmationMode`: ConfirmationModeResponse
	fmt.Fprintf(os.Stdout, "Response from `PaymentAPI.DisableConfirmationMode`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
serviceId int64

Other Parameters

Other parameters are passed through a pointer to a apiDisableConfirmationModeRequest struct via the builder pattern

Name Type Description Notes

Return type

ConfirmationModeResponse

Authorization

AuthHeader

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

EnableConfirmationMode

ConfirmationModeResponse EnableConfirmationMode(ctx, serviceId).Execute()

Enable confirmation mode

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/iota-uz/click/clickapi"
)

func main() {
	serviceId := int64(789) // int64 | 

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.PaymentAPI.EnableConfirmationMode(context.Background(), serviceId).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `PaymentAPI.EnableConfirmationMode``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `EnableConfirmationMode`: ConfirmationModeResponse
	fmt.Fprintf(os.Stdout, "Response from `PaymentAPI.EnableConfirmationMode`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
serviceId int64

Other Parameters

Other parameters are passed through a pointer to a apiEnableConfirmationModeRequest struct via the builder pattern

Name Type Description Notes

Return type

ConfirmationModeResponse

Authorization

AuthHeader

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

PartialRefund

PartialRefundResponse PartialRefund(ctx, serviceId, paymentId, amount).Execute()

Partial refund

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/iota-uz/click/clickapi"
)

func main() {
	serviceId := int64(789) // int64 | 
	paymentId := int64(789) // int64 | 
	amount := float64(1.2) // float64 | 

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.PaymentAPI.PartialRefund(context.Background(), serviceId, paymentId, amount).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `PaymentAPI.PartialRefund``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `PartialRefund`: PartialRefundResponse
	fmt.Fprintf(os.Stdout, "Response from `PaymentAPI.PartialRefund`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
serviceId int64
paymentId int64
amount float64

Other Parameters

Other parameters are passed through a pointer to a apiPartialRefundRequest struct via the builder pattern

Name Type Description Notes

Return type

PartialRefundResponse

Authorization

AuthHeader

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

PaymentWithToken

TokenPaymentResponse PaymentWithToken(ctx).TokenPaymentRequest(tokenPaymentRequest).Execute()

Payment with token

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/iota-uz/click/clickapi"
)

func main() {
	tokenPaymentRequest := *openapiclient.NewTokenPaymentRequest(int64(123), "CardToken_example", float64(123), "TransactionParameter_example") // TokenPaymentRequest | 

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.PaymentAPI.PaymentWithToken(context.Background()).TokenPaymentRequest(tokenPaymentRequest).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `PaymentAPI.PaymentWithToken``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `PaymentWithToken`: TokenPaymentResponse
	fmt.Fprintf(os.Stdout, "Response from `PaymentAPI.PaymentWithToken`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiPaymentWithTokenRequest struct via the builder pattern

Name Type Description Notes
tokenPaymentRequest TokenPaymentRequest

Return type

TokenPaymentResponse

Authorization

AuthHeader

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

ReversePayment

PaymentReversalResponse ReversePayment(ctx, serviceId, paymentId).Execute()

Payment reversal (cancel)

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/iota-uz/click/clickapi"
)

func main() {
	serviceId := int64(789) // int64 | 
	paymentId := int64(789) // int64 | 

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.PaymentAPI.ReversePayment(context.Background(), serviceId, paymentId).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `PaymentAPI.ReversePayment``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `ReversePayment`: PaymentReversalResponse
	fmt.Fprintf(os.Stdout, "Response from `PaymentAPI.ReversePayment`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
serviceId int64
paymentId int64

Other Parameters

Other parameters are passed through a pointer to a apiReversePaymentRequest struct via the builder pattern

Name Type Description Notes

Return type

PaymentReversalResponse

Authorization

AuthHeader

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]