7. Webhooks
Get automatic notifications via webhooks.
With webhooks, partners can register an API URL (endpoint) to receive notifications regarding changes in transaction status.
The webhook endpoint must accept POST requests
Event Subscription
The first step to being notified when transactions status changes are to subscribe the webhook URL to the event TRANSACTION_STATUS_UPDATED
.
This is an example of a subscription request :
curl --request POST \
--url https://fx-sandbox.remessaonline.com.br/corporate/v1/webhook/subscribe \
--header 'Authorization: Bearer {{token}}' \
--header 'Content-Type: application/json' \
--header 'User-Agent: {partnername}-remessa' \
--header 'accept: application/json' \
--header 'x-token: {{x-token}}' \
--data '
{
"url": "https://webhook.site/273e521e-f17a-412b-9946-6029eafae70f",
"events": [
"TRANSACTION_STATUS_UPDATED"
]
}'
Notification
Transaction Status Update
Webhook will be notified every time the transaction status changes.
The payload of the notification request has the following information:
- createdAt: The date-time when the transaction status was changed;
- status: The transaction status code;
- transactionId: The id of the transaction;
Up to 5 attempts will be made to notify the webhook.
The interval between these attempts takes an average of 15 minutes.
Transaction Status:
Outbound Transaction
Transaction Flow Statuses
Order | Status | Description |
---|---|---|
1º | AWAITING_PAYMENT | We are waiting for the transaction payment in Remessa Online's partner bank account. |
2º | PAYMENT_CONFIRMED | The payment was confirmed we will start the settlement soon. |
3º | SETTLEMENT_IN_PROGRESS | The settlement is in progress. |
4º | CONTRACT_IN_PROGRESS | The settlement was concluded and Remessa Online is creating de foreign exchange contract. |
5º | REGISTERED_TRANSACTION | The contract was registered with the Brazilian Central Bank. |
6º | TRANSACTION_COMPLETED | The money was sent to the beneficiary. |
Other Statuses
Status | Description |
---|---|
CANCELED | The transaction was canceled. |
PAYMENT_ISSUE | The amount was insufficient, it's necessary to send the correct amount. |
TRANSACTION_DOCUMENT_ISSUE | Missing documents to continue the transaction. |
REFUNDED | The transaction was canceled and the amount was returned. |
INVALID_PROOF_OF_PAYMENT | Despite the proof of payment received, the amount was not identified. Please redo according to the instructions. |
SETTLEMENT_ISSUE | The foreign currency was not liquidated to the beneficiary, it's necessary to contact our support. |
Inbound Transaction
Transaction Flow Statuses
Order | Status | Description |
---|---|---|
1º | AWAITING_MONEY_ORDER | Waiting for money order and conciliation. |
2º | TRANSACTION_IN_PROGRESS | The order was received and the settlement is in progress. |
3º | CONTRACT_IN_PROGRESS | Generating the foreign exchange contract |
4º | REGISTERED_TRANSACTION | The contract was registered with the Brazilian Central Bank. |
5º | TRANSACTION_COMPLETED | The money was sent to the partner's Brazilian bank account. |
Other Statuses
Status | Description |
---|---|
CANCELED | The transaction was canceled. |
SETTLEMENT_ISSUE | TED or PIX was returned. |
Notification Logs
It's possible to check the log of all notifications sent to webhooks.
This is an example of a notification logs request:
curl --request GET \
--url https://fx-sandbox.remessaonline.com.br/corporate/v1/webhook/logs?startDate=2023-01-01&endtDate=2023-01-30&eventType=TRANSACTION_STATUS_UPDATED \
--header 'Authorization: Bearer {{token}}' \
--header 'Content-Type: application/json' \
--header 'User-Agent: {partnername}-remessa' \
--header 'accept: application/json' \
--header 'x-token: {{x-token}}'
Updated about 1 year ago