heruAPI
Point of sale

Upload the CSD

LiveServed by the v1 API in development with the same checks as production; production opens on the same contract. The capabilities from before v1 keep running in production at the path your account team gives you.

PUT
/merchants/{id}/csd

Uploads or replaces the merchant's CSD from your back end, for integrations that already hold it. Prefer the onboarding page when you can: with it you never handle the merchant's certificate or password.

heru checks the files and calculates the merchant status from the certificate dates. When a check fails it answers 422 and keeps the current CSD; every code is explained in CSD errors.

Needs the merchants:csd scope.

Authorization

oauth2 merchants:csd
headerAuthorizationBearer <token>

OAuth 2.0 client credentials. Exchange your client_id and client_secret at /oauth/token of the environment for a bearer token valid for one hour. The playground of every operation asks for your own client and keeps it in your browser tab only.

Scope: merchants:csd

Path parameters

id*string

The merchant id.

Match^mer_[0-7][0-9a-hjkmnp-tv-z]{25}$

Request body

multipart/form-data
  1. body
certificate*file

The CSD certificate, the .cer file.

Formatbinary
private_key*file

The CSD private key, the .key file.

Formatbinary
password*string

Password of the private key. heru stores it encrypted with the key and never returns it.

Formatpassword

Response body

The CSD was accepted.

application/json
  1. response
status*string

Merchant status after the upload, calculated from the certificate: active when it is valid for more than 30 days, csd_expiring when it expires within 30 days.

Value in"active""csd_expiring"
message*string
csd*
curl -X PUT 'https://api.dev.b2b.heru.app/v1/merchants/mer_01m4ra8wsyfh3s0tr4nrq3y96j/csd' \  -F 'certificate=string' \  -F 'private_key=string' \  -F 'password=pa$$word'

{  "status": "active",  "message": "CSD accepted. The merchant can invoice.",  "csd": {    "serial_number": "00001000000712345678",    "valid_from": "2026-10-14",    "valid_to": "2030-10-14"  }}

© 2026 Kuarto Inc. (heru)heru.appQuestions about your integration? Contact your heru account team.