Use this when you bring a new merchant location onto Hyfin, or its details change.
A site must be created prior to making any of the standard API calls. A unique site should be created for each unique Merchant ID (MID).
The following endpoint can be used to add or update sites. You must replace the {base_url} variable.
Every site, site group and site enterprise belongs to an agency, the level above them. Name the agency on the site, site group or site enterprise, and it is created the first time you use it. After that, the same externalId always points to the same agency, and agency fields you send are not changed. Agencies belong to one app, so the same externalId in another app is a different agency.
To take card or ACH payments, a site needs a payment gateway for that payment type. Send a gateway object, with the gateway code and its credentials, under the payment type. Each gateway needs its own credential keys. Ask support which keys yours needs.
{
"externalId": "12345678",
"name": "Sample Company",
"merchantId": "123544633452",
"agency": {
"externalId": "65123125",
"name": "Sample Agency"
},
"location": {
"addressLine1": "123 Main Street",
"addressLine2": "Suite 123",
"city": "Naples",
"stateCode": "FL",
"zipCode": "34102",
"phone": "239-123-1234",
"website": "https://samplecompany.com"
},
"primaryContact": {
"firstName": "Thomas",
"lastName": "Smith",
"email": "tsmith@samplecompany.com",
"mobilePhone": "239-987-6543"
},
"paymentTypes": {
"paymentCard": {
"active": true,
"gateway": {
"code": "gatewaycode",
"credentials": {
"key": "value",
"key2": "value2"
}
}
},
"ach": {
"active": true,
"gateway": {
"code": "gatewaycode",
"credentials": {
"key": "value",
"key2": "value2"
}
}
}
},
"branding": {
"logoUrl": "https://samplecompany.com/images/logo.png",
"color": "#336699"
},
"accessType": "basic",
"webhook": {
"active": true,
"url": "https://mysoftware.com/webhook"
},
"deleted": false
}
{
"success": true,
"action": "added",
"_id": "60f720d248f143332af022e0",
"updatedAt": "2025-05-30T19:19:44.143Z"
}