-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathrenew-subscriber.html
More file actions
99 lines (92 loc) · 3.32 KB
/
renew-subscriber.html
File metadata and controls
99 lines (92 loc) · 3.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
<h1 id="ping-service">Renew Subscriber</h1>
<p>
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.
</p>
<h3 id="request-headers">Request Headers</h3>
<p>
The request endpoint is: <code class="code--inline">https://api.scanpay.dk/v1<wbr>/subscribers/<span class="hljs-string">$id</span>/renew</code>, where <code class="code--inline hljs-string">$id</code> is the subscriber ID that you want to charge.
</p>
<div class="responsive">
<table>
<thead>
<tr>
<th>HTTP/1.1 headers</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<pre><code class="code--tmp code--ellipsis"><span class="hljs-attribute">Authorization</span>: Basic MTE1MzpZSFpJVUdRdzZOa0NJWWEzbUc2Q1djZ1NobmwxM3h1STdPREZVWXVNeTBqNzkwUTZUaHdCRWp4ZldGWHdKWjBX</code></pre>
</td>
<td>
HTTP Basic authentication. This HTTP header is required. <a href="/security#request-authentication">Read more</a>.
</td>
</tr>
</tbody>
</table>
</div>
<h3 id="request-fields">Request Fields</h3>
<p>
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.
</p>
<div class="responsive">
<table>
<thead>
<tr>
<th>JSON fields</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<code class="code--tmp"><span class="hljs-attr">"successurl"</span>: <span class="hljs-string">"http://blixen.dk/success"</span></code>
</td>
<td>
Redirect to this URL after succesful payment. If omitted we will show a generic success message.
</td>
</tr>
<tr>
<td>
<code class="code--tmp"><span class="hljs-attr">"language"</span>: <span class="hljs-string">"da"</span></code>
</td>
<td>
Preferred language for the payment window. We fallback to the <a href="https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.4">Accept-Language</a> header.
</td>
</tr>
<tr>
<td>
<code class="code--tmp"><span class="hljs-attr">"lifetime"</span>: <span class="hljs-string">"2d 12h 30m"</span></code>
</td>
<td>
Set payment link lifetime in days (d), hours (h) or minutes (m). Default is <code class="code--inline hljs-string">"1h"</code> and max is <code class="code--inline hljs-string">"30d"</code>
</td>
</tr>
</tbody>
</table>
</div>
<h3 id="response-fields">Response Fields</h3>
<p>
Successful responses have a <code class="code--inline">200</code> HTTP status code with the following JSON field:
</p>
<div class="responsive">
<table>
<thead>
<tr>
<th>JSON field</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<pre><code class="code--tmp code--ellipsis"><span class="hljs-attr">"url"</span>: <span class="hljs-string">"https://betal.scanpay.dk/9qdvbx2r"</span></code></pre>
</td>
<td>
The returned renewal link which the customer should be directed to.
</td>
</tr>
</tbody>
</table>
</div>