Skip to content

Latest commit

 

History

History
215 lines (140 loc) · 6.13 KB

File metadata and controls

215 lines (140 loc) · 6.13 KB

\PaymentIntentsAPI

All URIs are relative to https://connto.getopenpay.com

Method HTTP request Description
GetPaymentIntent Get /payment-intents/{payment_intent_id} Get Payment Intent
ListPaymentIntents Post /payment-intents/list List Payment Intents
UpdatePaymentIntent Put /payment-intents/{payment_intent_id} Update Payment Intent

GetPaymentIntent

PaymentIntentExternal GetPaymentIntent(ctx, paymentIntentId).Expand(expand).Execute()

Get Payment Intent

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/getopenpay/getopenpay-go"
)

func main() {
	paymentIntentId := "paymentIntentId_example" // string | 
	expand := []string{"Inner_example"} // []string |  (optional)

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

Path Parameters

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

Other Parameters

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

Name Type Description Notes

expand | []string | |

Return type

PaymentIntentExternal

Authorization

HTTPBearer

HTTP request headers

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

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

ListPaymentIntents

ListResponsePaymentIntentExternal ListPaymentIntents(ctx).PaymentIntentQueryParams(paymentIntentQueryParams).Execute()

List Payment Intents

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/getopenpay/getopenpay-go"
)

func main() {
	paymentIntentQueryParams := *openapiclient.NewPaymentIntentQueryParams() // PaymentIntentQueryParams | 

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

Path Parameters

Other Parameters

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

Name Type Description Notes
paymentIntentQueryParams PaymentIntentQueryParams

Return type

ListResponsePaymentIntentExternal

Authorization

HTTPBearer

HTTP request headers

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

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

UpdatePaymentIntent

PaymentIntentExternal UpdatePaymentIntent(ctx, paymentIntentId).UpdatePaymentIntent(updatePaymentIntent).Execute()

Update Payment Intent

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/getopenpay/getopenpay-go"
)

func main() {
	paymentIntentId := "paymentIntentId_example" // string | 
	updatePaymentIntent := *openapiclient.NewUpdatePaymentIntent() // UpdatePaymentIntent | 

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

Path Parameters

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

Other Parameters

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

Name Type Description Notes

updatePaymentIntent | UpdatePaymentIntent | |

Return type

PaymentIntentExternal

Authorization

HTTPBearer

HTTP request headers

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

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