All URIs are relative to https://connto.getopenpay.com
| Method | HTTP request | Description |
|---|---|---|
| AddComment | Post /invoices/{invoice_external_id}/comment | Add Comment |
| CreateInvoice | Post /invoices/ | Create Invoice |
| FinalizeInvoice | Post /invoices/{invoice_external_id}/finalize | Finalize Invoice |
| GetInvoice | Get /invoices/{invoice_external_id} | Get Invoice |
| GetInvoicePublic | Get /invoices/public/{public_permanent_token} | Get Invoice Public |
| ListInvoices | Post /invoices/list | List Invoices |
| MarkInvoiceAsUncollectible | Post /invoices/{invoice_external_id}/mark_uncollectible | Mark Invoice As Uncollectible |
| MarkInvoiceAsVoid | Post /invoices/{invoice_external_id}/void | Mark Invoice As Void |
| PayInvoice | Post /invoices/{invoice_external_id}/pay | Pay Invoice |
| PreviewNextInvoice | Get /invoices/preview_next_invoice/{subscription_id} | Preview Next Invoice |
| UpdateInvoice | Put /invoices/{invoice_id} | Update Invoice |
InvoiceExternal AddComment(ctx, invoiceExternalId).AddCommentRequest(addCommentRequest).Execute()
Add Comment
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/getopenpay/getopenpay-go"
)
func main() {
invoiceExternalId := "invoice_dev_abc123" // string | Unique identifier of the invoice.
addCommentRequest := *openapiclient.NewAddCommentRequest("Marked as paid.") // AddCommentRequest |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.InvoicesAPI.AddComment(context.Background(), invoiceExternalId).AddCommentRequest(addCommentRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `InvoicesAPI.AddComment``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `AddComment`: InvoiceExternal
fmt.Fprintf(os.Stdout, "Response from `InvoicesAPI.AddComment`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| invoiceExternalId | string | Unique identifier of the invoice. |
Other parameters are passed through a pointer to a apiAddCommentRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
addCommentRequest | AddCommentRequest | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
InvoiceExternal CreateInvoice(ctx).CreateInvoiceRequest(createInvoiceRequest).Execute()
Create Invoice
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/getopenpay/getopenpay-go"
)
func main() {
createInvoiceRequest := *openapiclient.NewCreateInvoiceRequest("CustomerId_example") // CreateInvoiceRequest |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.InvoicesAPI.CreateInvoice(context.Background()).CreateInvoiceRequest(createInvoiceRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `InvoicesAPI.CreateInvoice``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateInvoice`: InvoiceExternal
fmt.Fprintf(os.Stdout, "Response from `InvoicesAPI.CreateInvoice`: %v\n", resp)
}Other parameters are passed through a pointer to a apiCreateInvoiceRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| createInvoiceRequest | CreateInvoiceRequest |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
InvoiceExternal FinalizeInvoice(ctx, invoiceExternalId).Execute()
Finalize Invoice
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/getopenpay/getopenpay-go"
)
func main() {
invoiceExternalId := "invoice_dev_abc123" // string | Unique identifier of the invoice.
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.InvoicesAPI.FinalizeInvoice(context.Background(), invoiceExternalId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `InvoicesAPI.FinalizeInvoice``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `FinalizeInvoice`: InvoiceExternal
fmt.Fprintf(os.Stdout, "Response from `InvoicesAPI.FinalizeInvoice`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| invoiceExternalId | string | Unique identifier of the invoice. |
Other parameters are passed through a pointer to a apiFinalizeInvoiceRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
InvoiceExternal GetInvoice(ctx, invoiceExternalId).Expand(expand).Execute()
Get Invoice
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/getopenpay/getopenpay-go"
)
func main() {
invoiceExternalId := "invoice_dev_abc123" // string | Unique identifier of the invoice.
expand := []string{"Inner_example"} // []string | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.InvoicesAPI.GetInvoice(context.Background(), invoiceExternalId).Expand(expand).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `InvoicesAPI.GetInvoice``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetInvoice`: InvoiceExternal
fmt.Fprintf(os.Stdout, "Response from `InvoicesAPI.GetInvoice`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| invoiceExternalId | string | Unique identifier of the invoice. |
Other parameters are passed through a pointer to a apiGetInvoiceRequest 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]
InvoicePublic GetInvoicePublic(ctx, publicPermanentToken).Execute()
Get Invoice Public
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/getopenpay/getopenpay-go"
)
func main() {
publicPermanentToken := "00000000-aaaa-bbbb-cccc-dddddddddddd" // string | Public token for the invoice.
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.InvoicesAPI.GetInvoicePublic(context.Background(), publicPermanentToken).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `InvoicesAPI.GetInvoicePublic``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetInvoicePublic`: InvoicePublic
fmt.Fprintf(os.Stdout, "Response from `InvoicesAPI.GetInvoicePublic`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| publicPermanentToken | string | Public token for the invoice. |
Other parameters are passed through a pointer to a apiGetInvoicePublicRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ListResponseInvoiceExternal ListInvoices(ctx).InvoiceQueryParams(invoiceQueryParams).Execute()
List Invoices
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/getopenpay/getopenpay-go"
)
func main() {
invoiceQueryParams := *openapiclient.NewInvoiceQueryParams() // InvoiceQueryParams |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.InvoicesAPI.ListInvoices(context.Background()).InvoiceQueryParams(invoiceQueryParams).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `InvoicesAPI.ListInvoices``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListInvoices`: ListResponseInvoiceExternal
fmt.Fprintf(os.Stdout, "Response from `InvoicesAPI.ListInvoices`: %v\n", resp)
}Other parameters are passed through a pointer to a apiListInvoicesRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| invoiceQueryParams | InvoiceQueryParams |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
InvoiceExternal MarkInvoiceAsUncollectible(ctx, invoiceExternalId).MarkUncollectibleRequest(markUncollectibleRequest).Execute()
Mark Invoice As Uncollectible
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/getopenpay/getopenpay-go"
)
func main() {
invoiceExternalId := "invoice_dev_abc123" // string | Unique identifier of the invoice.
markUncollectibleRequest := *openapiclient.NewMarkUncollectibleRequest() // MarkUncollectibleRequest |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.InvoicesAPI.MarkInvoiceAsUncollectible(context.Background(), invoiceExternalId).MarkUncollectibleRequest(markUncollectibleRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `InvoicesAPI.MarkInvoiceAsUncollectible``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `MarkInvoiceAsUncollectible`: InvoiceExternal
fmt.Fprintf(os.Stdout, "Response from `InvoicesAPI.MarkInvoiceAsUncollectible`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| invoiceExternalId | string | Unique identifier of the invoice. |
Other parameters are passed through a pointer to a apiMarkInvoiceAsUncollectibleRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
markUncollectibleRequest | MarkUncollectibleRequest | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
InvoiceExternal MarkInvoiceAsVoid(ctx, invoiceExternalId).MarkVoidRequest(markVoidRequest).Execute()
Mark Invoice As Void
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/getopenpay/getopenpay-go"
)
func main() {
invoiceExternalId := "invoice_dev_abc123" // string | Unique identifier of the invoice.
markVoidRequest := *openapiclient.NewMarkVoidRequest() // MarkVoidRequest |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.InvoicesAPI.MarkInvoiceAsVoid(context.Background(), invoiceExternalId).MarkVoidRequest(markVoidRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `InvoicesAPI.MarkInvoiceAsVoid``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `MarkInvoiceAsVoid`: InvoiceExternal
fmt.Fprintf(os.Stdout, "Response from `InvoicesAPI.MarkInvoiceAsVoid`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| invoiceExternalId | string | Unique identifier of the invoice. |
Other parameters are passed through a pointer to a apiMarkInvoiceAsVoidRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
markVoidRequest | MarkVoidRequest | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
InvoiceExternal PayInvoice(ctx, invoiceExternalId).PayInvoiceRequest(payInvoiceRequest).Execute()
Pay Invoice
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/getopenpay/getopenpay-go"
)
func main() {
invoiceExternalId := "invoice_dev_abc123" // string | Unique identifier of the invoice.
payInvoiceRequest := *openapiclient.NewPayInvoiceRequest() // PayInvoiceRequest |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.InvoicesAPI.PayInvoice(context.Background(), invoiceExternalId).PayInvoiceRequest(payInvoiceRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `InvoicesAPI.PayInvoice``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `PayInvoice`: InvoiceExternal
fmt.Fprintf(os.Stdout, "Response from `InvoicesAPI.PayInvoice`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| invoiceExternalId | string | Unique identifier of the invoice. |
Other parameters are passed through a pointer to a apiPayInvoiceRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
payInvoiceRequest | PayInvoiceRequest | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
InvoiceExternal PreviewNextInvoice(ctx, subscriptionId).Execute()
Preview Next Invoice
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/getopenpay/getopenpay-go"
)
func main() {
subscriptionId := "subscriptionId_example" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.InvoicesAPI.PreviewNextInvoice(context.Background(), subscriptionId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `InvoicesAPI.PreviewNextInvoice``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `PreviewNextInvoice`: InvoiceExternal
fmt.Fprintf(os.Stdout, "Response from `InvoicesAPI.PreviewNextInvoice`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| subscriptionId | string |
Other parameters are passed through a pointer to a apiPreviewNextInvoiceRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
InvoiceExternal UpdateInvoice(ctx, invoiceId).UpdateInvoiceRequest(updateInvoiceRequest).Execute()
Update Invoice
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/getopenpay/getopenpay-go"
)
func main() {
invoiceId := "invoice_dev_abc123" // string | Unique identifier of the invoice.
updateInvoiceRequest := *openapiclient.NewUpdateInvoiceRequest() // UpdateInvoiceRequest |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.InvoicesAPI.UpdateInvoice(context.Background(), invoiceId).UpdateInvoiceRequest(updateInvoiceRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `InvoicesAPI.UpdateInvoice``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UpdateInvoice`: InvoiceExternal
fmt.Fprintf(os.Stdout, "Response from `InvoicesAPI.UpdateInvoice`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| invoiceId | string | Unique identifier of the invoice. |
Other parameters are passed through a pointer to a apiUpdateInvoiceRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
updateInvoiceRequest | UpdateInvoiceRequest | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]