HUB2 APIs
The Pay-in and Pay-out APIs of HUB2 operate differently.Pay-out API
The Pay-out API is used to transfer funds to a third party: the transaction is a debit. The funds are sent to the recipient automatically, without any action on their part. The transfer account must be funded before transfers can be made with the HUB2 API. Before processing a transfer, HUB2 checks that the merchant has sufficient funds and reserves them until the provider confirms that the funds have been transferred to the recipient.Pay-in API
The Pay-in API is used to collect funds from a third party (end customer): the transaction is a credit. The customer must take action, depending on the case:- confirm the transaction with their provider when they receive a PUSH message or dial a USSD code;
- or first generate an authentication code with the provider, to be provided at the time of payment.
Accounts
Pay-ins (payments) and pay-outs (transfers) use distinct accounts. All successful pay-ins are credited to the collection account and all successful pay-outs are debited from the transfer account. Important: since transactions exist in either thelive or the sandbox environment, collection and transfer accounts also exist in both environments. A transaction created in the sandbox environment only affects the sandbox account and its balance. The same applies to the live environment.
Asynchronicity
All transactions created on the HUB2 API are processed asynchronously, except those created on the synchronous circuit. Once accepted, a transaction request is queued for processing and then handled by the other components of the HUB2 platform. This mode of operation allows HUB2 to respond very quickly to the sender of the HTTP request, which reduces waiting time and load on the merchant platform.Circuits
Asynchronous circuit
All transactions initiated on this circuit are processed asynchronously by the HUB2 API. This is the default mode of operation of providers, which do not respond directly to transaction requests but queue them for processing. Transactions are updated once they have been processed. Processing time varies from one provider to another. A transaction therefore reaches a final status at HUB2 only once its status has been updated at the provider. Once a transaction has reached a final status at the provider, HUB2 is updated in one of two ways:- by an Instant Payment Notification sent by the provider;
- or by regularly querying the status of the transaction at the provider.
Synchronous circuit
The asynchronous mode of operation does not apply to the synchronous circuit. The sender of the HTTP request (the merchant) must wait for the response from HUB2, which depends on both the provider and the responsiveness of the end customer.
This circuit is only available for pay-ins (payments).
- Wave (all countries)
