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

OrderStatusDescription
AWAITING_PAYMENTWe are waiting for the transaction payment in Remessa Online's partner bank account.
PAYMENT_CONFIRMEDThe payment was confirmed we will start the settlement soon.
SETTLEMENT_IN_PROGRESSThe settlement is in progress.
CONTRACT_IN_PROGRESSThe settlement was concluded and Remessa Online is creating de foreign exchange contract.
REGISTERED_TRANSACTIONThe contract was registered with the Brazilian Central Bank.
TRANSACTION_COMPLETEDThe money was sent to the beneficiary.

Other Statuses

StatusDescription
CANCELEDThe transaction was canceled.
PAYMENT_ISSUEThe amount was insufficient, it's necessary to send the correct amount.
TRANSACTION_DOCUMENT_ISSUEMissing documents to continue the transaction.
REFUNDEDThe transaction was canceled and the amount was returned.
INVALID_PROOF_OF_PAYMENTDespite the proof of payment received, the amount was not identified. Please redo according to the instructions.
SETTLEMENT_ISSUEThe foreign currency was not liquidated to the beneficiary, it's necessary to contact our support.

Inbound Transaction

Transaction Flow Statuses

OrderStatusDescription
AWAITING_MONEY_ORDERWaiting for money order and conciliation.
TRANSACTION_IN_PROGRESSThe order was received and the settlement is in progress.
CONTRACT_IN_PROGRESSGenerating the foreign exchange contract
REGISTERED_TRANSACTIONThe contract was registered with the Brazilian Central Bank.
TRANSACTION_COMPLETEDThe money was sent to the partner's Brazilian bank account.

Other Statuses

StatusDescription
CANCELEDThe transaction was canceled.
SETTLEMENT_ISSUETED 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}}'