Skip to content

Instantly share code, notes, and snippets.

@andreluizf
Last active June 25, 2020 13:05
Show Gist options
  • Save andreluizf/8b8e210d5ab16c468adab4b7df7f0614 to your computer and use it in GitHub Desktop.
Save andreluizf/8b8e210d5ab16c468adab4b7df7f0614 to your computer and use it in GitHub Desktop.
{
"openapi": "3.0.0",
"info": {
"title": "Matera SPI - Callback",
"description": "",
"version": "0.0.1"
},
"paths": {
"/v1/instant-payments/callback/": {
"post": {
"summary": "callback instants payments.",
"tags": [
"Callback"
],
"operationId": "sendCallback",
"x-without-pre-authorize": true,
"description": "Definition of the callback service that MIP will call when it has the confirmation or cancellation of the requested payment or return",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/callbackIntantsPaymentsWrapper"
}
}
}
},
"responses": {
"204": {
"description": "Successful request"
}
}
}
}
},
"components": {
"securitySchemes": {
"clientAuthorization": {
"type": "oauth2",
"flows": {
"clientCredentials": {
"tokenUrl": "/token",
"scopes": {}
}
}
}
},
"schemas": {
"callbackIntantsPaymentsWrapper": {
"type": "object",
"description": "callback instants payments.",
"properties": {
"eventId": {
"type": "string",
"description": "Unique identifier of the payment event in the Matera instant payment system",
"maxLength": 40,
"example": "3d0ca315-aff9–4fc2-be61"
},
"endToEndId": {
"type": "string",
"description": "Unique identification, as assigned by the initiating party, to unambiguously identify the transaction. This identification is passed on, unchanged, throughout the entire end-to-end chain.",
"maxLength": 32,
"example": "E00038166201907261559y6j6mt9l0pi"
},
"originalSystemTransactionIdentifier": {
"type": "string",
"description": "Identifier of the transaction in the original system.",
"maxLength": 100
},
"status": {
"$ref": "#/components/schemas/status"
},
"eventType": {
"$ref": "#/components/schemas/eventType"
},
"rejection": {
"$ref": "#/components/schemas/rejection"
}
},
"required": [
"eventId",
"eventType",
"endToEndId",
"status"
]
},
"status": {
"type": "object",
"description": "<table border=\"1;solid;\"> <tr align=\"center\"> <th width=\"10%\">Code</th> <th>Description</th> </tr> <tr> <td>1</td> <td>&nbsp;Payment initialized</td> </tr> <tr> <td>2</td> <td>&nbsp;Waiting payment confirm </td> </tr> <tr> <td>3</td> <td>&nbsp;Success</td> </tr> <tr> <td>4</td> <td>&nbsp;Payment rejected by Clearing </td> </tr> <tr> <td>5</td> <td>&nbsp;Error</td> </tr> <tr> <td>6</td> <td>&nbsp;Unconfirmed operation </td> </tr> <tr> <td>7</td> <td>&nbsp;Payment waiting approval</td> </tr> <tr> <td>8</td> <td>&nbsp;Receipt received </td> </tr> <tr> <td>9</td> <td>&nbsp;Waiting receipt confirm</td> </tr> <tr> <td>10</td> <td>&nbsp;Receipt rejected </td> </tr> <tr> <td>12</td> <td>&nbsp;Pending processing</td> </tr> <tr> <td>13</td> <td>&nbsp;Notice received </td> </tr> <tr> <td>14</td> <td>&nbsp;Query sent</td> </tr> <tr> <td>16</td> <td>&nbsp;Data returned with error </td> </tr> <tr> <td>17</td> <td>&nbsp;Update sent</td> </tr> <tr> <td>19</td> <td>&nbsp;Event waiting approval </td> </tr> <tr> <td>20</td> <td>&nbsp;Receipt Rejected by Clearing</td> </tr> <tr> <td>21</td> <td>&nbsp;Receipt Rejection confirmed </td> </tr> <tr> <td>22</td> <td>&nbsp;Payment rejected</td> </tr> <tr> <td>23</td> <td>&nbsp;Waiting clearing return </td> </tr> <tr> <td>24</td> <td>&nbsp;Initialized</td> </tr> <tr> <td>25</td> <td>&nbsp;Return initiated </td> </tr> <tr> <td>26</td> <td>&nbsp;Return rejected</td> </tr> <tr> <td>27</td> <td>&nbsp;Waiting return confirm </td> </tr> <tr> <td>28</td> <td>&nbsp;Return rejected by Clearing</td> </tr> <tr> <td>29</td> <td>&nbsp;Return waiting approval </td> </tr> <tr> <td>30</td> <td>&nbsp;Return received</td> </tr> <tr> <td>31</td> <td>&nbsp;Return rejection confirmed </td> </tr> </table> <br>",
"properties": {
"code": {
"type": "integer",
"description": "Status code",
"example": 3
},
"description": {
"type": "string",
"description": "Payment status description",
"example": "Success"
}
}
},
"eventType": {
"type": "object",
"description": "Event type (payment or refund sent) <table border=\"1;solid;\"> <tr align=\"center\"> <th width=\"10%\" >Code</th> <th>Description</th> </tr> <tr> <td>1</td> <td>&nbsp;Payment</td> </tr> <tr> <td>12</td> <td>&nbsp;Return Sender </td> </tr> </table> <br>",
"properties": {
"code": {
"type": "integer",
"description": "Event code",
"example": 1
},
"description": {
"type": "string",
"example": "Payment"
}
}
},
"rejection": {
"type": "object",
"description": "Reason for rejection",
"properties": {
"reasonPACS002": {
"type": "string",
"description": "Reason for rejection returned by the clearing in message PACS.002",
"example": "AB09"
}
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment