1. Transação Cartão Presente

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

No terminal rodar o seguinte comando:

echo '{
    "amount": 500,
    "description": "transação de cartão",
    "payer": "4cba5650-f59f-4a8c-9972-c54a2cd67269",
    "receiver": "e855b808-3372-46b4-af98-2bc317b11480",
    "payment_method": {
        "card_number": "4890645051539971055",
        "expiration_month": "05",
        "expiration_year": "2030",
        "holder_name": "foo",
        "security_code": "123",
        "installment_plan": {
            "mode": "interest_free",
            "number_installments": 1
        }
    }
}' |  \
  http POST http://test.imopay.com.br/transactions/create_card_present_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: 257
Content-Type: application/json
Date: Fri, 03 Jul 2020 18:44:41 GMT
Server: WSGIServer/0.2 CPython/3.8.3
Vary: Accept, Cookie, Origin
X-Frame-Options: SAMEORIGIN

{
    "amount": 500,
    "description": "transação de cartão",
    "id": "4b5722ee-fb03-45c2-a146-8cfb259c2d22",
    "payer": "4cba5650-f59f-4a8c-9972-c54a2cd67269",
    "payment_method": null,
    "receiver": "e855b808-3372-46b4-af98-2bc317b11480",
    "status": null,
    "zoop_id": null
}