API Reference
Log In

Pix Transfer with key

Pix with key

To perform a Pix transfer with a key, it is necessary to first query the key information through the payment initiation endpoint and finally carry out the transfer.

Payment Initialization

This endpoint will provide you with basic data relating to the queried key. Additionally, it will provide the "endToEndId" attribute that will be required by the transfer endpoint if you choose Pix with key.

Below is a request and response example. For more information about the endpoint, click here.

Request

POST 'https://apisandbox.delbank.com.br/baas/api/v2/pix/dict/payment-initialization'
curl --request POST \
     --url https://apisandbox.delbank.com.br/baas/api/v2/pix/dict/payment-initialization \
     --header 'IdempotencyKey: 9d16ea35-8a85-49ea-a41e-bcf56c677129' \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --header 'x-delbank-api-key: {{apiKey}}' \
     --data '
{
    "key": "+5579111140958"
}
'

Headers

NameDescription
x-delbank-api-keyRequired. API key

Body

NameTypeDescription
keystringRequired. Pix Key registered in the DICT.

Response

The status code 200 will indicate success in the transaction.

Being successful, the return will bring the following field in JSON format:

🚧

Use the endToEndId attribute in the transfer request.

{
    "endToEndId": "E3822485720230814223254707809687",
    "key": "+5579999999999",
    "beneficiary": {
        "number": "76642799",
        "branch": "0001",
        "type": "PAYMENT",
        "participant": {
            "name": "PARTICIPANT NAME",
            "ispb": "123456789"
        },
        "holder": {
            "name": "ALEXANDRE ANDRADE",
            "document": "99999999999",
            "type": "NATURAL"
        }
    }
}

Carrying out the payment

After the payment initialization, verify the payee account associated with the returned endToEndId. Execute the transfer endpoint API calling.

Request

POST 'https://apisandbox.delbank.com.br/baas/api/v2/transfers
curl --request POST \
     --url https://apisandbox.delbank.com.br/baas/api/v2/transfers \
     --header 'IdempotencyKey: 9d16ea35-8a85-49ea-a41e-bcf56c677129' \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --header 'x-delbank-api-key: {{apiKey}}' \
     --data '
{
    "amount": 0.01,
    "description": "description",
    "endToEndId": "E3822485720230814223254707809687",
    "initiationType": "KEY"
}
'

Headers

NameDescription
x-delbank-api-keyRequired. API key
IdempotencyKeyRequired. Request's idempotency key. Provide a GUID, being a new one for each request..

Body

NameTypeDescription
amountnumberRequired. Transfer amount.
descriptionstringDescription about the transfer. This information will be shown as beneficiary
endToEndIdstringRequired. EndToEndId returned while consulting a DICT key
initiationTypeenumRequired. Initialization type. Use the type 'KEY' in this case

Response

The status code 200 ensures that the transaction has succeeded.

Being successful, the return will bring the following field in JSON format:

🚧

The information will be return after the transfer initialization and the consulting the transfer.

{
    "id": "0fc7821d-b488-4268-88c0-a2bc443d046e",
    "endToEndId": "E3822485720230808004731LMaDWkOcM",
    "transactionNsu": 722355,
    "status": "PIX_PROCESSING",
    "type": "PIX_KEY",
    "amount": 0.55,
    "createdAt": "2023-08-08T00:47:31.251Z",
    "description": "manual JD",
    "payer": {
        "number": "31712",
        "branch": "0001",
        "type": "CURRENT",
        "holder": {
            "document": "32752023000149",
            "name": "bxxdbde",
            "type": "LEGAL"
        },
        "participant": {
            "name": "DELBANK",
            "ispb": "38224857"
        }
    },
    "beneficiary": {
        "number": "46441",
        "branch": "0007",
        "type": "CURRENT",
        "holder": {
            "document": "01234567890",
            "name": "OTAVIO BARBOSA",
            "type": "NATURAL"
        },
        "participant": {
            "name": "BANCO DA AMAZONIA S.A.",
            "ispb": "04902979"
        }
    }
}

📘

For more information

For more information and simulations about this endpoint requisition, access the API Reference.