Skip to main content

Pix payments

To make local payments in Brazil, you can use Brazil's electronic payment system Pix. Such instantaneous payments can only be made in Brazilian real (BRL). If you specify any other currency, the amount will be automatically converted into BRL.

No recurring payments are available.

Making a Pix payment

  1. Create a session using the session/create method.

    Alternatively, you can use the session/init/payment method. In this case, specify all the payment parameters right away and skip the next step.

  2. Send a session/start/payment request. Specify the following parameters:

    • pix in internet_banking.type
    • the payer's name, email and CPF or CNPJ document in pix
    • country_iso2 in participant_details.sender
      Optionally, you can add a return URL to redirect the customer back after the payment (payment_options.return_url).
    Request example
    curl -X POST \
    https://demo.smart-glocal.com/api/v1/session/start/payment \
    -H 'content-type: application/json' \
    -H 'X-PARTNER-PROJECT: your_project_name' \
    -H 'X-PARTNER-SIGN: signature' \
    -d '{
    "session_id": "ps_5666",
    "payment_details": {
    "type": "internet_banking",
    "internet_banking": {
    "type": "pix",
    "pix": {
    "name": "Name Surname",
    "email": "email@example.com",
    "document": "12333315123"
    }
    }
    },
    "amount_details": {
    "amount": 8007,
    "currency": "BRL"
    },
    "customer": {
    "reference": "qwiqwi"
    },
    "participant_details": {
    "sender": {
    "country_iso2": "BR"
    }
    },
    "payment_options": {
    "return_url": "https://smart-glocal.com/",
    "recurrent": false
    }
    }'
    Response example
    curl -X POST \
    https://partner.com \
    -H 'content-type: application/json' \
    -H 'X-PARTNER-SIGN: signature' \
    -d '{
    "status": "ok",
    "session": {
    "id": "ps_5666",
    "status": "in_progress",
    "created_at": "2025-12-04T19:28:58.077701Z",
    "updated_at": "2025-12-04T19:29:23.216667Z",
    "acquiring_payments": [{
    "id": "pm_566184419",
    "status": "in_progress",
    "created_at": "2025-12-04T19:29:23.217101Z",
    "customer": {
    "reference": "qwiqwi"
    },
    "payment_details": {
    "type": "internet_banking",
    "internet_banking": {
    "type": "pix",
    "pix": {
    "document": "12333315123",
    "name": "Name Surname",
    "email": "email@example.com"
    }
    }
    },
    "amount_details": {
    "amount": 8007,
    "currency": "BRL"
    },
    "participant_details": {
    "sender": {
    "country_iso2": "BR"
    }
    },
    "payment_options": {
    "return_url": "https://smart-glocal.com/",
    "recurrent": false
    }
    }]
    }
    }'
  3. Wait for a ready_to_confirm webhook. When you receive it, it means that Smart Glocal is ready to make the payment and is waiting for your confirmation.

    Webhook example
    curl -X POST \
    https://partner.com \
    -H 'content-type: application/json' \
    -H 'X-PARTNER-SIGN: signature' \
    -d '{
    "type": "ready_to_confirm",
    "status": "ok",
    "session": {
    "id": "ps_5666",
    "status": "in_progress",
    "created_at": "2025-12-04T19:28:58.077701Z",
    "updated_at": "2025-12-04T19:29:23.216667Z",
    "acquiring_payments": [{
    "id": "pm_566184419",
    "status": "in_progress",
    "created_at": "2025-12-04T19:29:23.217101Z",
    "customer": {
    "reference": "qwiqwi"
    },
    "payment_details": {
    "type": "internet_banking",
    "internet_banking": {
    "type": "pix",
    "pix": {
    "document": "12333315123",
    "name": "Name Surname",
    "email": "email@example.com"
    }
    }
    },
    "amount_details": {
    "amount": 8007,
    "currency": "BRL"
    },
    "participant_details": {
    "sender": {
    "country_iso2": "BR"
    }
    },
    "payment_options": {
    "return_url": "https://smart-glocal.com/",
    "recurrent": false
    }
    }],
    "actions": {
    "confirm": "2025-12-04T07:48:28.275964Z"
    }
    }
    }'
  4. Send a session/confirm request to confirm the operation or a session/cancel request to cancel it.

    Request example
    curl -X POST \
    https://demo.smart-glocal.com/api/v1/session/confirm \
    -H 'content-type: application/json' \
    -H 'X-PARTNER-PROJECT: your_project_name' \
    -H 'X-PARTNER-SIGN: signature' \
    -d '{
    "session_id":"ps_5666"
    }'
  5. Wait for an action_required webhook. The customer_interaction.redirect.url parameter contains a deeplink to Pix QR.

    Webhook example
    curl -X POST \
    https://partner.com \
    -H 'content-type: application/json' \
    -H 'X-PARTNER-SIGN: signature' \
    -d '{
    "type": "action_required",
    "status": "ok",
    "session": {
    "id": "ps_5666",
    "status": "in_progress",
    "created_at": "2025-12-04T07:48:28.296138Z",
    "updated_at": "2025-12-04T07:48:28.958891Z",
    "acquiring_payments": [{
    "id": "pm_566184419",
    "status": "pending",
    "created_at": "2025-12-04T07:48:28.296138Z",
    "customer": {
    "reference": "qwiqwi"
    },
    "participant_details": {
    "sender": {
    "country_iso2": "BR"
    }
    },
    "payment_details": {
    "type": "internet_banking",
    "internet_banking": {
    "type": "pix",
    "pix": {
    "document": "12333315123",
    "name": "Name Surname",
    "email": "email@example.com"
    }
    }
    },
    "amount_details": {
    "amount": 8007,
    "currency": "BRL"
    },
    "customer_interaction": {
    "type": "redirect",
    "redirect": {
    "url": "https://sandbox.pixlink_example.com/gmf-apm/payments/N-9c67b6db-44ad-44d3-86d5-8e85379cf5b1",
    "base_url": "https://sandbox.pixlink_example.com/gmf-apm/payments/N-9c67b6db-44ad-44d3-86d5-8e85379cf5b1",
    "method": "GET",
    "params": {}
    }
    },
    "payment_options": {
    "return_url": "https://smart-glocal.com/",
    "recurrent": false
    }
    }]
    }
    }'
  6. After the customer makes the payment, you will receive a payment_finished webhook containing the payment result from Smart Glocal. The succeeded status indicates a successful payment.

    Webhook example
    curl -X POST \
    https://partner.com \
    -H 'content-type: application/json' \
    -H 'X-PARTNER-SIGN: signature' \
    -d '{
    "type": "payment_finished",
    "status": "ok",
    "session": {
    "id": "ps_5666",
    "status": "accepted",
    "created_at": "2025-12-04T07:48:28.275964Z",
    "updated_at": "2025-12-04T07:49:43.022068Z",
    "acquiring_payments": [{
    "id": "pm_566184419",
    "status": "succeeded",
    "created_at": "2025-12-04T07:48:28.296138Z",
    "finished_at": "2025-12-04T07:49:43.002789Z",
    "customer": {
    "reference": "qwiqwi"
    },
    "participant_details": {
    "sender": {
    "country_iso2": "BR"
    }
    },
    "payment_details": {
    "type": "internet_banking",
    "internet_banking": {
    "type": "pix",
    "pix": {
    "document": "12333315123",
    "name": "Name Surname",
    "email": "email@example.com"
    }
    }
    },
    "amount_details": {
    "amount": 8007,
    "currency": "BRL"
    },
    "payment_options": {
    "return_url": "https://smart-glocal.com",
    "recurrent": false
    }
    }],
    "actions": {
    "confirm": "2025-12-04T07:48:28.327146Z",
    "capture": "2025-12-04T07:49:42.965552Z"
    }
    }
    }'

Sequence diagram of QR code payments