Cadastrar cartão
curl --request POST \
--url https://api.notifique.dev/v1/platform/workspaces/{id}/payment-methods \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"creditCard": {
"holderName": "string",
"number": "string",
"expiryMonth": "string",
"expiryYear": "string",
"ccv": "string"
},
"creditCardHolderInfo": {
"name": "Exemplo",
"email": "string",
"cpfCnpj": "string",
"postalCode": "string",
"addressNumber": "string",
"phone": "string"
},
"setAsDefault": true
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
creditCard: {
holderName: 'string',
number: 'string',
expiryMonth: 'string',
expiryYear: 'string',
ccv: 'string'
},
creditCardHolderInfo: {
name: 'Exemplo',
email: 'string',
cpfCnpj: 'string',
postalCode: 'string',
addressNumber: 'string',
phone: 'string'
},
setAsDefault: true
})
};
fetch('https://api.notifique.dev/v1/platform/workspaces/{id}/payment-methods', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.notifique.dev/v1/platform/workspaces/{id}/payment-methods"
payload = {
"creditCard": {
"holderName": "string",
"number": "string",
"expiryMonth": "string",
"expiryYear": "string",
"ccv": "string"
},
"creditCardHolderInfo": {
"name": "Exemplo",
"email": "string",
"cpfCnpj": "string",
"postalCode": "string",
"addressNumber": "string",
"phone": "string"
},
"setAsDefault": True
}
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 := "https://api.notifique.dev/v1/platform/workspaces/{id}/payment-methods"
payload := strings.NewReader("{\n \"creditCard\": {\n \"holderName\": \"string\",\n \"number\": \"string\",\n \"expiryMonth\": \"string\",\n \"expiryYear\": \"string\",\n \"ccv\": \"string\"\n },\n \"creditCardHolderInfo\": {\n \"name\": \"Exemplo\",\n \"email\": \"string\",\n \"cpfCnpj\": \"string\",\n \"postalCode\": \"string\",\n \"addressNumber\": \"string\",\n \"phone\": \"string\"\n },\n \"setAsDefault\": true\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))
}{
"success": true,
"data": {
"id": "pm_01HNEW...",
"brand": "VISA",
"last4": "4242",
"isDefault": true
}
}Billing
Cadastrar cartão
Tokeniza cartão no provedor. Envie creditCard e creditCardHolderInfo. Escopo billing:manage.
POST
/
v1
/
platform
/
workspaces
/
{id}
/
payment-methods
Cadastrar cartão
curl --request POST \
--url https://api.notifique.dev/v1/platform/workspaces/{id}/payment-methods \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"creditCard": {
"holderName": "string",
"number": "string",
"expiryMonth": "string",
"expiryYear": "string",
"ccv": "string"
},
"creditCardHolderInfo": {
"name": "Exemplo",
"email": "string",
"cpfCnpj": "string",
"postalCode": "string",
"addressNumber": "string",
"phone": "string"
},
"setAsDefault": true
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
creditCard: {
holderName: 'string',
number: 'string',
expiryMonth: 'string',
expiryYear: 'string',
ccv: 'string'
},
creditCardHolderInfo: {
name: 'Exemplo',
email: 'string',
cpfCnpj: 'string',
postalCode: 'string',
addressNumber: 'string',
phone: 'string'
},
setAsDefault: true
})
};
fetch('https://api.notifique.dev/v1/platform/workspaces/{id}/payment-methods', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.notifique.dev/v1/platform/workspaces/{id}/payment-methods"
payload = {
"creditCard": {
"holderName": "string",
"number": "string",
"expiryMonth": "string",
"expiryYear": "string",
"ccv": "string"
},
"creditCardHolderInfo": {
"name": "Exemplo",
"email": "string",
"cpfCnpj": "string",
"postalCode": "string",
"addressNumber": "string",
"phone": "string"
},
"setAsDefault": True
}
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 := "https://api.notifique.dev/v1/platform/workspaces/{id}/payment-methods"
payload := strings.NewReader("{\n \"creditCard\": {\n \"holderName\": \"string\",\n \"number\": \"string\",\n \"expiryMonth\": \"string\",\n \"expiryYear\": \"string\",\n \"ccv\": \"string\"\n },\n \"creditCardHolderInfo\": {\n \"name\": \"Exemplo\",\n \"email\": \"string\",\n \"cpfCnpj\": \"string\",\n \"postalCode\": \"string\",\n \"addressNumber\": \"string\",\n \"phone\": \"string\"\n },\n \"setAsDefault\": true\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))
}{
"success": true,
"data": {
"id": "pm_01HNEW...",
"brand": "VISA",
"last4": "4242",
"isDefault": true
}
}Autorizações
ntfPlatformBearerAuthntfPlatformApiKeyHeader
API key (sk_live_...) ou sessionToken de login.
Parâmetros de caminho
Corpo
application/json
Esta página foi útil?

