PIX


POSTapi/v1/transaction/pix/cashin

Create a cashin


This endpoint allows you to send a new cashin transaction.
To add it you must provide all the parameters below.

Required attributes

  • Name
    name
    Type
    string
    Description

    Payer's full name

  • Name
    email
    Type
    string
    Description

    Payer's email.

  • Name
    phone
    Type
    string
    Description

    Payer's phone number

  • Name
    description
    Type
    string
    Description

    A brief description of the transaction

  • Name
    document
    Type
    string
    Description

    The payer's document, it's mandatory for security reasons, it can be a CPF or CNPJ, depending on your contract and transaction rules.

  • Name
    amount
    Type
    float
    Description

    Transaction's amount: use dot (.) as decimal separator. e.g. '1050.51'.

  • Name
    platform
    Type
    string
    Description

    The platform id
    ID: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
    Contact us to get the apropriate platform id.
    The platform ID from sandbox and production may differ.

Optional attributes

  • Name
    reference
    Type
    string
    Description

    Transaction identifier, generated by client. Unique per Transaction
    max: 50

  • Name
    extra
    Type
    string
    Description

    Additional field for the transaction, also included in the webhook payload
    max: 255

Request

POST
api/v1/transaction/pix/cashin
curl --location 'https://sandbox.virtualpay.com.br/api/v1/transaction/pix/cashin' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {key}' \
--data-raw '{
    "name": "vpay",
    "email": "vpay@email.com",
    "phone": "XXXXXXXXXXX",
    "description": "description",
    "document": "XXXXXXXXXXX",
    "amount": 1.34,
    "platform": "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
    "reference": "reference",
    "extra": "extra"
}'

Response

{
    "transaction": [
        {
            "amount": "1.34",
            "commission": "0.01",
            "date_created": "YYYY-mm-dd HH:mm:ss",
            "description": "teste",
            "document": "XXXXXXXXXXX",
            "email": "vpay@email.com",
            "e2e_id": "XXXXXXXX",
            "finished": "",
            "id": "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
            "name": "vpay",
            "operation": "cashin",
            "payment_link": "https://virtualpay.com.br/checkout/payment/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
            "phone": "XXXXXXXXXXX",
            "platform": "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
            "qr_code": "QRCode as text that can be used to generate a QRCode image or to copy as a text",
            "qr_code_image": "data:image/png;base64, iVBORw0KGgoAAAANSUhEUgAAAZAAAAGQEAAAAAD1RLVTAAAABGdBTUEAALGPC...",
            "reference": "reference",
            "extra": "extra",
            "status": "pending",
            "events": [
                {
                    "date_created": "YYYY-mm-dd HH:mm:ss",
                    "status": "pending"
                }
            ]
        }
    ]
}

POSTapi/v1/transaction/pix/cashout

Create a cashout


This endpoint allows you to send a new cashout transaction.
To add it you must provide all the parameters below.

Required attributes

  • Name
    name
    Type
    string
    Description

    Payer's full name

  • Name
    email
    Type
    string
    Description

    Payer's email.

  • Name
    phone
    Type
    string
    Description

    Payer's phone number

  • Name
    description
    Type
    string
    Description

    A brief description of the transaction.

  • Name
    document
    Type
    string
    Description

    The payer's document, it's mandatory for security reasons, it can be a CPF or CNPJ, depending on your contract and transaction rules.

  • Name
    amount
    Type
    float
    Description

    Transaction's amount: use dot (.) as decimal separator. e.g. '1050.51'.

  • Name
    platform
    Type
    string
    Description

    The platform id
    ID: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
    Contact us to get the apropriate platform id.
    The platform ID from sandbox and production may differ.

  • Name
    pix_key
    Type
    string
    Description

    The registered PIX key
    type: CPF | PHONE (Start with +55) | EMAIL | EVP | (CNPJ According to company rules)

  • Name
    key_type
    Type
    string
    Description

    The accepted key type
    type: CPF | PHONE | EMAIL | EVP | (CNPJ According to company rules)

Optional attributes

  • Name
    reference
    Type
    string
    Description

    Transaction identifier, generated by client. Unique per Transaction
    max: 50

  • Name
    extra
    Type
    string
    Description

    Additional field for the transaction, also included in the webhook payload
    max: 255

Request

POST
api/v1/transaction/pix/cashout
curl --location 'https://sandbox.virtualpay.com.br/api/v1/transaction/pix/cashout' \
    --header 'Accept: application/json' \
    --header 'Content-Type: application/json' \
    --header 'Authorization: Bearer {key}' \
--data-raw '{
    "name": "vpay",
    "email": "vpay@email.com",
    "phone": "XXXXXXXXXXX",
    "description": "description",
    "document": "XXXXXXXXXXX",
    "amount": 1.34,
    "platform": "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
    "pix_key": "XXXXXXXXXXX",
    "key_type": "CPF",
    "reference": "reference",
    "extra": "extra"
}'

Response

{
    "transaction": [
        {
            "amount": "1.34",
            "commission": "0.01",
            "date_created": "YYYY-mm-dd HH:mm:ss",
            "description": "teste",
            "document": "XXXXXXXXXXX",
            "email": "vpay@email.com",
            "e2e_id": "XXXXXXXX",
            "finished": "",
            "id": "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
            "name": "vpay",
            "operation": "cashout",
            "phone": "XXXXXXXXXXX",
            "pix_key": "XXXXXXXXXXX",
            "platform": "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
            "reference": "reference",
            "extra": "extra",
            "status": "pending",
            "events": [
                {
                    "date_created": "YYYY-mm-dd HH:mm:ss",
                    "status": "pending"
                }
            ]
        }
    ]
}