2. Transação Boleto

Para gerar uma transação de boleto siga as instruções.

Importante

O boleto possui uma quantia mínima para ser gerado, sendo esta 300 (R$ 3,00).

No terminal rodar o seguinte comando:

echo '{
    "amount": 500,
    "description": "transação de boleto",
    "payer": "4cba5650-f59f-4a8c-9972-c54a2cd67269",
    "receiver": "e855b808-3372-46b4-af98-2bc317b11480",
    "payment_method": {
        "expiration_date": "2020-06-25",
        "limit_date": "2020-07-14",
        "configurations": {
            "fine": {"value": 200, "charge_type": "p"},
            "interest": {"value": 100, "charge_type": "mp"},
            "discounts": [
                {"value": 1000, "charge_type": "p", "date": "2020-09-30"},
                {"value": 1000, "charge_type": "p", "date": "2020-09-29"}
            ]
        }
    }
}' |  \
  http POST http://test.imopay.com.br/transactions/create_invoice_transaction/ \
  authorization:'Api-Key sua_chave_solicitada_aqui' \
  content-type:application/json

Aviso

Caso ocorra o erro: command not found: http, basta instalar o httpie: $ sudo apt-get install httpie

Resposta esperada:

HTTP/1.1 201 Created
Allow: POST, OPTIONS
Content-Length: 711
Content-Type: application/json
Date: Fri, 03 Jul 2020 18:43:17 GMT
Server: WSGIServer/0.2 CPython/3.8.3
Vary: Accept, Cookie, Origin
X-Frame-Options: SAMEORIGIN

{
    "amount": 500,
    "description": "transação de boleto",
    "id": "cc5228b1-2d53-4b3a-b268-a1570a6e8675",
    "payer": "4cba5650-f59f-4a8c-9972-c54a2cd67269",
    "payment_method": {
        "barcode": "34191090407879772893431339210002683080000000500",
        "description": "transação de boleto",
        "expiration_date": "2020-06-25",
        "id": "36ed35ae-d752-47ee-8062-2ac17a5364af",
        "limit_date": "2020-07-14",
        "status": "not_paid",
        "zoop_invoice_id": "900863aa890d4e5685e1e79f4be30359",
        "zoop_url": "https://api-boleto-production.s3.amazonaws.com/d77c2258b51d49269191502695f939f4/6095b3e9bd6540c2ba0779f1638e2d0e/5eff7c45cac919086cf2a04f.html"
    },
    "receiver": "e855b808-3372-46b4-af98-2bc317b11480",
    "status": null,
    "zoop_id": "0103d0f7acee4d9db257353fb2d06ac3"
}