Skip to main content

Quick start

Before you begin​

The Loyalty API is available in the production environment (https://api.vipps.no).

Pushing loyalty events​

Use the Loyalty API to push member data, coupons, stamp cards, and bonus checks into the Vipps MobilePay benefits tab.

Step 1 - Setup​

You must have already signed up as an organization with Vipps MobilePay.

Get these API key values:

  • client_id - Client ID for a sales unit.
  • client_secret - Client secret for a sales unit.

The example values in this guide must be replaced with the values for your sales unit and user. This applies to API keys, HTTP headers, references, and similar values.

Step 2 - Get an access token​

All the API endpoints require that you first obtain an API token.

Step 3 - Register a member​

Send POST:/loyalty/v1/events with action: benefits.member.registered to add a new member to your loyalty program.

curl -X POST https://api.vipps.no/loyalty/v1/events \
-H "Authorization: Bearer YOUR-ACCESS-TOKEN" \
-H "Content-Type: application/json" \
-d '{
"eventId": "evt-8a49f7b9-89cb-4e59-9db0-7f2f66a0a151",
"timestamp": "2026-01-15T10:00:00Z",
"action": "benefits.member.registered",
"payload": {
"contactId": "c1b0dcc3-9878-4079-92aa-f3c00cada3ea",
"phoneNumber": "+4712345678",
"joinedOn": "2026-01-15T10:00:00Z",
"bonusPoints": {
"balance": 0
},
"communicationPreferences": {
"acceptsEmail": true,
"acceptsSms": true,
"acceptsPostal": false
}
}
}'

A successful response confirms the event was accepted:

{
"status": "accepted",
"eventId": "evt-8a49f7b9-89cb-4e59-9db0-7f2f66a0a151"
}

Step 4 - Assign a coupon​

Send POST:/loyalty/v1/events with action: benefits.coupon.updated to assign a coupon to the member.

curl -X POST https://api.vipps.no/loyalty/v1/events \
-H "Authorization: Bearer YOUR-ACCESS-TOKEN" \
-H "Content-Type: application/json" \
-d '{
"eventId": "evt-056850f5-86fd-476f-bdbd-e03e8dbf4461",
"timestamp": "2026-03-01T09:00:00Z",
"action": "benefits.coupon.updated",
"payload": {
"contactId": "c1b0dcc3-9878-4079-92aa-f3c00cada3ea",
"phoneNumber": "+4712345678",
"coupon": {
"id": "promo-123",
"parentId": "campaign-456",
"heading": "20% off all jackets",
"description": "Valid on all jackets in store and online",
"expiresOn": "2026-06-30T23:59:59Z",
"redeemed": false,
"redemption": {
"type": "online_and_in_store",
"link": "https://merchant.com/campaign",
"promotionCode": "JACKET20"
}
}
}
}'

For the full list of supported actions and payload schemas, see the API guide.