Create Charge (Pix)
curl --request POST \
--url https://api.sandbox.wepayout.com.br/v2/payin/payments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"merchant_id": 123,
"invoice": "<string>",
"notification_url": "<string>",
"payment_method": "<string>",
"amount": 123,
"currency": "<string>",
"country": "<string>",
"description": "<string>",
"buyer": {
"name": "<string>",
"email": "<string>",
"document": {
"type": "<string>",
"number": "<string>"
}
},
"pix": {
"expire_date": "<string>"
}
}
'import requests
url = "https://api.sandbox.wepayout.com.br/v2/payin/payments"
payload = {
"merchant_id": 123,
"invoice": "<string>",
"notification_url": "<string>",
"payment_method": "<string>",
"amount": 123,
"currency": "<string>",
"country": "<string>",
"description": "<string>",
"buyer": {
"name": "<string>",
"email": "<string>",
"document": {
"type": "<string>",
"number": "<string>"
}
},
"pix": { "expire_date": "<string>" }
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
merchant_id: 123,
invoice: '<string>',
notification_url: '<string>',
payment_method: '<string>',
amount: 123,
currency: '<string>',
country: '<string>',
description: '<string>',
buyer: {
name: '<string>',
email: '<string>',
document: {type: '<string>', number: '<string>'}
},
pix: {expire_date: '<string>'}
})
};
fetch('https://api.sandbox.wepayout.com.br/v2/payin/payments', 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.sandbox.wepayout.com.br/v2/payin/payments",
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([
'merchant_id' => 123,
'invoice' => '<string>',
'notification_url' => '<string>',
'payment_method' => '<string>',
'amount' => 123,
'currency' => '<string>',
'country' => '<string>',
'description' => '<string>',
'buyer' => [
'name' => '<string>',
'email' => '<string>',
'document' => [
'type' => '<string>',
'number' => '<string>'
]
],
'pix' => [
'expire_date' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.sandbox.wepayout.com.br/v2/payin/payments"
payload := strings.NewReader("{\n \"merchant_id\": 123,\n \"invoice\": \"<string>\",\n \"notification_url\": \"<string>\",\n \"payment_method\": \"<string>\",\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"country\": \"<string>\",\n \"description\": \"<string>\",\n \"buyer\": {\n \"name\": \"<string>\",\n \"email\": \"<string>\",\n \"document\": {\n \"type\": \"<string>\",\n \"number\": \"<string>\"\n }\n },\n \"pix\": {\n \"expire_date\": \"<string>\"\n }\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))
}HttpResponse<String> response = Unirest.post("https://api.sandbox.wepayout.com.br/v2/payin/payments")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"merchant_id\": 123,\n \"invoice\": \"<string>\",\n \"notification_url\": \"<string>\",\n \"payment_method\": \"<string>\",\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"country\": \"<string>\",\n \"description\": \"<string>\",\n \"buyer\": {\n \"name\": \"<string>\",\n \"email\": \"<string>\",\n \"document\": {\n \"type\": \"<string>\",\n \"number\": \"<string>\"\n }\n },\n \"pix\": {\n \"expire_date\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.wepayout.com.br/v2/payin/payments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"merchant_id\": 123,\n \"invoice\": \"<string>\",\n \"notification_url\": \"<string>\",\n \"payment_method\": \"<string>\",\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"country\": \"<string>\",\n \"description\": \"<string>\",\n \"buyer\": {\n \"name\": \"<string>\",\n \"email\": \"<string>\",\n \"document\": {\n \"type\": \"<string>\",\n \"number\": \"<string>\"\n }\n },\n \"pix\": {\n \"expire_date\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"merchant": {
"id": 123,
"name": "<string>"
},
"hash": "<string>",
"payment_page": "<string>",
"our_number": "<string>",
"invoice": "<string>",
"notification_url": "<string>",
"payment_method": "<string>",
"amount": 123,
"paid_amount": 123,
"refunded_amount": 123,
"currency": {
"id": 123,
"name": "<string>",
"code": "<string>",
"symbol": "<string>"
},
"description": "<string>",
"buyer": {},
"originator_legal_entity": {},
"pix": {
"expire_date": "<string>",
"refund_mode": "<string>",
"qr_code": "<string>",
"end_to_end": "<string>",
"fine": {},
"discount": {}
},
"status": {
"id": 123,
"name": "<string>"
},
"status_history": [
{}
],
"substatus": {},
"refunds": [
{}
],
"created_at": "<string>",
"updated_at": "<string>"
}Charge
Create Charge (Pix)
Generate a new Pix payment request
POST
/
v2
/
payin
/
payments
Create Charge (Pix)
curl --request POST \
--url https://api.sandbox.wepayout.com.br/v2/payin/payments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"merchant_id": 123,
"invoice": "<string>",
"notification_url": "<string>",
"payment_method": "<string>",
"amount": 123,
"currency": "<string>",
"country": "<string>",
"description": "<string>",
"buyer": {
"name": "<string>",
"email": "<string>",
"document": {
"type": "<string>",
"number": "<string>"
}
},
"pix": {
"expire_date": "<string>"
}
}
'import requests
url = "https://api.sandbox.wepayout.com.br/v2/payin/payments"
payload = {
"merchant_id": 123,
"invoice": "<string>",
"notification_url": "<string>",
"payment_method": "<string>",
"amount": 123,
"currency": "<string>",
"country": "<string>",
"description": "<string>",
"buyer": {
"name": "<string>",
"email": "<string>",
"document": {
"type": "<string>",
"number": "<string>"
}
},
"pix": { "expire_date": "<string>" }
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
merchant_id: 123,
invoice: '<string>',
notification_url: '<string>',
payment_method: '<string>',
amount: 123,
currency: '<string>',
country: '<string>',
description: '<string>',
buyer: {
name: '<string>',
email: '<string>',
document: {type: '<string>', number: '<string>'}
},
pix: {expire_date: '<string>'}
})
};
fetch('https://api.sandbox.wepayout.com.br/v2/payin/payments', 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.sandbox.wepayout.com.br/v2/payin/payments",
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([
'merchant_id' => 123,
'invoice' => '<string>',
'notification_url' => '<string>',
'payment_method' => '<string>',
'amount' => 123,
'currency' => '<string>',
'country' => '<string>',
'description' => '<string>',
'buyer' => [
'name' => '<string>',
'email' => '<string>',
'document' => [
'type' => '<string>',
'number' => '<string>'
]
],
'pix' => [
'expire_date' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.sandbox.wepayout.com.br/v2/payin/payments"
payload := strings.NewReader("{\n \"merchant_id\": 123,\n \"invoice\": \"<string>\",\n \"notification_url\": \"<string>\",\n \"payment_method\": \"<string>\",\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"country\": \"<string>\",\n \"description\": \"<string>\",\n \"buyer\": {\n \"name\": \"<string>\",\n \"email\": \"<string>\",\n \"document\": {\n \"type\": \"<string>\",\n \"number\": \"<string>\"\n }\n },\n \"pix\": {\n \"expire_date\": \"<string>\"\n }\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))
}HttpResponse<String> response = Unirest.post("https://api.sandbox.wepayout.com.br/v2/payin/payments")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"merchant_id\": 123,\n \"invoice\": \"<string>\",\n \"notification_url\": \"<string>\",\n \"payment_method\": \"<string>\",\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"country\": \"<string>\",\n \"description\": \"<string>\",\n \"buyer\": {\n \"name\": \"<string>\",\n \"email\": \"<string>\",\n \"document\": {\n \"type\": \"<string>\",\n \"number\": \"<string>\"\n }\n },\n \"pix\": {\n \"expire_date\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.wepayout.com.br/v2/payin/payments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"merchant_id\": 123,\n \"invoice\": \"<string>\",\n \"notification_url\": \"<string>\",\n \"payment_method\": \"<string>\",\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"country\": \"<string>\",\n \"description\": \"<string>\",\n \"buyer\": {\n \"name\": \"<string>\",\n \"email\": \"<string>\",\n \"document\": {\n \"type\": \"<string>\",\n \"number\": \"<string>\"\n }\n },\n \"pix\": {\n \"expire_date\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"merchant": {
"id": 123,
"name": "<string>"
},
"hash": "<string>",
"payment_page": "<string>",
"our_number": "<string>",
"invoice": "<string>",
"notification_url": "<string>",
"payment_method": "<string>",
"amount": 123,
"paid_amount": 123,
"refunded_amount": 123,
"currency": {
"id": 123,
"name": "<string>",
"code": "<string>",
"symbol": "<string>"
},
"description": "<string>",
"buyer": {},
"originator_legal_entity": {},
"pix": {
"expire_date": "<string>",
"refund_mode": "<string>",
"qr_code": "<string>",
"end_to_end": "<string>",
"fine": {},
"discount": {}
},
"status": {
"id": 123,
"name": "<string>"
},
"status_history": [
{}
],
"substatus": {},
"refunds": [
{}
],
"created_at": "<string>",
"updated_at": "<string>"
}Create Charge (Pix)
Generate a new Pix payment request.Request Body
Merchant id of the account that is creating the payin. Mandatory if there is more than one account under your umbrella (sellers).
Your identification number, it must be unique on our database.
The url where we will submit the callbacks.
Payment method that will be used in payin.Allowed value:
pixThe charge total amount in the smallest currency unit (e.g., 100 cents to charge R$1.00).Min:
1Currency code of the amount (ISO 4217). Example:
BRLCountry code (ISO 3166-1 alpha-2). Example:
BRInstructions that will be displayed to the user.
Pix QRCode specific instructions.
Show Pix Object
Show Pix Object
The charge expiration date. Format:
YYYY-MM-DDTHH:MM:SSRequest Example
Pix
curl --location 'https://api.sandbox.wepayout.co/v2/payin/payments' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_TOKEN_HERE' \
--data-raw '{
"payment_method": "pix",
"invoice": "YOUR-CODE1234",
"currency": "BRL",
"amount": 3000,
"country": "BR",
"buyer": {
"name": "Buyer Name",
"email": "buyer-email@wepayments.com.br",
"document": {
"type": "CPF",
"number": "34960826312"
}
},
"pix": {
"expire_date": "2025-12-31T23:59:59"
}
}'
Response
WEpayments auto generated id, use this id to perform conciliation or perform queries via API / Dashboard.
WEpayments auto generated hash, use this hash to send your user to the payment page.
The WEpayments payment page where you can redirect the end customer.
The bank identification number.
Your identification number.
The url where callbacks are submitted.
Payment method used in payin.Value:
pixThe payin total amount in cents.
The total amount of the payin paid.
Amount refunded from this charge.
Instructions displayed to the user.
The person you are charging object.
Final beneficiary object. Can be null for pix.
Pix QRCode specific instructions object.
Status history object.
Substatus object. Can be null.
Refund object list.
Cash-in created date.
Cash-in update date.
Response Example
201 Pix
{
"id": 54821,
"merchant": {
"id": 512,
"name": "Acme Sandbox Store"
},
"hash": "f8b4d3c2e1a9b7d6c5f4e3a2b1c0d9e8f7a6b5c4d3e2f1a0b9c8d7e6f5a4b3c2",
"payment_page": "https://pagar.sandbox.goboleto.com/?hash=f8b4d3c2e1a9b7d6c5f4e3a2b1c0d9e8f7a6b5c4d3e2f1a0b9c8d7e6f5a4b3c2",
"our_number": "33045",
"invoice": "INV-PIX-2026-0001",
"notification_url": null,
"payment_method": "pix",
"amount": 3000,
"paid_amount": null,
"refunded_amount": null,
"currency": {
"id": 19,
"name": "Reais",
"code": "BRL",
"symbol": "R$"
},
"description": "",
"created_at": "2026-04-30T12:10:45.000000Z",
"updated_at": "2026-04-30T12:10:47.000000Z",
"buyer": {
"name": "Lucas Almeida",
"email": "lucas.almeida@example.com",
"document": {
"type": "cpf",
"number": "12345678909"
},
"address": {
"country": "BR",
"city": null,
"street": null,
"number": null,
"complement": null,
"zipcode": null,
"district": null,
"state_code": null
}
},
"originator_legal_entity": {
"name": null,
"document": null,
"helpdesk": null
},
"splits": [],
"pix": {
"expire_date": "2025-12-31T23:59:59",
"refund_mode": "FULL_REFUND_MERCHANT",
"qr_code": "00020126910014BR.GOV.BCB.PIX2569api-pix-h.bancobs2.com.br/spi/v2/11111111-2222-3333-4444-555555555555520400005303986540530.005802BR5908Wepayout6014Belo Horizonte61083038040362070503***63041234",
"end_to_end": null,
"fine": {
"percent": null,
"amount": null,
"date": null
},
"discount": {
"percent": null,
"amount": null,
"date": null
}
},
"status": {
"id": 1,
"name": "Created"
},
"status_history": [
{
"status": {
"id": 1,
"name": "Created"
},
"updated_at": "2026-04-30T12:10:47.000000Z"
}
],
"substatus": null,
"refunds": [],
"automatic_pix": null
}
Related Resources
Create Authorization
Create automatic pix using the same payin endpoint
Create Charge (Bank Slip)
Use the same endpoint with boleto-specific required fields
Was this page helpful?
⌘I

