The model used in the integration of the APIs is simple. It is based in the use of two URLs:
- URL for transactions - specific for operations such as authorization, capture and cancellation of transactions.
- URL for queries - specific for consultation operations, such as a transaction search.
To perform an operation:
- Combine the environment base URL with the desired operation endpoint. E.g.:
https://api.braspag.com.br/_v2/sales/
. - Submit a request to that URL using the correct HTTP method.
HTTP Method | Description |
---|---|
GET | Retrieves existing resources, e.g.: a transaction query. |
POST | Creates new resources, e.g.: creating a transaction. |
PUT | Updates existing resources, e.g.: capturing or canceling a previously authorized transaction. |
All operations require the access credentials "Merchant ID" and "Merchant Key" to be sent through the request header.
Each request operation will return an HTTP status code, indicating whether it was successfully completed or not.