Skip to main content
POST
/
v1.1
/
checkout
Redirect checkout
curl --request POST \
  --url https://api.paymee.com.br/v1.1/checkout \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <x-api-key>' \
  --header 'x-api-token: <x-api-token>' \
  --data '
{
  "amount": 1.99,
  "callbackURL": "https://foo.bar/paymeeListener",
  "currency": "BRL",
  "maxAge": 120,
  "paymentMethod": "ITAU_TRANSFER_PFF",
  "referenceCode": "refcode12345",
  "shopper": {
    "bankDetails": {
      "account": "12345-6",
      "branch": "1234"
    },
    "document": {
      "number": "00000000000",
      "type": "CPF"
    },
    "email": "foo@bar.com.br",
    "name": "JOHN DOE",
    "phone": {
      "number": "11999990000",
      "type": "WORK"
    }
  }
}
'
import requests

url = "https://api.paymee.com.br/v1.1/checkout"

payload = {
"amount": 1.99,
"callbackURL": "https://foo.bar/paymeeListener",
"currency": "BRL",
"maxAge": 120,
"paymentMethod": "ITAU_TRANSFER_PFF",
"referenceCode": "refcode12345",
"shopper": {
"bankDetails": {
"account": "12345-6",
"branch": "1234"
},
"document": {
"number": "00000000000",
"type": "CPF"
},
"email": "foo@bar.com.br",
"name": "JOHN DOE",
"phone": {
"number": "11999990000",
"type": "WORK"
}
}
}
headers = {
"x-api-key": "<x-api-key>",
"x-api-token": "<x-api-token>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {
'x-api-key': '<x-api-key>',
'x-api-token': '<x-api-token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
amount: 1.99,
callbackURL: 'https://foo.bar/paymeeListener',
currency: 'BRL',
maxAge: 120,
paymentMethod: 'ITAU_TRANSFER_PFF',
referenceCode: 'refcode12345',
shopper: {
bankDetails: {account: '12345-6', branch: '1234'},
document: {number: '00000000000', type: 'CPF'},
email: 'foo@bar.com.br',
name: 'JOHN DOE',
phone: {number: '11999990000', type: 'WORK'}
}
})
};

fetch('https://api.paymee.com.br/v1.1/checkout', 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.paymee.com.br/v1.1/checkout",
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([
'amount' => 1.99,
'callbackURL' => 'https://foo.bar/paymeeListener',
'currency' => 'BRL',
'maxAge' => 120,
'paymentMethod' => 'ITAU_TRANSFER_PFF',
'referenceCode' => 'refcode12345',
'shopper' => [
'bankDetails' => [
'account' => '12345-6',
'branch' => '1234'
],
'document' => [
'number' => '00000000000',
'type' => 'CPF'
],
'email' => 'foo@bar.com.br',
'name' => 'JOHN DOE',
'phone' => [
'number' => '11999990000',
'type' => 'WORK'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <x-api-key>",
"x-api-token: <x-api-token>"
],
]);

$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.paymee.com.br/v1.1/checkout"

payload := strings.NewReader("{\n \"amount\": 1.99,\n \"callbackURL\": \"https://foo.bar/paymeeListener\",\n \"currency\": \"BRL\",\n \"maxAge\": 120,\n \"paymentMethod\": \"ITAU_TRANSFER_PFF\",\n \"referenceCode\": \"refcode12345\",\n \"shopper\": {\n \"bankDetails\": {\n \"account\": \"12345-6\",\n \"branch\": \"1234\"\n },\n \"document\": {\n \"number\": \"00000000000\",\n \"type\": \"CPF\"\n },\n \"email\": \"foo@bar.com.br\",\n \"name\": \"JOHN DOE\",\n \"phone\": {\n \"number\": \"11999990000\",\n \"type\": \"WORK\"\n }\n }\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("x-api-key", "<x-api-key>")
req.Header.Add("x-api-token", "<x-api-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.paymee.com.br/v1.1/checkout")
.header("x-api-key", "<x-api-key>")
.header("x-api-token", "<x-api-token>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": 1.99,\n \"callbackURL\": \"https://foo.bar/paymeeListener\",\n \"currency\": \"BRL\",\n \"maxAge\": 120,\n \"paymentMethod\": \"ITAU_TRANSFER_PFF\",\n \"referenceCode\": \"refcode12345\",\n \"shopper\": {\n \"bankDetails\": {\n \"account\": \"12345-6\",\n \"branch\": \"1234\"\n },\n \"document\": {\n \"number\": \"00000000000\",\n \"type\": \"CPF\"\n },\n \"email\": \"foo@bar.com.br\",\n \"name\": \"JOHN DOE\",\n \"phone\": {\n \"number\": \"11999990000\",\n \"type\": \"WORK\"\n }\n }\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.paymee.com.br/v1.1/checkout")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<x-api-key>'
request["x-api-token"] = '<x-api-token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": 1.99,\n \"callbackURL\": \"https://foo.bar/paymeeListener\",\n \"currency\": \"BRL\",\n \"maxAge\": 120,\n \"paymentMethod\": \"ITAU_TRANSFER_PFF\",\n \"referenceCode\": \"refcode12345\",\n \"shopper\": {\n \"bankDetails\": {\n \"account\": \"12345-6\",\n \"branch\": \"1234\"\n },\n \"document\": {\n \"number\": \"00000000000\",\n \"type\": \"CPF\"\n },\n \"email\": \"foo@bar.com.br\",\n \"name\": \"JOHN DOE\",\n \"phone\": {\n \"number\": \"11999990000\",\n \"type\": \"WORK\"\n }\n }\n}"

response = http.request(request)
puts response.read_body
{
  "status": 0,
  "message": "success",
  "response": {
    "amount": 1.99,
    "gatewayURL": "https://secure.paymee.com.br/redir/55f6bb4e-d1aa-361e-bce3-758fd57ab6d0",
    "referenceCode": "refcode12345",
    "saleCode": "0002405",
    "shopper": {
      "bankDetails": {
        "account": "12345-6",
        "branch": "1234"
      },
      "document": {
        "number": "00000000000",
        "type": "CPF"
      },
      "email": "foo@bar.com.br",
      "name": "JOHN DOE",
      "phone": {
        "number": "11999990000",
        "type": "MOBILE"
      }
    },
    "uuid": "55f6bb4e-d1aa-361e-bce3-758fd57ab6d0"
  }
}

Headers

x-api-key
string
required
Example:

"your-x-api-key"

x-api-token
string
required
Example:

"your-x-api-token"

Body

application/json
currency
string
required

ISO-4217 currency code

Maximum string length: 3
Example:

"BRL"

amount
number<float>
required

Order Amount

Example:

1.99

referenceCode
string
required

Unique order identifier

Maximum string length: 50
Example:

"refcode12345"

shopper
object
required
maxAge
number

Sale max age in minutes

Required range: x <= 43200
Example:

120

paymentMethod
string

Chosen payment method

Example:

"ITAU_TRANSFER_PFF"

callbackURL
string<uri>

Callback URL for transaction updates

Maximum string length: 255
Example:

"https://foo.bar/paymeeListener"

observation
string

Any internal reference

Maximum string length: 255

Response

Success response

message
string
Example:

"success"

response
object
status
number
Example:

0