Enable/Disable EWA

Enable/Disable EWA

This endpoint activates or deactivates Earned Wage Access (EWA) for a customer via the Pinwheel integration. When enabling EWA, partners specify the payout frequency (one-time or recurring every paycheck) and the requested wage advance amount. A secure verification code is required to authorize the status change.

Endpoint

POST /api/PinW/set/earnedWageAccess

Authentication

Bearer token required. Obtain via:

POST https://api.banking.netevia.dev/api/auth/v2

Include in header: Authorization: Bearer {token}
Token lifetime: 10 minutes. Refresh via POST /api/auth/refresh.

When to use

Use this endpoint when a customer opts into or out of the Earned Wage Access program. EWA allows employees to access a portion of their earned wages before their regular payday through Pinwheel's payroll integration. Call this endpoint after the customer's payroll account has been linked and they have confirmed their EWA preferences, or when they wish to cancel the service.

Request Body

FieldTypeRequiredDescription
activebooleanYesSet to true to enable EWA, false to disable it
frequencyinteger (int32)NoEWA payout frequency: 1 = One-Time, 2 = Every Paycheck
ewaAmountinteger (int32)NoThe wage advance amount requested, in cents
oneTimeCodestringNoVerification code sent to the customer (SMS or TOTP) for secure authorization
secureOperationTypestringNoType of verification used. Enum: ShortMessageCode, TimeBasedCode, LegacyTimeBasedCode
{
  "active": true,
  "frequency": 2,
  "ewaAmount": 10000,
  "oneTimeCode": "847392",
  "secureOperationType": "ShortMessageCode"
}

Response

200 OK

Returns a plain string confirmation message indicating the result of the EWA status update.

FieldTypeDescription
(body)stringConfirmation message describing the outcome of the EWA enable/disable action
"EWA status updated successfully."

Error Codes

CodeWhen it happens
400Missing required fields or validation error (e.g., invalid frequency value or missing active field)
401Token missing, expired, or invalid
403Insufficient permissions to modify EWA settings for this customer
404Customer or linked payroll account not found
500Internal server error

Common Mistakes

  • Submitting frequency or ewaAmount when setting active to false — these fields are only meaningful when enabling EWA and will be ignored or may cause unexpected behavior.
  • Using an integer value other than 1 or 2 for frequency — the enum only accepts 1 (One-Time) or 2 (Every Paycheck).
  • Omitting oneTimeCode or secureOperationType when the customer's account requires secure operation verification for EWA changes.
  • Providing ewaAmount as a dollar value instead of cents — the field is in cents (e.g., 10000 = $100.00).
  • Calling this endpoint before the customer's payroll account has been successfully linked via Pinwheel.

Related Endpoints

  • POST /api/auth/v2 — Obtain a Bearer token for authentication
  • POST /api/auth/refresh — Refresh an expiring Bearer token
  • GET /api/PinW/get/earnedWageAccess — Retrieve the current EWA status and settings for a customer

Example

curl -X POST https://api.banking.netevia.dev/api/PinW/set/earnedWageAccess \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "active": true,
    "frequency": 2,
    "ewaAmount": 10000,
    "oneTimeCode": "847392",
    "secureOperationType": "ShortMessageCode"
  }'
Body Params
boolean
int32
enum
Allowed:
int32
string | null
string
enum
Allowed:
Headers
string
enum
Defaults to application/json

Generated from available response content types

Allowed:
string
enum
Defaults to application/json

Generated from available request content types

Allowed:
Response

Language
Credentials
Bearer
JWT
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
text/plain
application/json
text/json