Skip to main content

Profile sharing

The ePayment API enables merchants to request the user's profile information (such as phone number or email address) as part of the payment flow. We call this the userinfo flow.

User information consent screen in Vipps

Create a payment with a profile sharing request

Remember to have a fresh access token, see Set up and Authorize. Then, call the POST:/epayment/v1/payments with profile.

For example:

curl -X POST https://apitest.vipps.no/epayment/v1/payments \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR-ACCESS-TOKEN" \
-H "Ocp-Apim-Subscription-Key: YOUR-SUBSCRIPTION-KEY" \
-H "Merchant-Serial-Number: YOUR-MSN" \
-H 'Idempotency-Key: YOUR-IDEMPOTENCY-KEY' \
-H "Vipps-System-Name: acme" \
-H "Vipps-System-Version: 3.1.2" \
-H "Vipps-System-Plugin-Name: acme-webshop" \
-H "Vipps-System-Plugin-Version: 4.5.6" \
-d '{
"amount": {
"value": 49900,
"currency": "NOK"
},
"paymentMethod": {
"type": "WALLET"
},
"customer": {
"phoneNumber": 4712345678
},
"reference": UNIQUE-PAYMENT-REFERENCE,
"userFlow": "WEB_REDIRECT",
"returnUrl": "https://example.com/redirect?reference=UNIQUE-PAYMENT-REFERENCE",
"paymentDescription": "Purchase of socks",
"profile": {
"scope": "name phoneNumber address birthDate"
}
}'

The scope determines what information the user is asked to share. The scope can include any of the values, separated by a space:

ScopeDescriptionUser consent required
addressA list containing the user's addresses.yes
birthDateBirth date. Verified with BankID. ISO 8601 format (2022-12-31)yes
emailEmail address. The flag email_verified : true (or false) in the response indicates whether the email address is verified.yes
nameFirst, middle and given name. Verified with the National Population Register.yes
phoneNumberPhone number. Verified when creating the Vipps or MobilePay account. MSISDN format (4712345678).yes
genderGender. User chosen gender with options: male, female, other or prefer not to say. This scope is only supported through the Login API currently.yes
ninNational Identity Number (NIN) (verified with National Population Register). Note, merchants need to apply for access to NIN. See Who can get access to NIN and how.yes

Examples:

  • phoneNumber
  • email
  • name address email
  • name phoneNumber
  • name birthDate
  • name email nin

Profile sharing call-by-call guide

Scenario: You want to complete a payment and get the name and phone number of a customer. Details about each step are described in the sections below.

  1. Retrieve the access token.
  2. Add scope to the transaction object and include the scope you wish to get access to (valid scope) before calling. Include the scopes you need access to (e.g., "name address email phoneNumber birthDate"), separated by spaces.
  3. The user consents to the information sharing and perform the payment in the Vipps or MobilePay app.
  4. Retrieve the sub by calling GET:/epayment/v1/payments/{reference}
  5. Using the sub from step 4, call GET:/vipps-userinfo-api/userinfo/{sub} to retrieve the user's information.

For more details, see the Userinfo quick start guide.

Help us improve our documentation

Did you find what you were looking for?