curl --request POST \
--url https://api.korbit.com.br/v1/payment-intents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'idempotency-key: <idempotency-key>' \
--data '
{
"paymentMethod": "PIX",
"amount": 4503599627370496,
"card": {
"installments": 12,
"payer": {
"email": "jsmith@example.com"
},
"paymentMethodId": "<string>",
"token": "<string>",
"deviceSessionId": "<string>",
"issuerId": "<string>"
},
"currency": "BRL",
"description": "<string>",
"externalReference": "<string>",
"metadata": {},
"expiresInSeconds": 43350
}
'import requests
url = "https://api.korbit.com.br/v1/payment-intents"
payload = {
"paymentMethod": "PIX",
"amount": 4503599627370496,
"card": {
"installments": 12,
"payer": { "email": "jsmith@example.com" },
"paymentMethodId": "<string>",
"token": "<string>",
"deviceSessionId": "<string>",
"issuerId": "<string>"
},
"currency": "BRL",
"description": "<string>",
"externalReference": "<string>",
"metadata": {},
"expiresInSeconds": 43350
}
headers = {
"idempotency-key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'idempotency-key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
paymentMethod: 'PIX',
amount: 4503599627370496,
card: {
installments: 12,
payer: {email: 'jsmith@example.com'},
paymentMethodId: '<string>',
token: '<string>',
deviceSessionId: '<string>',
issuerId: '<string>'
},
currency: 'BRL',
description: '<string>',
externalReference: '<string>',
metadata: {},
expiresInSeconds: 43350
})
};
fetch('https://api.korbit.com.br/v1/payment-intents', 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.korbit.com.br/v1/payment-intents",
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([
'paymentMethod' => 'PIX',
'amount' => 4503599627370496,
'card' => [
'installments' => 12,
'payer' => [
'email' => 'jsmith@example.com'
],
'paymentMethodId' => '<string>',
'token' => '<string>',
'deviceSessionId' => '<string>',
'issuerId' => '<string>'
],
'currency' => 'BRL',
'description' => '<string>',
'externalReference' => '<string>',
'metadata' => [
],
'expiresInSeconds' => 43350
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"idempotency-key: <idempotency-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.korbit.com.br/v1/payment-intents"
payload := strings.NewReader("{\n \"paymentMethod\": \"PIX\",\n \"amount\": 4503599627370496,\n \"card\": {\n \"installments\": 12,\n \"payer\": {\n \"email\": \"jsmith@example.com\"\n },\n \"paymentMethodId\": \"<string>\",\n \"token\": \"<string>\",\n \"deviceSessionId\": \"<string>\",\n \"issuerId\": \"<string>\"\n },\n \"currency\": \"BRL\",\n \"description\": \"<string>\",\n \"externalReference\": \"<string>\",\n \"metadata\": {},\n \"expiresInSeconds\": 43350\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("idempotency-key", "<idempotency-key>")
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))
}HttpResponse<String> response = Unirest.post("https://api.korbit.com.br/v1/payment-intents")
.header("idempotency-key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"paymentMethod\": \"PIX\",\n \"amount\": 4503599627370496,\n \"card\": {\n \"installments\": 12,\n \"payer\": {\n \"email\": \"jsmith@example.com\"\n },\n \"paymentMethodId\": \"<string>\",\n \"token\": \"<string>\",\n \"deviceSessionId\": \"<string>\",\n \"issuerId\": \"<string>\"\n },\n \"currency\": \"BRL\",\n \"description\": \"<string>\",\n \"externalReference\": \"<string>\",\n \"metadata\": {},\n \"expiresInSeconds\": 43350\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.korbit.com.br/v1/payment-intents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["idempotency-key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"paymentMethod\": \"PIX\",\n \"amount\": 4503599627370496,\n \"card\": {\n \"installments\": 12,\n \"payer\": {\n \"email\": \"jsmith@example.com\"\n },\n \"paymentMethodId\": \"<string>\",\n \"token\": \"<string>\",\n \"deviceSessionId\": \"<string>\",\n \"issuerId\": \"<string>\"\n },\n \"currency\": \"BRL\",\n \"description\": \"<string>\",\n \"externalReference\": \"<string>\",\n \"metadata\": {},\n \"expiresInSeconds\": 43350\n}"
response = http.request(request)
puts response.read_body{
"amount": 4503599627370496,
"createdAt": "2023-11-07T05:31:56Z",
"currency": "BRL",
"description": "<string>",
"externalReference": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"metadata": {},
"paymentMethod": "PIX",
"pix": {
"copyAndPaste": "<string>",
"expiresAt": "2023-11-07T05:31:56Z"
},
"status": "CREATED",
"updatedAt": "2023-11-07T05:31:56Z",
"cardAction": {
"type": "THREE_DS",
"externalResourceUrl": "<string>",
"creq": "<string>",
"expiresAt": "2023-11-07T05:31:56Z"
}
}{
"amount": 4503599627370496,
"createdAt": "2023-11-07T05:31:56Z",
"currency": "BRL",
"description": "<string>",
"externalReference": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"metadata": {},
"paymentMethod": "PIX",
"pix": {
"copyAndPaste": "<string>",
"expiresAt": "2023-11-07T05:31:56Z"
},
"status": "CREATED",
"updatedAt": "2023-11-07T05:31:56Z",
"cardAction": {
"type": "THREE_DS",
"externalResourceUrl": "<string>",
"creq": "<string>",
"expiresAt": "2023-11-07T05:31:56Z"
}
}{
"detail": "<string>",
"instance": "<string>",
"requestId": "<string>",
"status": 499,
"title": "<string>",
"type": "<string>",
"code": "<string>"
}{
"detail": "<string>",
"instance": "<string>",
"requestId": "<string>",
"status": 499,
"title": "<string>",
"type": "<string>",
"code": "<string>"
}{
"detail": "<string>",
"instance": "<string>",
"requestId": "<string>",
"status": 499,
"title": "<string>",
"type": "<string>",
"code": "<string>"
}{
"detail": "<string>",
"instance": "<string>",
"requestId": "<string>",
"status": 499,
"title": "<string>",
"type": "<string>",
"code": "<string>"
}{
"detail": "<string>",
"instance": "<string>",
"requestId": "<string>",
"status": 499,
"title": "<string>",
"type": "<string>",
"code": "<string>"
}{
"detail": "<string>",
"instance": "<string>",
"requestId": "<string>",
"status": 499,
"title": "<string>",
"type": "<string>",
"code": "<string>"
}Criar payment intent
Cria uma cobrança por PIX ou cartão. A resposta vem em REQUIRES_ACTION com os dados para o comprador pagar (código PIX copia-e-cola) ou com o desafio de autenticação pendente. O estado final da cobrança chega pelos eventos de webhook — consulte GET /v1/payment-intents/{id} sempre que precisar do estado autoritativo. Requer Idempotency-Key.
curl --request POST \
--url https://api.korbit.com.br/v1/payment-intents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'idempotency-key: <idempotency-key>' \
--data '
{
"paymentMethod": "PIX",
"amount": 4503599627370496,
"card": {
"installments": 12,
"payer": {
"email": "jsmith@example.com"
},
"paymentMethodId": "<string>",
"token": "<string>",
"deviceSessionId": "<string>",
"issuerId": "<string>"
},
"currency": "BRL",
"description": "<string>",
"externalReference": "<string>",
"metadata": {},
"expiresInSeconds": 43350
}
'import requests
url = "https://api.korbit.com.br/v1/payment-intents"
payload = {
"paymentMethod": "PIX",
"amount": 4503599627370496,
"card": {
"installments": 12,
"payer": { "email": "jsmith@example.com" },
"paymentMethodId": "<string>",
"token": "<string>",
"deviceSessionId": "<string>",
"issuerId": "<string>"
},
"currency": "BRL",
"description": "<string>",
"externalReference": "<string>",
"metadata": {},
"expiresInSeconds": 43350
}
headers = {
"idempotency-key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'idempotency-key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
paymentMethod: 'PIX',
amount: 4503599627370496,
card: {
installments: 12,
payer: {email: 'jsmith@example.com'},
paymentMethodId: '<string>',
token: '<string>',
deviceSessionId: '<string>',
issuerId: '<string>'
},
currency: 'BRL',
description: '<string>',
externalReference: '<string>',
metadata: {},
expiresInSeconds: 43350
})
};
fetch('https://api.korbit.com.br/v1/payment-intents', 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.korbit.com.br/v1/payment-intents",
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([
'paymentMethod' => 'PIX',
'amount' => 4503599627370496,
'card' => [
'installments' => 12,
'payer' => [
'email' => 'jsmith@example.com'
],
'paymentMethodId' => '<string>',
'token' => '<string>',
'deviceSessionId' => '<string>',
'issuerId' => '<string>'
],
'currency' => 'BRL',
'description' => '<string>',
'externalReference' => '<string>',
'metadata' => [
],
'expiresInSeconds' => 43350
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"idempotency-key: <idempotency-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.korbit.com.br/v1/payment-intents"
payload := strings.NewReader("{\n \"paymentMethod\": \"PIX\",\n \"amount\": 4503599627370496,\n \"card\": {\n \"installments\": 12,\n \"payer\": {\n \"email\": \"jsmith@example.com\"\n },\n \"paymentMethodId\": \"<string>\",\n \"token\": \"<string>\",\n \"deviceSessionId\": \"<string>\",\n \"issuerId\": \"<string>\"\n },\n \"currency\": \"BRL\",\n \"description\": \"<string>\",\n \"externalReference\": \"<string>\",\n \"metadata\": {},\n \"expiresInSeconds\": 43350\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("idempotency-key", "<idempotency-key>")
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))
}HttpResponse<String> response = Unirest.post("https://api.korbit.com.br/v1/payment-intents")
.header("idempotency-key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"paymentMethod\": \"PIX\",\n \"amount\": 4503599627370496,\n \"card\": {\n \"installments\": 12,\n \"payer\": {\n \"email\": \"jsmith@example.com\"\n },\n \"paymentMethodId\": \"<string>\",\n \"token\": \"<string>\",\n \"deviceSessionId\": \"<string>\",\n \"issuerId\": \"<string>\"\n },\n \"currency\": \"BRL\",\n \"description\": \"<string>\",\n \"externalReference\": \"<string>\",\n \"metadata\": {},\n \"expiresInSeconds\": 43350\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.korbit.com.br/v1/payment-intents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["idempotency-key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"paymentMethod\": \"PIX\",\n \"amount\": 4503599627370496,\n \"card\": {\n \"installments\": 12,\n \"payer\": {\n \"email\": \"jsmith@example.com\"\n },\n \"paymentMethodId\": \"<string>\",\n \"token\": \"<string>\",\n \"deviceSessionId\": \"<string>\",\n \"issuerId\": \"<string>\"\n },\n \"currency\": \"BRL\",\n \"description\": \"<string>\",\n \"externalReference\": \"<string>\",\n \"metadata\": {},\n \"expiresInSeconds\": 43350\n}"
response = http.request(request)
puts response.read_body{
"amount": 4503599627370496,
"createdAt": "2023-11-07T05:31:56Z",
"currency": "BRL",
"description": "<string>",
"externalReference": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"metadata": {},
"paymentMethod": "PIX",
"pix": {
"copyAndPaste": "<string>",
"expiresAt": "2023-11-07T05:31:56Z"
},
"status": "CREATED",
"updatedAt": "2023-11-07T05:31:56Z",
"cardAction": {
"type": "THREE_DS",
"externalResourceUrl": "<string>",
"creq": "<string>",
"expiresAt": "2023-11-07T05:31:56Z"
}
}{
"amount": 4503599627370496,
"createdAt": "2023-11-07T05:31:56Z",
"currency": "BRL",
"description": "<string>",
"externalReference": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"metadata": {},
"paymentMethod": "PIX",
"pix": {
"copyAndPaste": "<string>",
"expiresAt": "2023-11-07T05:31:56Z"
},
"status": "CREATED",
"updatedAt": "2023-11-07T05:31:56Z",
"cardAction": {
"type": "THREE_DS",
"externalResourceUrl": "<string>",
"creq": "<string>",
"expiresAt": "2023-11-07T05:31:56Z"
}
}{
"detail": "<string>",
"instance": "<string>",
"requestId": "<string>",
"status": 499,
"title": "<string>",
"type": "<string>",
"code": "<string>"
}{
"detail": "<string>",
"instance": "<string>",
"requestId": "<string>",
"status": 499,
"title": "<string>",
"type": "<string>",
"code": "<string>"
}{
"detail": "<string>",
"instance": "<string>",
"requestId": "<string>",
"status": 499,
"title": "<string>",
"type": "<string>",
"code": "<string>"
}{
"detail": "<string>",
"instance": "<string>",
"requestId": "<string>",
"status": 499,
"title": "<string>",
"type": "<string>",
"code": "<string>"
}{
"detail": "<string>",
"instance": "<string>",
"requestId": "<string>",
"status": 499,
"title": "<string>",
"type": "<string>",
"code": "<string>"
}{
"detail": "<string>",
"instance": "<string>",
"requestId": "<string>",
"status": 499,
"title": "<string>",
"type": "<string>",
"code": "<string>"
}Idempotency-Key novo por intenção de cobrança e reutilize-o nos retries do mesmo request. Veja Idempotência.Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
1 - 255Body
Método de pagamento: PIX para cobrança instantânea por QR/copia-e-cola ou CARD para cartão de crédito.
PIX Valor total em centavos (BRL). Ex.: 14990 = R$ 149,90. Não há campo de desconto nem taxa — o valor cobrado é exatamente este.
1 <= x <= 9007199254740991Show child attributes
Show child attributes
Moeda da cobrança. Atualmente apenas BRL.
BRL Descrição visível nos relatórios e na conciliação (ex.: "Pedido #1042"). Não é exibida ao comprador no checkout hospedado.
1 - 200Seu identificador interno do pedido (ex.: id no seu banco). Útil para conciliar depois — pode ser consultado e filtrado.
1 - 128Objeto livre para seus dados (máx. de chaves limitado pelo schema). Nunca inclua dados pessoais sensíveis.
Show child attributes
Show child attributes
TTL da cobrança em segundos. Após expirar, a cobrança não pode mais ser paga (PIX padrão: 900 s).
300 <= x <= 86400Response
Default Response
1 <= x <= 9007199254740991BRL 200128Show child attributes
Show child attributes
PIX, CARD Show child attributes
Show child attributes
CREATED, PROCESSING, REQUIRES_ACTION, SUCCEEDED, FAILED, CANCELED, EXPIRED Show child attributes
Show child attributes
Was this page helpful?