Skip to main content

API Integration

The Submerchant feature uses HUB2 API endpoints. The available endpoints are listed in the following documentation:

API Submerchant

Authentication

Your integration uses the same HUB2 API keys for authentication, but the key must have payment creation permissions:
  • Api.payment_create
  • Api.payment_intent_create
  • Api.payment_intent_read
  • Api.payment_intent_auth_create
  • Api.payment_fees_read

API Endpoints

Submerchants use creation and read endpoints similar to standard endpoints

Submerchants

  • POST /submerchants/ - Create a submerchant. Here is an example.
curl --location 'https://api.hub2.io/submerchants' \
--header 'ApiKey: [REDACTED]' \
--header 'MerchantId: [REDACTED]' \
--header 'Environment: live' \
--header 'Content-Type: application/json' \
--data '{
  "name": "EM_TEST_01",
  "description": "Submerchant created for testing purposes",
  "address": "RIVIERA BEVERLY HILLS",
  "zipcode": "00225",
  "city": "ABIDJAN",
  "country": "CI",
  "currency": "XAF",
  "phoneNumber": "+2250707070707"
}'
  • PATCH /submerchants/{submerchantId}/ - Update a submerchant
  • GET /submerchants - List created submerchants
  • GET /submerchants/{id} - Retrieve a specific submerchant

Webhooks

This uses the same webhooks as the payment endpoints. If you have already configured webhooks for payments/, no additional steps are required. Otherwise, see:

Webhooks Integration Guide