Skip to content

Commit

Permalink
feat: add API doc for received inbound Pix (#400)
Browse files Browse the repository at this point in the history
* feat: add API doc for received inbound Pix

* chore: format inbound Pix documentation

* chore: rm field from inbound Pix webhook

* chore: improve inbound Pix API description
  • Loading branch information
brvnaleao authored Sep 4, 2023
1 parent 6f4f0f8 commit 1ab9665
Show file tree
Hide file tree
Showing 2 changed files with 229 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
},
"target_data": {
"$ref": "inbound_pix_payment"
},
"paid_at": "string"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,228 @@
---
title: "Consultando um pagamento recebido"
linkTitle: "Consultando um pagamento recebido"
date: 2023-09-04T12:10:33-03:00
lastmod: 2023-09-04T12:10:33-03:00
weight: 1
draft: false
description: >
Como consultar pagamentos com Pix recebidos
---
---
<br>

```
GET https://sandbox-api.openbank.stone.com.br/api/v1/inbound_pix_payments/{id}/
```

<br>
Endpoint com detalhes de uma transação Pix recebida.

#### **HEADERS**

---
<br>

**authorization*** `string`
<br> Bearer token de autenticação

<br>

Exemplo:

```json
{
"authorization": "Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICI4d3NUd3BhYTRJWUZIYWV5ZFRubnRoRC1UaVlCaU9kanNmOGx6RUlMR1hVIn0.eyJqdGkiOiJiODQ0NDc4OS01ODE5LTQ4MTUtYjc1NC04MDU5NmMyYTg4MGYiLCJleHAiOjE2MTY2OTk5MjQsIm5iZiI6MCwiaWF0IjoxNjE2Njk5MDI0LCJpc3MiOiJodHRwczovL3NhbmRib3gtYWNjb3VudHMub3BlbmJhbmsuc3RvbmUuY29tLmJyL2F1dGgvcmVhbG1zL3N0b25lX2JhbmsiLCJzdWIiOiJhYzE5MGRmYy00YTBjLTQ5ODUtYmQwNi03NWE5Zjc3NjU0MTMiLCJ0eXAiOiJCZWFyZXIiLCJhenAiOiIwNjVlY2IwOC0yNDM5LTQwYzAtOGUxMy0yYjQ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mCQwFuapdIvDocA4Z4xYh049dWEwbJ2uevV3V_Q-RL3me8vykNTWGiT-dmyWvFN-XAq889_F1ZQskHsLz-ZtlrFw3XjitnLvEJbg9iyxVA7AuwnexBIQS4gU9QwMXcJjij9JowYbLu4ANUITXU01Jf5hxMYq1oSobOL3-RuGWJLoPOXkJyAbOm5hS15QgSuwp_qOU8VAEa3Yg"
}
```

<br>

#### **Responses**

```
200 OK
```

Body:

Pagamento associado a QR Code dinâmico imediato

```json
{
"account_id": "a5997beb-44ef-438a-ab15-506eaa7fda7e",
"amount": 1000,
"change_amount": 0,
"refunded_amount": 123,
"created_at": "2021-06-25T17:46:56Z",
"created_by": "user:8c8a97a5-18f3-46fe-94ae-6341d718da8f",
"description": "description",
"end_to_end_id": "E165015552021062517465eeb40dd2f6",
"failed_at": null,
"pix_payment_invoice_with_due_date": null,
"pix_payment_static_invoice": null,
"pix_payment_invoice": {
"id": "8c9cdf74-4b33-11ee-be56-0242ac120002",
"additional_data": null,
"paid_at": "2021-06-25T17:46:56Z"
},
"fee": 0,
"fee_metadata": {
"fee_type": "fixed",
"updated_at": "2021-06-25T17:46:56Z",
"charge_type": null,
"fixed_value": 0,
"inserted_at": null,
"proportional_value": null
},
"id": "e59c23d8-eb3a-4a67-8687-ebfe163211a8",
"purpose": "payment",
"settled_at": "2021-06-25T17:46:56Z",
"source": {
"account": {
"account_code": "598461372",
"account_type": "PG",
"branch_code": "0001"
},
"entity": {"document": "91269973045", "document_type": "cpf", "name": "my name"},
"institution": {"ispb": "16501555", "name": "Stone Pagamentos S.A."}
},
"status": "SETTLED",
"source": {
"entity": {"document": "***699730**", "document_type": "cpf", "name": "other name"},
"institution": {"ispb": "34697281", "name": "Outro Banco S.A."}
},
"transaction_id": "0d01ec464b3311eebe56-0242ac120002"
}
```

