Vipps Recurring
Mobile Invoice service has got recurring payment subscription endpoints that work for Vipps Recurring (Agreement) API.
The workflow is the following
Create a recurring subscription request for a particular mobile number, and receive a URL via SMS. (Sending out SMSs is optional, response object also includes the URL needed.)
Proceed with the URL. Open Vipps mobile app and accept the agreement.
Vipps mobile app redirects the user back to Mobile Invoice upon accepting the agreement and Mobile Invoice starts scheduling the recurring payments.
In order to cancel an agreement, create a cancel subscription request that requires an identifier which can be found in the query string parameters of the agreement URL. The agreement URL is the redirect URL when a user clicks Manage Agreement button on Vipps mobile app. It should belong to the merchant itself.
Creating the recurring subscription request
POST /api/recurring/subscribe
{
"partnerId":"10295",
"msisdn":"+4712457890",
"currency":"NOK",
"orderNumber":"unique-order-number-12346",
"amount":"12.50",
"campaignAmount":"10",
"paymentProvider":"Vipps",
"description":"Recurring payment subscription request",
"basis":"1",
"agreementUrl":"https://www.merchantwebsite.com",
"name":"The name of the product",
"sendSMS":"true",
"smsText":"Click to proceed",
"smsNotificationOriginator":"2119"
}
campaignAmount: Initial charge amount. Upon the first charge, Vipps will be charging according to amount value
paymentProvider: Vipps is the only one we support with this endpoint for now.
basis: 1 for WEEKLY, 2 for MONTHLY, 3 for YEARLY
agreementUrl: the URL which Vipps mobile app redirects users when Manage Agreement button is clicked. An auto-generated query parameter named recurring will be appended to the provided value. For this example payload it would be something like https://www.merchantwebsite.com?recurring=635
sendSMS: TRUE if you want to send SMS to the recipient, otherwise set to FALSE
Open Vipps mobile app and accept the agreement
Vipps mobile app redirects the user back to Mobile Invoice
Canceling subscription
Click Manage Agreement button and navigate to the merchant page
Grab the recurring query parameter value from the agreement URL and send it as a request described below.
Assuming that the recurring value grabbed from the agreement URL is 635. Then the request should be the following.
DELETE /api/recurring/cancel/635
Feeling lost? Click on this link! Portal page