Charge Subscriber
The charge subscriber API call will charge a specified subscriber ID.
Request Headers
The request endpoint is: https://api.scanpay.dk/v1/subscribers/$id/charge, where $id is the subscriber ID that you want to charge. The following HTTP request headers are required:
| HTTP/1.1 headers | Description |
|---|---|
|
HTTP Basic authentication. Read more. |
|
Sending multiple requests with the same the body and idempotency key will always give the same response and response code. To ensure the validity of the response, however, you must check for the Idempotency-Status header. |
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 |
|---|---|
"orderid": "123"
|
A unique ID that you choose. Never reuse IDs or your synchronization may behave in unexpected ways. |
|
An array with items.
|
|
Customer billing and shipping address.
|
"autocapture": true
|
Automatically capture the payment. Default is true. |
Response Headers
| HTTP/1.1 headers | Description |
|---|---|
Idempotency-Status: OK
|
Response header to ensure that the idempotency key has been considered. |
Response
Successful responses have a 200 HTTP status code