Criar transação na carteira de cashback
curl --request POST \
--url https://api.dooki.com.br/v2/{alias}/pricing/wallet/transaction \
--header 'Content-Type: application/json' \
--header 'User-Secret-Key: <api-key>' \
--header 'User-Token: <api-key>' \
--data '
{
"customer_email": "cliente@example.com",
"transaction_type": "credit",
"amount": 15.5,
"expires_at": "2026-12-31",
"description": "Bonificação por indicação"
}
'import requests
url = "https://api.dooki.com.br/v2/{alias}/pricing/wallet/transaction"
payload = {
"customer_email": "cliente@example.com",
"transaction_type": "credit",
"amount": 15.5,
"expires_at": "2026-12-31",
"description": "Bonificação por indicação"
}
headers = {
"User-Token": "<api-key>",
"User-Secret-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'User-Token': '<api-key>',
'User-Secret-Key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
customer_email: 'cliente@example.com',
transaction_type: 'credit',
amount: 15.5,
expires_at: '2026-12-31',
description: 'Bonificação por indicação'
})
};
fetch('https://api.dooki.com.br/v2/{alias}/pricing/wallet/transaction', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.dooki.com.br/v2/{alias}/pricing/wallet/transaction",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'customer_email' => 'cliente@example.com',
'transaction_type' => 'credit',
'amount' => 15.5,
'expires_at' => '2026-12-31',
'description' => 'Bonificação por indicação'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"User-Secret-Key: <api-key>",
"User-Token: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.dooki.com.br/v2/{alias}/pricing/wallet/transaction"
payload := strings.NewReader("{\n \"customer_email\": \"cliente@example.com\",\n \"transaction_type\": \"credit\",\n \"amount\": 15.5,\n \"expires_at\": \"2026-12-31\",\n \"description\": \"Bonificação por indicação\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("User-Token", "<api-key>")
req.Header.Add("User-Secret-Key", "<api-key>")
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))
}HttpResponse<String> response = Unirest.post("https://api.dooki.com.br/v2/{alias}/pricing/wallet/transaction")
.header("User-Token", "<api-key>")
.header("User-Secret-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"customer_email\": \"cliente@example.com\",\n \"transaction_type\": \"credit\",\n \"amount\": 15.5,\n \"expires_at\": \"2026-12-31\",\n \"description\": \"Bonificação por indicação\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dooki.com.br/v2/{alias}/pricing/wallet/transaction")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["User-Token"] = '<api-key>'
request["User-Secret-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"customer_email\": \"cliente@example.com\",\n \"transaction_type\": \"credit\",\n \"amount\": 15.5,\n \"expires_at\": \"2026-12-31\",\n \"description\": \"Bonificação por indicação\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": 10001,
"transaction_type": "credit",
"amount": 9.9,
"used_amount": 0,
"accumulated_amount": 9.9,
"status": "approved",
"cancelled_at": null,
"description": null,
"expires_at": "2026-01-31",
"expired": 1,
"customer": {
"id": 200001,
"name": "Cliente Exemplo",
"email": "cliente@example.com",
"phone": "5500000000000"
},
"order": {
"id": 300001,
"number": 123456789012
},
"created_at": {
"date": "2000-08-17 10:24:24",
"timezone_type": 3,
"timezone": "America/Sao_Paulo"
},
"updated_at": {
"date": "2000-08-17 10:24:24",
"timezone_type": 3,
"timezone": "America/Sao_Paulo"
}
}
}Carteira
Criar transação na carteira de cashback
Cria uma transação de crédito ou débito na carteira de cashback do cliente. O sufixo ’ (via API)’ é adicionado automaticamente à descrição. Rate limit: 5 requisições por minuto.
POST
/
{alias}
/
pricing
/
wallet
/
transaction
Criar transação na carteira de cashback
curl --request POST \
--url https://api.dooki.com.br/v2/{alias}/pricing/wallet/transaction \
--header 'Content-Type: application/json' \
--header 'User-Secret-Key: <api-key>' \
--header 'User-Token: <api-key>' \
--data '
{
"customer_email": "cliente@example.com",
"transaction_type": "credit",
"amount": 15.5,
"expires_at": "2026-12-31",
"description": "Bonificação por indicação"
}
'import requests
url = "https://api.dooki.com.br/v2/{alias}/pricing/wallet/transaction"
payload = {
"customer_email": "cliente@example.com",
"transaction_type": "credit",
"amount": 15.5,
"expires_at": "2026-12-31",
"description": "Bonificação por indicação"
}
headers = {
"User-Token": "<api-key>",
"User-Secret-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'User-Token': '<api-key>',
'User-Secret-Key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
customer_email: 'cliente@example.com',
transaction_type: 'credit',
amount: 15.5,
expires_at: '2026-12-31',
description: 'Bonificação por indicação'
})
};
fetch('https://api.dooki.com.br/v2/{alias}/pricing/wallet/transaction', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.dooki.com.br/v2/{alias}/pricing/wallet/transaction",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'customer_email' => 'cliente@example.com',
'transaction_type' => 'credit',
'amount' => 15.5,
'expires_at' => '2026-12-31',
'description' => 'Bonificação por indicação'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"User-Secret-Key: <api-key>",
"User-Token: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.dooki.com.br/v2/{alias}/pricing/wallet/transaction"
payload := strings.NewReader("{\n \"customer_email\": \"cliente@example.com\",\n \"transaction_type\": \"credit\",\n \"amount\": 15.5,\n \"expires_at\": \"2026-12-31\",\n \"description\": \"Bonificação por indicação\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("User-Token", "<api-key>")
req.Header.Add("User-Secret-Key", "<api-key>")
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))
}HttpResponse<String> response = Unirest.post("https://api.dooki.com.br/v2/{alias}/pricing/wallet/transaction")
.header("User-Token", "<api-key>")
.header("User-Secret-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"customer_email\": \"cliente@example.com\",\n \"transaction_type\": \"credit\",\n \"amount\": 15.5,\n \"expires_at\": \"2026-12-31\",\n \"description\": \"Bonificação por indicação\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dooki.com.br/v2/{alias}/pricing/wallet/transaction")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["User-Token"] = '<api-key>'
request["User-Secret-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"customer_email\": \"cliente@example.com\",\n \"transaction_type\": \"credit\",\n \"amount\": 15.5,\n \"expires_at\": \"2026-12-31\",\n \"description\": \"Bonificação por indicação\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": 10001,
"transaction_type": "credit",
"amount": 9.9,
"used_amount": 0,
"accumulated_amount": 9.9,
"status": "approved",
"cancelled_at": null,
"description": null,
"expires_at": "2026-01-31",
"expired": 1,
"customer": {
"id": 200001,
"name": "Cliente Exemplo",
"email": "cliente@example.com",
"phone": "5500000000000"
},
"order": {
"id": 300001,
"number": 123456789012
},
"created_at": {
"date": "2000-08-17 10:24:24",
"timezone_type": 3,
"timezone": "America/Sao_Paulo"
},
"updated_at": {
"date": "2000-08-17 10:24:24",
"timezone_type": 3,
"timezone": "America/Sao_Paulo"
}
}
}Path Parameters
Alias da loja
Body
application/json
E-mail do cliente. Deve pertencer a um cliente cadastrado na loja.
Example:
"cliente@example.com"
Tipo da transação: credit para adicionar saldo, debit para subtrair.
Available options:
credit, debit Example:
"credit"
Valor da transação.
Required range:
x >= 0Example:
15.5
Data de expiração do crédito no formato Y-m-d. Deve ser igual ou posterior a hoje.
Example:
"2026-12-31"
Descrição da transação (máximo 140 caracteres, pois o sufixo ' (via API)' é adicionado automaticamente).
Maximum string length:
150Example:
"Bonificação por indicação"
Response
Transação criada com sucesso
Representa uma transacao de cashback na carteira do cliente.
Show child attributes
Show child attributes
Was this page helpful?
⌘I