Formas de pagamento
Base: https://api.nivesistemas.com.br · 4 endpoints
GET /payment-methods
Seção intitulada “GET /payment-methods”Listar forma de pagamento
curl -X GET "https://api.nivesistemas.com.br/payment-methods" \ -H "Authorization: Bearer sl_live_exemplo_abc123xyz789" \ -H "X-Store-Slug: loja-demo"const res = await fetch("https://api.nivesistemas.com.br/payment-methods", { method: "GET", headers: { Authorization: "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", },});const data = await res.json();import requests
res = requests.request( "GET", "https://api.nivesistemas.com.br/payment-methods", headers={ "Authorization": "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", },)print(res.json())POST /payment-methods
Seção intitulada “POST /payment-methods”Criar forma de pagamento
Corpo (JSON)
| Campo | Tipo | Obrigatório | Descrição |
|---|---|---|---|
name |
string | sim | Nome (ex.: Dinheiro, PIX) |
priceBasis |
string | não | CASH | CREDIT |
allowsChange |
boolean | não | Permite troco |
active |
boolean | não | Ativa |
fiscalCode |
string | não | Código tPag NFC-e (2 dígitos) |
Resposta: 201 Created
curl -X POST "https://api.nivesistemas.com.br/payment-methods" \ -H "Authorization: Bearer sl_live_exemplo_abc123xyz789" \ -H "X-Store-Slug: loja-demo" \ -H "Content-Type: application/json" \ -d '{"name":"Exemplo","priceBasis":"","allowsChange":true,"active":true,"fiscalCode":""}'const res = await fetch("https://api.nivesistemas.com.br/payment-methods", { method: "POST", headers: { Authorization: "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", "Content-Type": "application/json", }, body: JSON.stringify({ "name": "Exemplo", "priceBasis": "", "allowsChange": true, "active": true, "fiscalCode": "" }),});const data = await res.json();import requests
res = requests.request( "POST", "https://api.nivesistemas.com.br/payment-methods", headers={ "Authorization": "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", }, json={ "name": "Exemplo", "priceBasis": "", "allowsChange": True, "active": True, "fiscalCode": "" },)print(res.json())PATCH /payment-methods/:id
Seção intitulada “PATCH /payment-methods/:id”Atualizar forma de pagamento
Parâmetros de rota: id
Corpo (JSON)
| Campo | Tipo | Obrigatório | Descrição |
|---|---|---|---|
name |
string | sim | Nome (ex.: Dinheiro, PIX) |
priceBasis |
string | não | CASH | CREDIT |
allowsChange |
boolean | não | Permite troco |
active |
boolean | não | Ativa |
fiscalCode |
string | não | Código tPag NFC-e (2 dígitos) |
curl -X PATCH "https://api.nivesistemas.com.br/payment-methods/{id}" \ -H "Authorization: Bearer sl_live_exemplo_abc123xyz789" \ -H "X-Store-Slug: loja-demo" \ -H "Content-Type: application/json" \ -d '{"name":"Exemplo","priceBasis":"","allowsChange":true,"active":true,"fiscalCode":""}'const res = await fetch("https://api.nivesistemas.com.br/payment-methods/{id}", { method: "PATCH", headers: { Authorization: "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", "Content-Type": "application/json", }, body: JSON.stringify({ "name": "Exemplo", "priceBasis": "", "allowsChange": true, "active": true, "fiscalCode": "" }),});const data = await res.json();import requests
res = requests.request( "PATCH", "https://api.nivesistemas.com.br/payment-methods/{id}", headers={ "Authorization": "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", }, json={ "name": "Exemplo", "priceBasis": "", "allowsChange": True, "active": True, "fiscalCode": "" },)print(res.json())DELETE /payment-methods/:id
Seção intitulada “DELETE /payment-methods/:id”Excluir forma de pagamento
Parâmetros de rota: id
Resposta: 204 No Content
curl -X DELETE "https://api.nivesistemas.com.br/payment-methods/{id}" \ -H "Authorization: Bearer sl_live_exemplo_abc123xyz789" \ -H "X-Store-Slug: loja-demo"const res = await fetch("https://api.nivesistemas.com.br/payment-methods/{id}", { method: "DELETE", headers: { Authorization: "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", },});const data = await res.json();import requests
res = requests.request( "DELETE", "https://api.nivesistemas.com.br/payment-methods/{id}", headers={ "Authorization": "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", },)print(res.json())
