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 |
PaymentIntentExternal GetPaymentIntent(ctx, paymentIntentId).Expand(expand).Execute()
Get Payment Intent
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)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| paymentIntentId | string |
Other parameters are passed through a pointer to a apiGetPaymentIntentRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
expand | []string | |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ListResponsePaymentIntentExternal ListPaymentIntents(ctx).PaymentIntentQueryParams(paymentIntentQueryParams).Execute()
List Payment Intents
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)
}Other parameters are passed through a pointer to a apiListPaymentIntentsRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| paymentIntentQueryParams | PaymentIntentQueryParams |
ListResponsePaymentIntentExternal
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PaymentIntentExternal UpdatePaymentIntent(ctx, paymentIntentId).UpdatePaymentIntent(updatePaymentIntent).Execute()
Update Payment Intent
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)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| paymentIntentId | string |
Other parameters are passed through a pointer to a apiUpdatePaymentIntentRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
updatePaymentIntent | UpdatePaymentIntent | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]