Criar forma de pagamento
curl --request POST \
--url http://localhost:4000/v1/workspaces/{workspaceId}/billing/payment-methods \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"provider": "<string>",
"type": "<string>",
"providerMethodRef": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({provider: '<string>', type: '<string>', providerMethodRef: '<string>'})
};
fetch('http://localhost:4000/v1/workspaces/{workspaceId}/billing/payment-methods', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "http://localhost:4000/v1/workspaces/{workspaceId}/billing/payment-methods"
payload = {
"provider": "<string>",
"type": "<string>",
"providerMethodRef": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://localhost:4000/v1/workspaces/{workspaceId}/billing/payment-methods"
payload := strings.NewReader("{\n \"provider\": \"<string>\",\n \"type\": \"<string>\",\n \"providerMethodRef\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{}Criar forma de pagamento
POST
/
v1
/
workspaces
/
{workspaceId}
/
billing
/
payment-methods
Criar forma de pagamento
curl --request POST \
--url http://localhost:4000/v1/workspaces/{workspaceId}/billing/payment-methods \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"provider": "<string>",
"type": "<string>",
"providerMethodRef": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({provider: '<string>', type: '<string>', providerMethodRef: '<string>'})
};
fetch('http://localhost:4000/v1/workspaces/{workspaceId}/billing/payment-methods', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "http://localhost:4000/v1/workspaces/{workspaceId}/billing/payment-methods"
payload = {
"provider": "<string>",
"type": "<string>",
"providerMethodRef": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://localhost:4000/v1/workspaces/{workspaceId}/billing/payment-methods"
payload := strings.NewReader("{\n \"provider\": \"<string>\",\n \"type\": \"<string>\",\n \"providerMethodRef\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
application/json
Response
201 - application/json
Forma de pagamento criada
The response is of type object.