<br>

Pagamento associado a QR Code dinâmico

```json
{
"account_id": "2749866e-243e-4bdc-8741-250f2088d841",
"amount": 1000,
"change_amount": 0,
"refunded_amount": 123,
"created_at": "2021-06-25T17:46:56Z",
"created_by": "user:8c8a97a5-18f3-46fe-94ae-6341d718da8f",
"description": "description",
"end_to_end_id": "E165015552021062517465eeb40dd2f6",
"failed_at": null,
"pix_payment_invoice": null,
"pix_payment_static_invoice": null,
"pix_payment_invoice_with_due_date": {
"id": "8c9cdf74-4b33-11ee-be56-0242ac120002",
"additional_data": null,
"paid_at": "2021-06-25T17:46:56Z"
},
"fee": 0,
"fee_metadata": {
"fee_type": "fixed",
"updated_at": "2021-06-25T17:46:56Z",
"charge_type": null,
"fixed_value": 0,
"inserted_at": null,
"proportional_value": null
},
"id": "e59c23d8-eb3a-4a67-8687-ebfe163211a8",
"purpose": "payment",
"settled_at": "2021-06-25T17:46:56Z",
"source": {
"account": {
"account_code": "598461372",
"account_type": "PG",
"branch_code": "0001"
},
"entity": {"document": "91269973045", "document_type": "cpf", "name": "my name"},
"institution": {"ispb": "16501555", "name": "Stone Pagamentos S.A."}
},
"status": "SETTLED",
"source": {
"entity": {"document": "***699730**", "document_type": "cpf", "name": "other name"},
"institution": {"ispb": "34697281", "name": "Outro Banco S.A."}
},
"transaction_id": "0221ec464b3311eebe56-0242ac120001"
}
```

<br>

Pagamento associado a QR Code estático

```json
{
"account_id": "89f127d1-73b0-401b-8289-5b9d9e126f29",
"amount": 1000,
"change_amount": 0,
"refunded_amount": 123,
"created_at": "2021-06-25T17:46:56Z",
"created_by": "user:8c8a97a5-18f3-46fe-94ae-6341d718da8f",
"description": "description",
"end_to_end_id": "E165015552021062517465eeb40dd2f6",
"failed_at": null,
"pix_payment_invoice_with_due_date": null,
"pix_payment_invoice": null,
"pix_payment_static_invoice": {
"id": "8c9cdf74-4b33-11ee-be56-0242ac120002",
"additional_information": null
},
"fee": 0,
"fee_metadata": {
"fee_type": "fixed",
"updated_at": "2021-06-25T17:46:56Z",
"charge_type": null,
"fixed_value": 0,
"inserted_at": null,
"proportional_value": null
},
"id": "e59c23d8-eb3a-4a67-8687-ebfe163211a8",
"purpose": "payment",
"settled_at": "2021-06-25T17:46:56Z",
"source": {
"account": {
"account_code": "598461372",
"account_type": "PG",
"branch_code": "0001"
},
"entity": {"document": "91269973045", "document_type": "cpf", "name": "my name"},
"institution": {"ispb": "16501555", "name": "Stone Pagamentos S.A."}
},
"status": "SETTLED",
"source": {
"entity": {"document": "***699730**", "document_type": "cpf", "name": "other name"},
"institution": {"ispb": "34697281", "name": "Outro Banco S.A."}
},
"transaction_id": "1234"
}
```

<br>

```
401 Unauthorized
```

Body:

```json
{
"type": "srn:error:unauthenticated"
}
```
<br>

```
403 Forbidden
```

Body:

```json
{
"type": "srn:error:unauthorized"
}
```
<br>

0 comments on commit 1ab9665

Please sign in to comment.