Edit on GitHub

Renew Subscriber

The renew subscriber API call will return a link to a payment page, where the subscriber can update their payment details. This is useful if the subscriber wants to change payment method or replace an expired credit card.

Request Headers

The request endpoint is: https://api.scanpay.dk/v1/subscribers/$id/renew, where $id is the subscriber ID that you want to charge.

HTTP/1.1 headers Description
Authorization: Basic MTE1MzpZSFpJVUdRdzZOa0NJWWEzbUc2Q1djZ1NobmwxM3h1STdPREZVWXVNeTBqNzkwUTZUaHdCRWp4ZldGWHdKWjBX
HTTP Basic authentication. This HTTP header is required. Read more.

Request Fields

All request fields are listed below. Note that if the billing address and/or shipping address is unspecified, they will default to the addresses specified in the subscriber.

JSON fields Description
"successurl": "http://blixen.dk/success" Redirect to this URL after succesful payment. If omitted we will show a generic success message.
"language": "da" Preferred language for the payment window. We fallback to the Accept-Language header.
"lifetime": "2d 12h 30m" Set payment link lifetime in days (d), hours (h) or minutes (m). Default is "1h" and max is "30d"

Response Fields

Successful responses have a 200 HTTP status code with the following JSON field:

JSON field Description
"url": "https://betal.scanpay.dk/9qdvbx2r" The returned renewal link which the customer should be directed to.