earnPoints( )


Adds points to a loyalty account.

Only a positive amount can be added using this method. To adjust an account's balance for a negative amount, use Adjust Points.

This method allows customers to manually earn points to their loyalty accounts. To use this method you must include an appId and an idempotencyKey. Any string can be set as the appId or idempotencyKey. In contrast to when an account earns points through an action taken on your site, then, the appId automatically sets to the source app that generates the points. In both cases, the transaction type is "EARN".

Method Declaration
Copy
Method Parameters
accountIdstringRequired

Loyalty account ID.


optionsEarnPointsOptions

Earn points info.

Returns
Return Type:Promise<EarnPointsResponse>
Errors

This method doesn't return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?