WavePayby T3raTech

API reference

Where the money lands

Connect your own provider account so the provider pays you directly. WavePay never holds your money in this mode.

GET/v2/internal/merchant/settlement

The provider accounts your key has connected (masked); the secret is never returned

Authentication: Merchant key in x-wavepay-service-key

Responses

StatusMeaning
200{ accounts: [{ provider, mode: 'own-keys', environment, account, status, connectedAt, verifiedAt }] }
403a global key, which has no merchant

Example

curl -sX GET https://t3rnel-wavepay-production.t3ratech.workers.dev/v2/internal/merchant/settlement \
  -H 'x-wavepay-service-key: mk_live_…'
PUT/v2/internal/merchant/settlement/{provider}

Connect your own provider account so the money lands with you (own keys). Credentials are checked with the provider, sealed, and never returned

Authentication: Merchant key in x-wavepay-service-key

Parameters

NameInRequiredType
providerpathyesstring

Body (JSON)

FieldTypeRequired
clientIdstringyes
clientSecretstringyes
environmentsandbox | productionno

Responses

StatusMeaning
200{ account: { provider, mode, environment, account, status, connectedAt, verifiedAt } }
400SETTLEMENT_PROVIDER_UNSUPPORTED or INVALID_REQUEST
403LIVE_KEY_REQUIRED (a test key cannot hold an account) or a global key
422CREDENTIALS_REJECTED (the provider refused them) or ENVIRONMENT_MISMATCH (sandbox keys on a production Worker, or the reverse)

Example

curl -sX PUT https://t3rnel-wavepay-production.t3ratech.workers.dev/v2/internal/merchant/settlement/<provider> \
  -H 'x-wavepay-service-key: mk_live_…' \
  -H 'content-type: application/json' \
  -d '{"clientId":"…","clientSecret":"…","environment":"sandbox"}'
DELETE/v2/internal/merchant/settlement/{provider}

Disconnect the account; later payments settle through the deployment's account again

Authentication: Merchant key in x-wavepay-service-key

Parameters

NameInRequiredType
providerpathyesstring

Responses

StatusMeaning
200{ disconnected: boolean }

Example

curl -sX DELETE https://t3rnel-wavepay-production.t3ratech.workers.dev/v2/internal/merchant/settlement/<provider> \
  -H 'x-wavepay-service-key: mk_live_…'