All URIs are relative to https://api.basistheory.com
Method | HTTP request | Description |
---|---|---|
Commit | Post /transactions/{id}/commit | |
Create | Post /transactions | |
Rollback | Post /transactions/{id}/rollback |
Commit(ctx, id).Execute()
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.TransactionsApi.Commit(context.Background(), id).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `TransactionsApi.Commit``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string |
Other parameters are passed through a pointer to a apiCommitRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
(empty response body)
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CreateTransactionResponse Create(ctx).Execute()
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.TransactionsApi.Create(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `TransactionsApi.Create``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `Create`: CreateTransactionResponse
fmt.Fprintf(os.Stdout, "Response from `TransactionsApi.Create`: %v\n", resp)
}
This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiCreateRequest struct via the builder pattern
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Rollback(ctx, id).Execute()
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.TransactionsApi.Rollback(context.Background(), id).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `TransactionsApi.Rollback``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string |
Other parameters are passed through a pointer to a apiRollbackRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
(empty response body)
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]