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
| Field | Type | Required | Description |
|---|---|---|---|
| active | boolean | Yes | Set to true to enable EWA, false to disable it |
| frequency | integer (int32) | No | EWA payout frequency: 1 = One-Time, 2 = Every Paycheck |
| ewaAmount | integer (int32) | No | The wage advance amount requested, in cents |
| oneTimeCode | string | No | Verification code sent to the customer (SMS or TOTP) for secure authorization |
| secureOperationType | string | No | Type 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.
| Field | Type | Description |
|---|---|---|
| (body) | string | Confirmation message describing the outcome of the EWA enable/disable action |
"EWA status updated successfully."Error Codes
| Code | When it happens |
|---|---|
| 400 | Missing required fields or validation error (e.g., invalid frequency value or missing active field) |
| 401 | Token missing, expired, or invalid |
| 403 | Insufficient permissions to modify EWA settings for this customer |
| 404 | Customer or linked payroll account not found |
| 500 | Internal server error |
Common Mistakes
- Submitting
frequencyorewaAmountwhen settingactivetofalse— these fields are only meaningful when enabling EWA and will be ignored or may cause unexpected behavior. - Using an integer value other than
1or2forfrequency— the enum only accepts1(One-Time) or2(Every Paycheck). - Omitting
oneTimeCodeorsecureOperationTypewhen the customer's account requires secure operation verification for EWA changes. - Providing
ewaAmountas 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 authenticationPOST /api/auth/refresh— Refresh an expiring Bearer tokenGET /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"
}'