API Reference
The Gigapay API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded requests, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.
API server
The demo version serves as a test environment for developers working to integrate with our API. No money flows through the demo environment.
Browsable API
Both the live and demo environment render a human-friendly HTML output for each resource, when the HTML format is requested by a web browser. This allows for easy browsing and interaction with the available resources. We strongly recommend you test our Browsable API before starting to integrate with our API, as it will give you a far more intuitive understanding of the API compared to reading this documentation.
Authentication
import requests
response = requests.get(
'https://api.gigapay.se/v2/',
headers={
'Authorization': 'Token cd7a4537a231356d404b553f465b6af2fa035821',
'Integration-ID': '79606358-97af-4196-b64c-5f719433d56b'
}
)
curl -X GET -H 'Authorization: Token cd7a4537a231356d404b553f465b6af2fa035821' -H 'Integration-ID: 79606358-97af-4196-b64c-5f719433d56b' https://api.gigapay.se/v2/
fetch("https://api.gigapay.se/v2/", {
headers: {
Authorization: "Token cd7a4537a231356d404b553f465b6af2fa035821",
"Integration-Id": "79606358-97af-4196-b64c-5f719433d56b",
},
});
The Gigapay API uses API keys to identify and authenticate requests. You can request a key by contacting us at support@gigapay.se. Note that you will receive separate keys for the live and demo environment.
Your API keys carry many privileges, so make sure you keep them secure. Do not share your API keys in publicly accessible areas such as GitHub, client-side code, etc.
Authorization to the API is performed through a token-based HTTP Authentication scheme. To authorize requests,
include your key in the Authorization
HTTP header. Note that the API key should be prefixed by the string literal
Token
, with whitespace separating the two strings.
To specify which Integration you are acting as you need to provide the Integration-ID
header.
Tokens
Replacing the above tokens with your own will add them to the provided code examples, making them executable.
Unauthenticated Requests
API requests without valid authentication will fail with the HTTP response code 401
. If you are getting unexpected
401
responses, ensure that your URL is correct. API calls made over plain HTTP will be redirected with the response
code 301
, and API calls with incorrect placed /
will be redirected with the response code 307
to the correct URL,
and most HTTP clients will automatically follow the redirects while stripping out the authorization headers, resulting
in the 401
response. Disable automated redirects or be mindful of this.
IP-whitelisting
The Gigapay API Supports IP-whitelisting. When requesting API-keys, let us know if you want to only allow access from certain IP addresses.
If IP-whitelisting is enabled, API requests made from a non-whitelisted IP will be rejected with HTTP
response code 403
.
Language
import requests
response = requests.get(
'https://api.gigapay.se/v2/',
headers={
'Authorization': 'Token cd7a4537a231356d404b553f465b6af2fa035821',
'Integration-ID': '79606358-97af-4196-b64c-5f719433d56b',
'Accept-Language': 'sv',
}
)
curl -X GET -H 'Authorization: Token cd7a4537a231356d404b553f465b6af2fa035821' -H 'Integration-ID: 79606358-97af-4196-b64c-5f719433d56b' -H "Accept-Language: en" https://api.gigapay.se/v2/
fetch("https://api.gigapay.se/v2/", {
headers: {
Authorization: "Token cd7a4537a231356d404b553f465b6af2fa035821",
"Integration-Id": "79606358-97af-4196-b64c-5f719433d56b",
"Accept-Language": "sv",
},
});
The default language of the API is English. This document is written assuming you have the language set to English.
To change language set the Accept-Language
header to your preferred language.
Events
An example Employee object with event timestamps:
{
"id": "25d2af38-59b9-4f73-9452-51787fed5c84",
"name": "Karl Karlsson",
"cellphone_number": null,
"email": "karl.karlsson@gmail.com",
"metadata": {},
"created_at": "2019-05-20T15:33:08.974624Z",
"notified_at": "2019-05-20T15:33:12.581720Z",
"claimed_at": "2019-05-21T09:13:32.575721Z",
"verified_at": "2019-05-21T09:13:48.625263Z",
"invitation_code": null
}
The Gigapay API is driven by actions taken by the parties involved in each Payout; the Client making the Payout, Gigapay facilitating it, and the Employee receiving it. The flowchart below illustrates each of these actions and the corresponding events.
Note that the Employee and Payout flow typically occur in parallel as the Employee is usually created when, or close in time to when, their first Payout is created.
All objects are timestamped when an associated event occurs. The field is simply the name of the event suffixed
with _at
.
Subscribing to Events
An example webhook for the
Employee.verified
event:
POST https://jobmatchr.se/webhooks/employees/ HTTP/1.1
Content-Type: application/json
Gigapay-Signature: t=1583327301,v1=ad583e2b2093c8d6fb3b65e04b99fc5988e98c0c312909acad334072da7e99ec
...
{
"id": "25d2af38-59b9-4f73-9452-51787fed5c84",
"name": "Karl Karlsson",
"cellphone_number": null,
"email": "karl.karlsson@gmail.com",
"metadata": {
"user_id": 3
},
"created_at": "2019-05-20T15:33:08.974624Z",
"notified_at": "2019-05-20T15:33:12.581720Z",
"claimed_at": "2019-05-21T09:13:32.575721Z",
"verified_at": "2019-05-21T09:13:48.625263Z",
"invitation_code": null
}
The Gigapay API allows you to register Webhooks in order to receive real-time updates on events related to your Gigapay account. They are optional, but the preferred way of monitoring the status of objects. We can send callbacks on the following events:
Employee.created
Employee.notified
Employee.claimed
Employee.verified
Payout.created
Payout.notified
Payout.accepted
Payrun.created
Payrun.paid
Registration.verified
The notifications simply contain the object that triggered the event, as represented in the API.
Webhook Types
Integration-Scoped Webhooks
These webhooks are tied to a specific integration and require an Integration-ID
header for all operations.
This includes events that start with Employee
, Payout
, or Payrun
.
User-Scoped Webhooks
These webhooks are tied to your user account and do not require an Integration-ID
header for any operations.
This includes events that start with Registration
.
Gigapay Signature
Example code to verify a Gigapay Signature:
secret_key = '...asId'
# If you're doing this in shell; parse the request manually:
timestamp='...'
signature='...'
body='...'
payload=${timestamp}.${body}
calculated_signature=$(echo -n $payload | openssl dgst -sha256 -hmac $secret_key)
if [ $signature == $calculated_signature ]; then
...
fi
import hmac
secret_key = '...asId'
t, v1 = request.headers['Gigapay-Signature'].split(',')
timestamp = t.split('=')[1]
signature = v1.split('=')[1]
payload = timestamp + '.' + request.body
hmac.new(secret_key.encode('utf-8'), digestmod='sha256')
hmac.update(payload.encode('utf-8'))
calculated_signature = hmac.hexdigest()
hmac.compare_digest(signature, calculated_signature)
import hmacSHA512 from "crypto-js/hmac-sha512";
let secret_key = "...asId";
let [t, v1] = request.get("Gigapay-Signature").split(",");
let timestamp = t.split("=")[1];
let signature = v1.split("=")[1];
let payload = timestamp + "." + request.body;
let calculated_signature = hmacSHA512(payload, secret_key);
calculated_signature === signature;
The notification is signed using the secret_key
for the Webhooks, the signature is included in the
notification as a Gigapay-Signature
header. This allows you to verify that the events were sent by Gigapay, and not
by a third party.
The signature consists of two parameters;
t
, the timestamp of when the notification was sent, and;
v
the signature of the current scheme.
The only valid signature scheme is currently v1
, which is the HMAC algorithm as described in
RFC 2104 using SHA256 as digestmod.
To verify signatures using the v1 scheme, extract the timestamp from the Gigapay-Signature header, and the JSON-encoded
notification from the request body. Join these strings with a period, .
, as a separator. Compute an HMAC with the
SHA256 hash function using the Webhook's secret key as the key. Lastly ensure that the signature in the header and the
calculated signature matches.
Errors
HTTP/1.1 405 Method Not Allowed
Allow: GET, HEAD, OPTIONS
...
{"detail":"Method \"DELETE\" not allowed."}
Gigapay uses HTTP response codes to indicate whether an API request was successful. Codes in the 2XX
range indicate
success; codes in the 4XX
range indicate that the request failed, given the information provided; codes in the
5XX
range indicate an error with Gigapay's servers. Response codes in the 4XX
range generally indicate a client
error and will as such include information in the body of the response describing the cause of the error.
HTTP/1.1 400 Bad Request
...
{"description": ["This field may not be blank."]}
Validation errors returned on otherwise valid requests are structured differently. They will respond with the
status code 400
and include the field names as the keys in the response. If the validation error was not specific
to a particular field then the non_field_errors
key will be used.
Expanding objects
Request to retrieve a Payout object with the related Employee object expanded:
import requests
response = requests.get(
'https://api.gigapay.se/v2/payouts/9472/?expand=employee',
headers={
'Authorization': 'Token cd7a4537a231356d404b553f465b6af2fa035821',
'Integration-ID': '79606358-97af-4196-b64c-5f719433d56b'
}
)
curl -X GET -H 'Authorization: Token cd7a4537a231356d404b553f465b6af2fa035821' -H 'Integration-ID: 79606358-97af-4196-b64c-5f719433d56b' 'https://api.gigapay.se/v2/payouts/9472/?expand=employee'
fetch("https://api.gigapay.se/v2/payouts/9472/?expand=employee", {
method: "GET",
headers: {
Authorization: "Token cd7a4537a231356d404b553f465b6af2fa035821",
"Integration-Id": "79606358-97af-4196-b64c-5f719433d56b",
},
});
Returns a response formatted as such:
{
"id": "9472",
"amount": "760.92",
"cost": "1020.00",
"currency": "SEK",
"description": "Instagram samarbete 2021-11-13.",
"employee": {
"id": "1847",
"name": "Albin Lindskog",
"email": "albin@mail.com",
"cellphone_number": "+46700000001",
"country": "SWE",
"metadata": {},
"created_at": "2019-05-22T10:32:36.118753Z",
"notified_at": null,
"claimed_at": null,
"verified_at": null,
"invitation_code": "ABCD1234"
},
"invoice": "c1554d88-b74f-4d6a-bfa6-049c14905dc7",
"invoiced_amount": "1000.00",
"metadata": {
"campaign_id": 12394
},
"start_at": null,
"end_at": null,
"created_at": "2019-05-23T10:32:38.118753Z",
"notified_at": null,
"accepted_at": null
}
Many objects contain the identifier of a related object in their response properties. For example, a
Payout has an associated Employee identifier. Those objects can be
expanded inline with the expand
request parameter. Objects that can be expanded are noted in this documentation.
You can use the expand
param on any endpoint which includes expandable fields, including the create endpoints.
You can expand multiple objects at once by repeating the expand
request parameter.
Pagination
Request to retrieve two Employee objects per page, and the second page:
import requests
response = requests.get(
'https://api.gigapay.se/v2/employees/?page_size=2&page=2',
headers={
'Authorization': 'Token cd7a4537a231356d404b553f465b6af2fa035821',
'Integration-ID': '79606358-97af-4196-b64c-5f719433d56b'
}
)
curl -X GET -H 'Authorization: Token cd7a4537a231356d404b553f465b6af2fa035821' -H 'Integration-ID: 79606358-97af-4196-b64c-5f719433d56b' 'https://api.gigapay.se/v2/employees/?page_size=2&page=2'
fetch("https://api.gigapay.se/v2/employees/?page_size=2&page=2", {
method: "GET",
headers: {
Authorization: "Token cd7a4537a231356d404b553f465b6af2fa035821",
"Integration-Id": "79606358-97af-4196-b64c-5f719433d56b",
},
});
Returns a response formatted as such:
{
"count": 17,
"next": "https://api.gigapay.se/v2/employees/?page=3",
"previous": "https://api.gigapay.se/v2/employees/?page=1",
"results": [
{
"id": "1f1d1263-0e79-4787-b573-6df81b44bfc2",
"name": "Albin Lindskog",
"cellphone_number": "+46703000000",
"email": null,
"metadata": {
"user_id": 2
},
"created_at": "2019-05-20T15:33:08.974624Z",
"notified_at": "2019-05-20T15:33:12.581720Z",
"claimed_at": "2019-05-21T09:13:32.575721Z",
"verified_at": "2019-05-21T09:13:48.625263Z",
"invitation_code": null
},
{
"id": "25d2af38-59b9-4f73-9452-51787fed5c84",
"name": "Karl Karlsson",
"cellphone_number": null,
"email": "karl.karlsson@gmail.com",
"metadata": {
"user_id": 3
},
"created_at": "2019-05-20T15:33:08.974624Z",
"notified_at": "2019-05-20T15:33:12.581720Z",
"claimed_at": null,
"verified_at": null,
"invitation_code": "ABCD1234"
}
]
}
The Gigapay API uses pagination on all of its list-endpoints. These endpoints all share a common structure, optionally
accepting page
and a page_size
request parameter. page
specifies which page to return and page_size
the number
of objects per page. The objects returned are contained within the result
field of the response.
Filtering
Request to retrieve all non-accepted Payouts belonging to a specific Employee:
import requests
response = requests.get(
'https://api.gigapay.se/v2/payouts/?employee=12&accepted_at_null=True',
headers={
'Authorization': 'Token cd7a4537a231356d404b553f465b6af2fa035821',
'Integration-ID': '79606358-97af-4196-b64c-5f719433d56b'
}
)
curl -X GET -H 'Authorization: Token cd7a4537a231356d404b553f465b6af2fa035821' -H 'Integration-ID: 79606358-97af-4196-b64c-5f719433d56b' 'https://api.gigapay.se/v2/payouts/?employee=12&accepted_at_null=True'
fetch("https://api.gigapay.se/v2/payouts/?employee=12&accepted_at_null=True", {
method: "GET",
headers: {
Authorization: "Token cd7a4537a231356d404b553f465b6af2fa035821",
"Integration-Id": "79606358-97af-4196-b64c-5f719433d56b",
},
});
Returns a response formatted as such:
{
"count": 1,
"next": null,
"previous": null,
"results": [
{
"id": "0177270d-f94b-4ab9-88ba-ac1fa2f791aa",
"amount": "100.00",
"cost": "137.99",
"currency": "SEK",
"description": "Lön genom Gigapay",
"employee": "12",
"invoice": "bab4b830-47d6-4a24-a460-3289897f6e8e",
"metadata": {},
"start_at": null,
"end_at": null,
"created_at": "2019-05-22T10:32:38.118753Z",
"notified_at": "2019-05-22T10:38:19.874623Z",
"accepted_at": null
}
]
}
Request to retrieve all employees with string "skoog" in name, email or phone number:
import requests
response = requests.get(
'https://api.gigapay.se/v2/employees/?search=skoog',
headers={
'Authorization': 'Token cd7a4537a231356d404b553f465b6af2fa035821',
'Integration-ID': '79606358-97af-4196-b64c-5f719433d56b'
}
)
curl -X GET -H 'Authorization: Token cd7a4537a231356d404b553f465b6af2fa035821' -H 'Integration-ID: 79606358-97af-4196-b64c-5f719433d56b' 'https://api.gigapay.se/v2/employees/?search=skoog'
fetch("https://api.gigapay.se/v2/employees/?search=skoog", {
method: "GET",
headers: {
Authorization: "Token cd7a4537a231356d404b553f465b6af2fa035821",
"Integration-Id": "79606358-97af-4196-b64c-5f719433d56b",
},
});
Returns a response formatted as such:
{
"count": 2,
"next": null,
"previous": null,
"results": [
{
"id": "59cc997d-b4bc-4b2d-ac2d-0101ea9ba241",
"name": "Joakim Karlsson",
"cellphone_number": "+46703100002",
"email": "skoog@gigapay.co",
"country": "SWE",
"metadata": {},
"created_at": "2022-04-11T13:05:27.565954Z",
"notified_at": "2022-04-11T13:05:27.565954Z",
"claimed_at": "2022-04-11T13:05:27.565954Z",
"verified_at": "2022-04-11T14:05:27.565954Z",
"invitation_code": null
},
{
"id": "481c3138-5710-4086-9237-a082e87d624f",
"name": "Joakim Skoog",
"cellphone_number": "+46703100001",
"email": "joakims@gigapay.co",
"country": "SWE",
"metadata": {},
"created_at": "2022-04-11T13:05:27.543935Z",
"notified_at": "2022-04-11T13:05:27.543935Z",
"claimed_at": "2022-04-11T13:05:27.543935Z",
"verified_at": "2022-04-11T14:05:27.543935Z",
"invitation_code": null
}
]
}
Request to retrieve all payouts to employees with string "skoog" in name, email or phone number or with string "skoog" in the description of the payout:
import requests
response = requests.get(
'https://api.gigapay.se/v2/payouts/?search=skoog',
headers={
'Authorization': 'Token cd7a4537a231356d404b553f465b6af2fa035821',
'Integration-ID': '79606358-97af-4196-b64c-5f719433d56b'
}
)
curl -X GET -H 'Authorization: Token cd7a4537a231356d404b553f465b6af2fa035821' -H 'Integration-ID: 79606358-97af-4196-b64c-5f719433d56b' 'https://api.gigapay.se/v2/payouts/?search=skoog'
fetch("https://api.gigapay.se/v2/payouts/?search=skoog", {
method: "GET",
headers: {
"Authorization": "Token cd7a4537a231356d404b553f465b6af2fa035821",
"Integration-Id": "79606358-97af-4196-b64c-5f719433d56b"
}
}
Returns a response formatted as such:
{
"count": 3,
"next": null,
"previous": null,
"results": [
{
"id": "bfdac591-4bc5-45d3-9e93-27a885c8b130",
"cost": "1396.32",
"invoiced_amount": "1368.95",
"amount": "1000.00",
"currency": "SEK",
"description": "Test",
"metadata": {},
"start_at": null,
"end_at": null,
"created_at": "2022-04-14T08:31:11.773275Z",
"notified_at": null,
"accepted_at": null,
"employee": {
"id": "411246da-0b59-41c6-8b87-1e5abb73af30",
"name": "Kalle Karlsson",
"cellphone_number": "+46703100003",
"email": "skoog@gigapay.co",
"country": "SWE",
"metadata": {},
"created_at": "2022-04-14T08:31:11.741713Z",
"notified_at": "2022-04-14T08:31:11.741713Z",
"claimed_at": "2022-04-14T08:31:11.741713Z",
"verified_at": "2022-04-14T09:31:11.741713Z",
"invitation_code": null
},
"invoice": "f4377884-e4c0-4e65-bbd1-24f52973b933",
"full_salary_specification": false
},
{
"id": "1bc53e19-3589-4f92-aece-360006cfe196",
"cost": "1396.32",
"invoiced_amount": "1368.95",
"amount": "1000.00",
"currency": "SEK",
"description": "Test",
"metadata": {},
"start_at": null,
"end_at": null,
"created_at": "2022-04-14T08:31:11.763167Z",
"notified_at": null,
"accepted_at": null,
"employee": {
"id": "411246da-0b59-41c6-8b87-1e5abb73af30",
"name": "Kalle Karlsson",
"cellphone_number": "+46703100003",
"email": "skoog@gigapay.co",
"country": "SWE",
"metadata": {},
"created_at": "2022-04-14T08:31:11.741713Z",
"notified_at": "2022-04-14T08:31:11.741713Z",
"claimed_at": "2022-04-14T08:31:11.741713Z",
"verified_at": "2022-04-14T09:31:11.741713Z",
"invitation_code": null
},
"invoice": "b749b0fd-a82a-4644-a7c8-e89ae891cc23",
"full_salary_specification": false
},
{
"id": "bf216a95-0560-46c8-b9c7-0d15850aea23",
"cost": "1396.32",
"invoiced_amount": "1368.95",
"amount": "1000.00",
"currency": "SEK",
"description": "Test",
"metadata": {},
"start_at": null,
"end_at": null,
"created_at": "2022-04-14T08:31:11.755175Z",
"notified_at": null,
"accepted_at": null,
"employee": {
"id": "1fa40cc7-a2c9-43ab-972f-eb322bded992",
"name": "Joakim Skoog",
"cellphone_number": "+46703100002",
"email": "joakim@gigapay.co",
"country": "SWE",
"metadata": {},
"created_at": "2022-04-14T08:31:11.707438Z",
"notified_at": "2022-04-14T08:31:11.707438Z",
"claimed_at": "2022-04-14T08:31:11.707438Z",
"verified_at": "2022-04-14T09:31:11.707438Z",
"invitation_code": null
},
"invoice": "e5647953-4df7-4166-9066-f9dea11b66f3",
"full_salary_specification": false
}
]
}
The Gigapay API supports filtering on all of its list-endpoints. These filters are of two types, either relational filters or timestamp filters. Which filters are available are described under each endpoint.
Relational filters filter out all objects belonging to a specified object.
They are use the format {field_name}={object_id}
.
Timestamp filters are used to filter out objects having had a certain event associated with them. They can be used to
filter on whether an event has occurred with the null
suffix, e.g. {field_name}_null={Bool}
, or when, by using the
_before
and _after
suffix, e.g. {field_name}_before={ISO 8601 string}
.
Idempotency
Registering an Employee with an idempotency key
import requests
response = requests.post(
'https://api.gigapay.se/v2/employees/',
json={
'name': 'Albin Lindskog',
'cellphone_number': '+4670000000',
'country': 'SWE',
},
headers={
'Authorization': 'Token cd7a4537a231356d404b553f465b6af2fa035821',
'Idempotency-Key': 'afjkakkknbkasaskkaksdakjdnsakja',
'Integration-ID': '79606358-97af-4196-b64c-5f719433d56b'
}
)
curl -X POST -H 'Authorization: Token cd7a4537a231356d404b553f465b6af2fa035821' -H 'Content-Type: application/json' -H 'Idempotency-Key': 'afjkakkknbkasaskkaksdakjdnsakja' -H 'Integration-ID: 79606358-97af-4196-b64c-5f719433d56b' -d '{"name": "Albin Lindskog", "cellphone_number": "+4670000001", "country": "SWE"}' https://api.gigapay.se/v2/employees/
fetch("https://api.gigapay.se/v2/employees/", {
method: "POST",
body: JSON.stringify({
name: "Albin Lindskog",
cellphone_number: "+4670000000",
country: "SWE",
}),
headers: {
Authorization: "Token cd7a4537a231356d404b553f465b6af2fa035821",
"Content-Type": "application/json",
"Idempotency-Key": "afjkakkknbkasaskkaksdakjdnsakja",
"Integration-Id": "79606358-97af-4196-b64c-5f719433d56b",
},
});
The Gigapay API supports idempotency to safely retry requests without accidentally performing the same operation twice. Gigapay offers two mechanism of idempotency; idempotency keys and object ids.
To perform an idempotent request using an idempotency-key, provide the additional Idempotency-Key
header to the
request. Idempotency keys works by storing the responses of previous requests. Subsequent requests with the same key
return the same response, without performing the action specified in the request. Keys expire after 24 hours, so a new
response is generated if a key is reused outside that timeframe.
Registering an Employee with a specific id
import requests
response = requests.post(
'https://api.gigapay.se/v2/employees/',
json={
'id': 19472,
'name': 'Albin Lindskog',
'cellphone_number': '+4670000000',
'country': 'SWE',
},
headers={
'Authorization': 'Token cd7a4537a231356d404b553f465b6af2fa035821',
'Integration-ID': '79606358-97af-4196-b64c-5f719433d56b'
}
)
curl -X POST -H 'Authorization: Token cd7a4537a231356d404b553f465b6af2fa035821' -H 'Content-Type: application/json' -H 'Idempotency-Key': 'afjkakkknbkasaskkaksdakjdnsakja' -H 'Integration-ID: 79606358-97af-4196-b64c-5f719433d56b' -d '{"id": 19472, "name": "Albin Lindskog", "cellphone_number": "+4670000001", "country": "SWE"}' https://api.gigapay.se/v2/employees/
fetch("https://api.gigapay.se/v2/employees/", {
method: "POST",
body: JSON.stringify({
id: 19472,
name: "Albin Lindskog",
cellphone_number: "+4670000000",
country: "SWE",
}),
headers: {
Authorization: "Token cd7a4537a231356d404b553f465b6af2fa035821",
"Content-Type": "application/json",
"Integration-Id": "79606358-97af-4196-b64c-5f719433d56b",
},
});
To perform an idempotent request using an object id simply specify the id when creating the object. Object ids ensure idempotency when creating object as no objects can have the same id. Subsequent requests with the same id will return an error. The uniqueness of an id is guaranteed for the lifetime of the object.
Metadata
Registering an Employee with metadata:
import requests
response = requests.post(
'https://api.gigapay.se/v2/employees/',
json={
'name': 'Albin Lindskog',
'cellphone_number': '+4670000000',
'country': 'SWE',
'metadata': {
'user_id': 1847,
},
},
headers={
'Authorization': 'Token cd7a4537a231356d404b553f465b6af2fa035821',
'Integration-ID': '79606358-97af-4196-b64c-5f719433d56b'
}
)
curl -X POST -H 'Authorization: Token cd7a4537a231356d404b553f465b6af2fa035821' -H 'Content-Type: application/json' -H 'Integration-ID: 79606358-97af-4196-b64c-5f719433d56b' -d '{"name": "Albin Lindskog", "cellphone_number": "+4670000001", "country": "SWE", "metadata": {"user_id": 1847}}' https://api.gigapay.se/v2/employees/
fetch("https://api.gigapay.se/v2/employees/", {
method: "POST",
body: JSON.stringify({
name: "Albin Lindskog",
cellphone_number: "+4670000000",
country: "SWE",
metadata: {
user_id: 1847,
},
}),
headers: {
Authorization: "Token cd7a4537a231356d404b553f465b6af2fa035821",
"Content-Type": "application/json",
"Integration-Id": "79606358-97af-4196-b64c-5f719433d56b",
},
});
Response:
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "Albin Lindskog",
"email": null,
"cellphone_number": "+46703000000",
"country": "SWE",
"metadata": {
"user_id": 1847
},
"created_at": "2019-05-22T10:32:36.118753Z",
"notified_at": null,
"claimed_at": null,
"verified_at": null,
"invitation_code": "ABCD1234"
}
All objects in the Gigapay API have a metadata
attribute. You can use this attribute to attach any
JSON-serializable data to these objects. It is useful for storing additional information about an object. For example,
you could store a unique identifier for an Employee in your system. This data is not used by Gigapay, and will not be
displayed to any users.
The Payout object also has a description
field. It should contain a human-readable description of why
this Payout is being made. Unlike metadata
, description
is a single string, and the Employee will see it.
Registrations
A registration holds all the necessary legal and contact information for a company. The registration object represents the onboarding state of a company, from creation (onboarding started) to approved (onboarding complete).
Once a registration is submitted (object created), it will be reviewed by the Gigapay team. Upon approval, an Integration
is automatically created with the same id as the integration_id
specified in the object.
You can always create and view registrations associated with your account. You can also update and delete registrations as long as the registrations has not been approved yet.
The Registration object
An example Registration object:
{
"id": "1f2c22ed-88e5-457d-b9a8-2ab511d5a8d9",
"integration_id": "b6e1a18b-621b-465c-9371-9b9344c2b9c8",
"needs_review": false,
"tin_number": "18785153",
"vat_number": "DK18785153",
"registered_name": "Zerebra AB",
"friendly_name": "Zerebra AB",
"address_line_1": "Malmvägen 8",
"address_line_2": "",
"state": null,
"zip_code": "14171",
"city": "Segeltorp",
"email": "faktura@zerebra.com",
"phone_number": "+46703000000",
"country": "DNK",
}
Attribute | Description |
---|---|
id |
A unique identifier for the registration object. |
integration_id |
A unique identifier for the integration object that will be created from this registration. If not provided during creation, it will be auto-generated. This ID must be unique for each registration managed by a user. |
email |
The contact email address for the company. |
phone_number |
The contact phone number for the company. |
friendly_name |
The company's display name or brand name. |
registered_name |
The legally registered name of the company. |
tin_number |
The company's Tax Identification Number. |
vat_number |
The company's Value Added Tax number, if applicable. |
country |
The 3-letter ISO code for the country where the company is registered. Cannot be 'SWE'. |
state |
The state, province, or territory, where applicable (e.g., for US, CA, AU). |
address_line_1 |
The primary line of the company's address. |
address_line_2 |
The secondary line of the company's address. |
zip_code |
The postal or zip code for the company's address. |
city |
The city for the company's address. |
needs_review |
A read-only flag indicating if the registration is pending review by Gigapay. |
List All Registrations
import requests
response = requests.get(
'https://api.gigapay.se/v2/registrations/',
headers={
'Authorization': 'Token cd7a4537a231356d404b553f465b6af2fa035821',
}
)
curl -X GET -H 'Authorization: Token cd7a4537a231356d404b553f465b6af2fa035821' https://api.gigapay.se/v2/registrations/
fetch("https://api.gigapay.se/v2/registrations/", {
headers: {
"Authorization": "Token cd7a4537a231356d404b553f465b6af2fa035821",
}
})
The above command returns JSON structured like this:
{
"count": 2,
"next": null,
"previous": "https://api.gigapay.se/v2/registrations/?page=1",
"results": [
{
"id": "1f2c22ed-88e5-457d-b9a8-2ab511d5a8d9",
"integration_id": "b6e1a18b-621b-465c-9371-9b9344c2b9c8",
"needs_review": false,
"tin_number": "18785153",
"vat_number": "DK18785153",
"registered_name": "Zerebra AB",
"friendly_name": "Zerebra AB",
"address_line_1": "Malmvägen 8",
"address_line_2": "",
"state": null,
"zip_code": "14171",
"city": "Segeltorp",
"email": "faktura@zerebra.com",
"phone_number": "+46703000000",
"country": "DNK",
},
{
"id": "8347fdd5-688d-4267-ae42-864b34a4220b",
"integration_id": "cc7e24d0-5e43-4bd5-806a-27b0df5f419a",
"needs_review": true,
"tin_number": "18785161",
"vat_number": "DK18785161",
"registered_name": "Zebrebra AB",
"friendly_name": "Zebrebra AB",
"address_line_1": "Malmövägen 8",
"address_line_2": "",
"state": null,
"zip_code": "14172",
"city": "Segeltorps",
"email": "faktura@zebrebra.com",
"phone_number": "+46703000001",
"country": "DNK",
},
]
}
This endpoint retrieves all Registrations.
HTTP Request
GET https://api.gigapay.se/v2/registrations/
Headers
Parameter | Required | Description |
---|---|---|
Authorization |
True | Your Authorization Token. |
Query Parameters
Parameter | Default | Description |
---|---|---|
page |
1 | Which page to return. |
page_size |
25 | The number of Registrations per page. |
Register a Registration
import requests
response = requests.post(
'https://api.gigapay.se/v2/registrations/',
json={
'integration_id': "e50d4871-a3e0-4a41-b99a-6c7d4acd07c6",
'email': 'contact@example.com',
'phone_number': '+4570123456',
'tin_number': '18785161',
'vat_number': 'DK18785161',
'registered_name': 'Example Company ApS',
'friendly_name': 'Example Company',
'address_line_1': 'Nørrebrogade 20',
'zip_code': '2200',
'city': 'Copenhagen',
'country': 'DNK',
},
headers={
'Authorization': 'Token cd7a4537a231356d404b553f465b6af2fa035821',
}
)
curl -X POST -H 'Authorization: Token cd7a4537a231356d404b553f465b6af2fa035821' -H 'Content-Type: application/json' -d '{
"integration_id": "e50d4871-a3e0-4a41-b99a-6c7d4acd07c6",
"email": "contact@example.com",
"phone_number": "+4570123456",
"tin_number": "18785161",
"vat_number": "DK18785161",
"registered_name": "Example Company ApS",
"friendly_name": "Example Company",
"address_line_1": "Nørrebrogade 20",
"zip_code": "2200",
"city": "Copenhagen",
"country": "DNK"
}' https://api.gigapay.se/v2/registrations/
fetch("https://api.gigapay.se/v2/registrations/", {
method: "POST",
body: JSON.stringify({
integration_id: "e50d4871-a3e0-4a41-b99a-6c7d4acd07c6",
email: 'contact@example.com',
phone_number: '+4570123456',
tin_number: '18785161',
vat_number: 'DK18785161',
registered_name: 'Example Company ApS',
friendly_name: 'Example Company',
address_line_1: 'Nørrebrogade 20',
zip_code: '2200',
city: 'Copenhagen',
country: 'DNK',
}),
headers: {
"Authorization": "Token cd7a4537a231356d404b553f465b6af2fa035821",
"Content-Type": "application/json",
}
})
The above command returns JSON structured like this:
{
"id": "e50d4871-a3e0-4a41-b99a-6c7d4acd07c6",
"integration_id": "e50d4871-a3e0-4a41-b99a-6c7d4acd07c6",
"needs_review": true,
"tin_number": "12345658",
"vat_number": "DK12345658",
"registered_name": "Example Company ApS",
"friendly_name": "Example Company",
"address_line_1": "Nørrebrogade 20",
"address_line_2": "",
"state": null,
"zip_code": "2200",
"city": "Copenhagen",
"email": "contact@example.com",
"phone_number": "+4570123456",
"country": "DNK"
}
This endpoint creates a Registration.
HTTP Request
POST https://api.gigapay.se/v2/registrations/
Headers
Parameter | Required | Description |
---|---|---|
Authorization |
True | Your Authorization Token. |
Body Parameters
Parameter | Type | Required | Default | Notes |
---|---|---|---|---|
integration_id |
String | False | uuid4() | Unique per registration. Also, user cannot have more than one integration with the same integration_id . |
email |
String | True | ||
phone_number |
String | True | ||
friendly_name |
String | True | ||
registered_name |
String | True | ||
tin_number |
String | True | Must be a valid number for the country. | |
vat_number |
String | False | Must be a valid number for the country. Will return an error if required for the supplied country. | |
country |
String | True | Cannot be 'SWE'. | |
state |
String | False | Only required for countries that have states, provinces, or territories (e.g., for US, CA, AU). | |
address_line_1 |
String | True | ||
address_line_2 |
String | False | ||
zip_code |
String | True | ||
city |
String | True |
Retrieve a Registration
import requests
response = requests.get(
'https://api.gigapay.se/v2/registrations/8347fdd5-688d-4267-ae42-864b34a4220b/',
headers={
'Authorization': 'Token cd7a4537a231356d404b553f465b6af2fa035821'
}
)
curl -X GET -H 'Authorization: Token cd7a4537a231356d404b553f465b6af2fa035821' https://api.gigapay.se/v2/registrations/8347fdd5-688d-4267-ae42-864b34a4220b/
fetch("https://api.gigapay.se/v2/registrations/8347fdd5-688d-4267-ae42-864b34a4220b/", {
headers: {
"Authorization": "Token cd7a4537a231356d404b553f465b6af2fa035821"
}
})
The above command returns JSON structured like this:
{
"id": "8347fdd5-688d-4267-ae42-864b34a4220b",
"integration_id": "cc7e24d0-5e43-4bd5-806a-27b0df5f419a",
"needs_review": true,
"tin_number": "18785161",
"vat_number": "DK18785161",
"registered_name": "Zebrebra AB",
"friendly_name": "Zebrebra AB",
"address_line_1": "Malmövägen 8",
"address_line_2": "",
"state": null,
"zip_code": "14172",
"city": "Segeltorps",
"email": "faktura@zebrebra.com",
"phone_number": "+46703000001",
"country": "DNK"
}
This endpoint retrieves a Registration.
HTTP Request
GET https://api.gigapay.se/v2/registrations/:id/
Headers
Parameter | Required | Description |
---|---|---|
Authorization |
True | Your Authorization Token. |
URL Parameters
Parameter | Required | Description |
---|---|---|
id |
True | Unique identifier for the object. |
Update a Registration
import requests
response = requests.patch(
'https://api.gigapay.se/v2/registrations/8347fdd5-688d-4267-ae42-864b34a4220b/',
json={
'friendly_name': 'Zerebra Inc.',
'email': 'billing@zerebra.com'
},
headers={
'Authorization': 'Token cd7a4537a231356d404b553f465b6af2fa035821'
}
)
curl -X PATCH -H 'Authorization: Token cd7a4537a231356d404b553f465b6af2fa035821' -H 'Content-Type: application/json' -d '{"friendly_name": "Zerebra Inc.", "email": "billing@zerebra.com"}' https://api.gigapay.se/v2/registrations/8347fdd5-688d-4267-ae42-864b34a4220b/
fetch("https://api.gigapay.se/v2/registrations/8347fdd5-688d-4267-ae42-864b34a4220b/", {
method: "PATCH",
body: JSON.stringify({'friendly_name': 'Zerebra Inc.', 'email': 'billing@zerebra.com'}),
headers: {
"Authorization": "Token cd7a4537a231356d404b553f465b6af2fa035821",
"Content-Type": "application/json"
},
})
The above command returns JSON structured like this:
{
"id": "8347fdd5-688d-4267-ae42-864b34a4220b",
"integration_id": "cc7e24d0-5e43-4bd5-806a-27b0df5f419a",
"needs_review": true,
"tin_number": "18785161",
"vat_number": "DK18785161",
"registered_name": "Zebrebra AB",
"friendly_name": "Zerebra Inc.",
"address_line_1": "Malmövägen 8",
"address_line_2": "",
"state": null,
"zip_code": "14172",
"city": "Segeltorps",
"email": "billing@zerebra.com",
"phone_number": "+46703000001",
"country": "DNK"
}
This endpoint updates a Registration.
A registration can only be updated if the needs_review
field is set to true
, meaning the registration has not been approved yet.
HTTP Request
PATCH https://api.gigapay.se/v2/registrations/:id/
Headers
Parameter | Required | Description |
---|---|---|
Authorization |
True | Your Authorization Token. |
URL Parameters
Parameter | Required | Description |
---|---|---|
id |
True | Unique identifier for the object. |
Body Parameters
Parameter | Type | Required | Default | Notes |
---|---|---|---|---|
integration_id |
String | False | uuid4() | Unique per registration. Also, user cannot have more than one integration with the same integration_id . |
email |
String | True | ||
phone_number |
String | True | ||
friendly_name |
String | True | ||
registered_name |
String | True | ||
tin_number |
String | True | Must be a valid number for the country. | |
vat_number |
String | False | Must be a valid number for the country. Will return an error if required for the supplied country. | |
country |
String | True | Cannot be 'SWE'. | |
state |
String | False | Only required for countries that have states, provinces, or territories (e.g., for US, CA, AU). | |
address_line_1 |
String | True | ||
address_line_2 |
String | False | ||
zip_code |
String | True | ||
city |
String | True |
Replace a Registration
import requests
response = requests.put(
'https://api.gigapay.se/v2/registrations/8347fdd5-688d-4267-ae42-864b34a4220b/',
json={
'integration_id': "cc7e24d0-5e43-4bd5-806a-27b0df5f419a",
'email': 'billing@example.com',
'phone_number': '+4570987654',
'tin_number': '18785161',
'vat_number': 'DK18785161',
'registered_name': 'Example Company ApS',
'friendly_name': 'Example Company',
'address_line_1': 'Vesterbrogade 40',
'zip_code': '1620',
'city': 'Copenhagen',
'country': 'DNK',
},
headers={
'Authorization': 'Token cd7a4537a231356d404b553f465b6af2fa035821'
}
)
curl -X PUT -H 'Authorization: Token cd7a4537a231356d404b553f465b6af2fa035821' -H 'Content-Type: application/json' -d '{
"integration_id": "cc7e24d0-5e43-4bd5-806a-27b0df5f419a",
"email": "billing@example.com",
"phone_number": "+4570987654",
"tin_number": "18785161",
"vat_number": "DK18785161",
"registered_name": "Example Company ApS",
"friendly_name": "Example Company",
"address_line_1": "Vesterbrogade 40",
"zip_code": "1620",
"city": "Copenhagen",
"country": "DNK"
}' https://api.gigapay.se/v2/registrations/8347fdd5-688d-4267-ae42-864b34a4220b/
fetch("https://api.gigapay.se/v2/registrations/8347fdd5-688d-4267-ae42-864b34a4220b/", {
method: "PUT",
body: JSON.stringify({
integration_id: "cc7e24d0-5e43-4bd5-806a-27b0df5f419a",
email: 'billing@example.com',
phone_number: '+4570987654',
tin_number: '18785161',
vat_number: 'DK18785161',
registered_name: 'Example Company ApS',
friendly_name: 'Example Company',
address_line_1: 'Vesterbrogade 40',
zip_code: '1620',
city: 'Copenhagen',
country: 'DNK',
}),
headers: {
"Authorization": "Token cd7a4537a231356d404b553f465b6af2fa035821",
"Content-Type": "application/json"
}
})
The above command returns JSON structured like this:
{
"id": "8347fdd5-688d-4267-ae42-864b34a4220b",
"integration_id": "cc7e24d0-5e43-4bd5-806a-27b0df5f419a",
"needs_review": true,
"tin_number": "18785161",
"vat_number": "DK18785161",
"registered_name": "Example Company ApS",
"friendly_name": "Example Company",
"address_line_1": "Vesterbrogade 40",
"address_line_2": "",
"state": null,
"zip_code": "1620",
"city": "Copenhagen",
"email": "billing@example.com",
"phone_number": "+4570987654",
"country": "DNK"
}
This endpoint replaces a Registration completely.
A registration can only be replaced if the needs_review
field is set to true
, meaning the registration has not been approved yet.
HTTP Request
PUT https://api.gigapay.se/v2/registrations/:id/
Headers
Parameter | Required | Description |
---|---|---|
Authorization |
True | Your Authorization Token. |
URL Parameters
Parameter | Required | Description |
---|---|---|
id |
True | Unique identifier for the object. |
Body Parameters
Parameter | Type | Required | Default | Notes |
---|---|---|---|---|
integration_id |
String | False | uuid4() | Unique per registration. |
email |
String | True | ||
phone_number |
String | True | ||
friendly_name |
String | True | ||
registered_name |
String | True | ||
tin_number |
String | True | Must be a valid number for the country. | |
vat_number |
String | False | Must be a valid number for the country. Will return an error if required for the supplied country. | |
country |
String | True | Cannot be 'SWE'. | |
state |
String | False | Only required for countries that have states, provinces, or territories (e.g., for US, CA, AU). | |
address_line_1 |
String | True | ||
address_line_2 |
String | False | ||
zip_code |
String | True | ||
city |
String | True |
Delete a Registration
import requests
response = requests.delete(
'https://api.gigapay.se/v2/registrations/8347fdd5-688d-4267-ae42-864b34a4220b/',
headers={
'Authorization': 'Token cd7a4537a231356d404b553f465b6af2fa035821'
}
)
curl -X DELETE -H 'Authorization: Token cd7a4537a231356d404b553f465b6af2fa035821' https://api.gigapay.se/v2/registrations/8347fdd5-688d-4267-ae42-864b34a4220b/
fetch("https://api.gigapay.se/v2/registrations/8347fdd5-688d-4267-ae42-864b34a4220b/", {
method: "DELETE",
headers: {
"Authorization": "Token cd7a4537a231356d404b553f465b6af2fa035821"
}
})
The above command returns an empty response.
This endpoint deletes a Registration.
A registration can only be deleted if the needs_review
field is set to true
, meaning the registration has not been approved yet.
HTTP Request
DELETE https://api.gigapay.se/v2/registrations/:id/
Headers
Parameter | Required | Description |
---|---|---|
Authorization |
True | Your Authorization Token. |
URL Parameters
Parameter | Required | Description |
---|---|---|
id |
True | Unique identifier for the object. |
Approve a Registration (Demo Only)
import requests
response = requests.post(
'https://api.gigapay.se/v2/registrations/8347fdd5-688d-4267-ae42-864b34a4220b/approve/',
headers={
'Authorization': 'Token cd7a4537a231356d404b553f465b6af2fa035821'
}
)
curl -X POST -H 'Authorization: Token cd7a4537a231356d404b553f465b6af2fa035821' https://api.gigapay.se/v2/registrations/8347fdd5-688d-4267-ae42-864b34a4220b/approve/
fetch("https://api.gigapay.se/v2/registrations/8347fdd5-688d-4267-ae42-864b34a4220b/approve/", {
method: "POST",
headers: {
"Authorization": "Token cd7a4537a231356d404b553f465b6af2fa035821"
}
})
The above command returns JSON structured like this:
{
"id": "8347fdd5-688d-4267-ae42-864b34a4220b",
"integration_id": "cc7e24d0-5e43-4bd5-806a-27b0df5f419a",
"needs_review": false,
"tin_number": "18785161",
"vat_number": "DK18785161",
"registered_name": "Zebrebra AB",
"friendly_name": "Zebrebra AB",
"address_line_1": "Malmövägen 8",
"address_line_2": "",
"state": null,
"zip_code": "14172",
"city": "Segeltorps",
"email": "faktura@zebrebra.com",
"phone_number": "+46703000001",
"country": "DNK"
}
This endpoint approves a Registration and is only available in demo environments. In production, registrations are reviewed and approved by the Gigapay team.
When a registration is approved using this endpoint, the needs_review
field is set to false
and an Integration
is automatically created with the same id as the integration_id
specified in the registration.
HTTP Request
POST https://api.gigapay.se/v2/registrations/:id/approve/
Headers
Parameter | Required | Description |
---|---|---|
Authorization |
True | Your Authorization Token. |
URL Parameters
Parameter | Required | Description |
---|---|---|
id |
True | Unique identifier for the registration to approve. |
Integrations
Integrations are the parent object of all other objects in the Gigapay API. All other objects are separated per
Integration, when operating on these objects you thus need to specify which integration you are acting as by providing
the Integration-ID
header.
The Integration object
An example Integration object:
{
"id": "1",
"name": "Zerebra AB",
"type": 1,
"logo": "https://gigapay.ams3.digitaloceanspaces.com/gigapay/zerebra_logo.png",
"metadata": {},
"email": "faktura@zerebra.com",
"recipient": "Zerebra AB",
"address_line_1": "Svartmangatan 18",
"address_line_2": null,
"zip_code": "11129"
}
Attribute | Description |
---|---|
id |
Unique identifier for the object. |
name |
Name of integration, presented to Employees. |
type |
Type of integrations. |
logo |
Image of logo to use, presented to Employees. |
metadata |
JSON-encoded metadata. |
email |
Email address to send invoices to. |
recipient |
Name of recipient written on invoices. |
address_line_1 |
Address line 1 written on invoices. |
address_line_2 |
Address line 2 written on invoices. |
zip_code |
Zip code written on invoices |
city |
City written on invoices. |
List All Integrations
import requests
response = requests.get(
'https://api.gigapay.se/v2/integrations/',
headers={
'Authorization': 'Token cd7a4537a231356d404b553f465b6af2fa035821',
}
)
curl -X GET -H 'Authorization: Token cd7a4537a231356d404b553f465b6af2fa035821' https://api.gigapay.se/v2/integrations/
fetch("https://api.gigapay.se/v2/integrations/", {
headers: {
"Authorization": "Token cd7a4537a231356d404b553f465b6af2fa035821",
}
})
The above command returns JSON structured like this:
{
"count": 4,
"next": null,
"previous": "https://api.gigapay.se/v2/integrations/?page=2",
"results": [
{
"id": "1",
"name": "Zerebra AB",
"type": 1,
"logo": "https://gigapay.ams3.digitaloceanspaces.com/gigapay/zerebra_logo.png",
"metadata": {},
"email": "faktura@zerebra.com",
"recipient": "Zerebra AB",
"address_line_1": "Svartmangatan 18",
"address_line_2": null,
"zip_code": "11129"
}, {
"id": "1",
"name": "Zerebra AB Gig",
"type": 3,
"logo": "https://gigapay.ams3.digitaloceanspaces.com/gigapay/zerebra_logo.png",
"metadata": {},
"email": "faktura+gig@zerebra.com",
"recipient": "Zerebra AB",
"address_line_1": "Svartmangatan 18",
"address_line_2": null,
"zip_code": "11129"
},
]
}
This endpoint retrieves all integrations.
HTTP Request
GET https://api.gigapay.se/v2/integrations/
Headers
Parameter | Required | Description |
---|---|---|
Authorization |
True | Your Authorization Token. |
Query Parameters
Parameter | Default | Description |
---|---|---|
page |
1 | Which page to return. |
page_size |
25 | The number of Integrations per page. |
type |
Filter based on type. |
Retrieve an Integration
import requests
response = requests.get(
'https://api.gigapay.se/v2/integrations/846291712/',
headers={
'Authorization': 'Token cd7a4537a231356d404b553f465b6af2fa035821',
}
)
curl -X GET -H 'Authorization: Token cd7a4537a231356d404b553f465b6af2fa035821' https://api.gigapay.se/v2/integrations/846291712/
fetch("https://api.gigapay.se/v2/integrations/846291712/", {
headers: {
"Authorization": "Token cd7a4537a231356d404b553f465b6af2fa035821",
}
})
The above command returns JSON structured like this:
{
"id": "846291712",
"name": "Pinestreet Tech",
"type": 3,
"logo": "https://gigapay.ams3.digitaloceanspaces.com/gigapay/pinestreet_logo.png",
"metadata": {},
"email": "albin@pinestreet.tech",
"recipient": "Pinestreet Technology AB",
"address_line_1": "Malmvägen 8",
"address_line_2": null,
"zip_code": "14171",
"city": "Segeltorp"
}
This endpoint retrieves an Integration.
HTTP Request
GET https://api.gigapay.se/v2/integrations/:id/
Headers
Parameter | Required | Description |
---|---|---|
Authorization |
True | Your Authorization Token. |
URL Parameters
Parameter | Required | Description |
---|---|---|
id |
True | Unique identifier for the object. |
Update an Integration
import requests
response = requests.patch(
'https://api.gigapay.se/v2/integrations/846291712/',
json={
'email': 'invoice@pinestreet.tech'
},
headers={
'Authorization': 'Token cd7a4537a231356d404b553f465b6af2fa035821',
}
)
curl -X PATCH -H 'Authorization: Token cd7a4537a231356d404b553f465b6af2fa035821' -H 'Content-Type: application/json' -d '{"email": "invoice@pinestreet.tech"} https://api.gigapay.se/v2/integrations/846291712/
fetch("https://api.gigapay.se/v2/integrations/846291712/", {
method: "PATCH",
body: JSON.stringify({'email': 'invoice@pinestreet.tech'}),
headers: {
"Authorization": "Token cd7a4537a231356d404b553f465b6af2fa035821",
"Content-Type": "application/json",
},
})
The above command returns JSON structured like this:
{
"id": "846291712",
"name": "Pinestreet Tech",
"type": 3,
"logo": "https://gigapay.ams3.digitaloceanspaces.com/gigapay/pinestreet_logo.png",
"metadata": {},
"email": "albin@pinestreet.tech",
"recipient": "Pinestreet Technology AB",
"address_line_1": "Malmvägen 8",
"address_line_2": null,
"zip_code": "14171",
"city": "Segeltorp"
}
This endpoint updates an integration. You may not update Integrations of type 2.
HTTP Request
PATCH https://api.gigapay.se/v2/integrations/:id/
This endpoints supports both JSON and multipart/form-data encoded requests, to facilitate uploading a logo file.
Only examples with JSON-encoded payload and base64-encoded images are provided, though.
Headers
Parameter | Required | Description |
---|---|---|
Authorization |
True | Your Authorization Token. |
URL Parameters
Parameter | Required | Description |
---|---|---|
id |
True | Unique identifier for the object. |
Body Parameters
Parameter | Type | Required | Default | Notes |
---|---|---|---|---|
id |
String | False | Previous value | Globally unique. |
name |
String | False | Previous value | |
logo |
Image | False | Previous value | base64 or multipart/form-data encoded image file. |
metadata |
Object | False | Previous value | |
email |
String | False | Previous value | |
recipient |
String | False | Previous value | |
address_line_1 |
Object | False | Previous value | |
address_line_2 |
String | False | Previous value | |
zip_code |
String | False | Previous value | |
city |
String | False | Previous value |
Replace an Integration
import requests
response = requests.put(
'https://api.gigapay.se/v2/integrations/846291712/',
json={
"address_line_1": "Malmvägen 8",
"city": "Segeltorp",
"email": "albin@pinestreet.tech",
"id": "846291712",
"logo": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEUAAACnej3aAAAAAXRSTlMAQObYZgAAAApJREFUCNdjYAAAAAIAAeIhvDMAAAAASUVORK5CYII=",
"name": "Pinestreet Tech",
"recipient": "Pinestreet Technology AB",
"zip_code": "14171",
},
headers={
'Authorization': 'Token cd7a4537a231356d404b553f465b6af2fa035821',
}
)
curl -X PUT -H 'Authorization: Token cd7a4537a231356d404b553f465b6af2fa035821' -H 'Content-Type: application/json' -d '{"address_line_1": "Malmv\u00e4gen 8", "city": "Segeltorp", "email": "albin@pinestreet.tech", "id": "846291712", "logo": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEUAAACnej3aAAAAAXRSTlMAQObYZgAAAApJREFUCNdjYAAAAAIAAeIhvDMAAAAASUVORK5CYII=", "name": "Pinestreet Tech", "recipient": "Pinestreet Technology AB", "zip_code": "14171"}' https://api.gigapay.se/v2/integrations/846291712/```
fetch("https://api.gigapay.se/v2/integrations/846291712/", {
method: "PUT",
body: JSON.stringify({
address_line_1: "Malmvägen 8",
city: "Segeltorp",
email: "albin@pinestreet.tech",
id: "846291712",
logo: "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEUAAACnej3aAAAAAXRSTlMAQObYZgAAAApJREFUCNdjYAAAAAIAAeIhvDMAAAAASUVORK5CYII=",
name: "Pinestreet Tech",
recipient: "Pinestreet Technology AB",
zip_code: "14171",
}),
headers: {
Authorization: "Token cd7a4537a231356d404b553f465b6af2fa035821",
},
})
The above command returns JSON structured like this:
{
"id": "846291712",
"name": "Pinestreet Tech",
"type": 3,
"logo": "https://gigapay.ams3.digitaloceanspaces.com/gigapay/pinestreet_logo.png",
"metadata": {},
"email": "albin@pinestreet.tech",
"recipient": "Pinestreet Technology AB",
"address_line_1": "Malmvägen 8",
"address_line_2": null,
"zip_code": "14171",
"city": "Segeltorp"
}
This endpoint replaces an Integration. You may not replace Integrations of type 2.
HTTP Request
PUT https://api.gigapay.se/v2/integrations/:id/
This endpoints supports both JSON and multipart/form-data encoded requests, to facilitate uploading a logo file.
Only examples with JSON-encoded payload and base64-encoded images are provided, though.
Headers
Parameter | Required | Description |
---|---|---|
Authorization |
True | Your Authorization Token. |
Integration-ID |
True | Integration id. |
URL Parameters
Parameter | Required | Description |
---|---|---|
id |
True | Unique identifier for the object. |
Parameter | Type | Required | Default | Notes |
---|---|---|---|---|
id |
String | False | uuid4() | Globally unique. |
name |
String | True | ||
logo |
Image | False | null | base64 or multipart/form-data encoded image file. |
metadata |
Object | False | {} | |
email |
String | True | ||
recipient |
String | True | ||
address_line_1 |
Object | True | ||
address_line_2 |
String | False | null | |
zip_code |
String | True | ||
city |
String | True |
Delete an Integration
import requests
response = requests.delete(
'https://api.gigapay.se/v2/integrations/846291712/',
headers={
'Authorization': 'Token cd7a4537a231356d404b553f465b6af2fa035821',
}
)
curl -X DELETE -H 'Authorization: Token cd7a4537a231356d404b553f465b6af2fa035821' https://api.gigapay.se/v2/integrations/846291712/
fetch("https://api.gigapay.se/v2/integrations/846291712/", {
method: "DELETE",
headers: {
"Authorization": "Token cd7a4537a231356d404b553f465b6af2fa035821",
}
})
The above command returns an empty response.
This endpoint deletes an Integration. Note that you can not delete Integrations of type 1 or 2, nor Integrations that have objects associated with them.
HTTP Request
DELETE https://api.gigapay.se/v2/integrations/:id/
Headers
Parameter | Required | Description |
---|---|---|
Authorization |
True | Your Authorization Token. |
URL Parameters
Parameter | Required | Description |
---|---|---|
id |
True | Unique identifier for the object. |
Employees
An Employee is an individual performing tasks within your organization, employed or sub-contracted by Gigapay. To add an Employee to your organization you can create an Employee object. The Employee will be notified and Gigapay will verify their identity and working permits.
The Employee object
An example Employee object:
{
"id": "1847",
"name": "Albin Lindskog",
"email": "albin@gigapay.co",
"cellphone_number": "+46703000000",
"country": "SWE",
"metadata": {},
"created_at": "2019-05-22T10:32:36.118753Z",
"notified_at": "2019-05-22T10:32:37.846274Z",
"claimed_at": "2019-05-23T11:56:41.123721Z",
"verified_at": "2019-05-23T11:57:03.742345Z",
"invitation_code": null
}
Attribute | Description |
---|---|
id |
Unique identifier for the object. |
name |
The full name of the Employee. |
email |
Email address of the Employee. |
country |
Employee's country of residence. ISO-3166 country code. |
cellphone_number |
The Employees cellphone number, including country code. |
metadata |
JSON-encoded metadata. |
created_at |
Time at which the Employee was created at. Displayed as ISO 8601 string. |
notified_at |
Time at which the Employee was notified. Displayed as ISO 8601 string. |
claimed_at |
Time at which the Employee consumed the magic link. Displayed as ISO 8601 string. |
verified_at |
Time when the Employee was verified. Displayed as ISO 8601 string. |
invitation_code |
8-digit alphanumeric uppercase code available when an employee is invited but not yet claimed. Users can use this code to create a magic link to claim the employee. |
List All Employees
import requests
response = requests.get(
'https://api.gigapay.se/v2/employees/',
headers={
'Authorization': 'Token cd7a4537a231356d404b553f465b6af2fa035821',
'Integration-ID': '79606358-97af-4196-b64c-5f719433d56b'
}
)
curl -X GET -H 'Authorization: Token cd7a4537a231356d404b553f465b6af2fa035821' -H 'Integration-ID: 79606358-97af-4196-b64c-5f719433d56b' https://api.gigapay.se/v2/employees/
fetch("https://api.gigapay.se/v2/employees/", {
headers: {
"Authorization": "Token cd7a4537a231356d404b553f465b6af2fa035821",
"Integration-Id": "79606358-97af-4196-b64c-5f719433d56b"
}
})
The above command returns JSON structured like this:
{
"count": 4,
"next": null,
"previous": "https://api.gigapay.se/v2/employees/?page=2",
"results": [
{
"id": "1847",
"name": "Albin Lindskog",
"email": "albin@gigapay.co",
"cellphone_number": "+46703000000",
"country": "SWE",
"metadata": {},
"created_at": "2019-05-22T10:32:36.118753Z",
"notified_at": "2019-05-22T10:32:37.846274Z",
"claimed_at": "2019-05-23T11:56:41.123721Z",
"verified_at": "2019-05-23T11:57:03.742345Z",
"invitation_code": null
}, {
"id": "1848",
"name": "Joakim Olovsson",
"email": "joakim@gigapay.co",
"cellphone_number": "+46703000001",
"country": "SWE",
"metadata": {},
"created_at": "2019-05-23T14:45:12.545271Z",
"notified_at": "2019-05-23T14:45:13.374627Z",
"claimed_at": null,
"verified_at": null,
"invitation_code": "A1B2C3D4"
}
]
}
This endpoint retrieves all Employees.
HTTP Request
GET https://api.gigapay.se/v2/employees/
Headers
Parameter | Required | Description |
---|---|---|
Authorization |
True | Your Authorization Token. |
Integration-ID |
True | Integration id. |
Query Parameters
Parameter | Default | Description |
---|---|---|
page |
1 | Which page to return. |
page_size |
25 | The number of Employees per page. |
created_at |
Timestamp filter. | |
notified_at |
Timestamp filter. | |
claimed_at |
Timestamp filter. | |
verified_at |
Timestamp filter. | |
search |
Filter by part of name, email or cellphone number. |
Register an Employee
import requests
response = requests.post(
'https://api.gigapay.se/v2/employees/',
json={
'id': 1847,
'name': 'Albin Lindskog',
'cellphone_number': '+4670000001',
'email': 'albin@mail.com',
'country': 'SWE'
},
headers={
'Authorization': 'Token cd7a4537a231356d404b553f465b6af2fa035821',
'Integration-ID': '79606358-97af-4196-b64c-5f719433d56b'
}
)
curl -X POST -H 'Authorization: Token cd7a4537a231356d404b553f465b6af2fa035821' -H 'Content-Type: application/json' -H 'Integration-ID: 79606358-97af-4196-b64c-5f719433d56b' -d '{"id": 1847, "name": "Albin Lindskog", "cellphone_number": "+4670000001", "email": "albin@mail.com", "country": "SWE"}' https://api.gigapay.se/v2/employees/
fetch("https://api.gigapay.se/v2/employees/", {
method: "POST",
body: JSON.stringify({
name: "Albin Lindskog",
cellphone_number: "+4670000000",
email: "albin@mail.com",
country: "SWE"
}),
headers: {
"Authorization": "Token cd7a4537a231356d404b553f465b6af2fa035821",
"Content-Type": "application/json",
"Integration-Id": "79606358-97af-4196-b64c-5f719433d56b"
}
})
The above command returns JSON structured like this:
{
"id": "14585989-9a6c-4f05-b251-69e38e85d324",
"name": "Albin Lindskog",
"email": "albin@gigapay.co",
"cellphone_number": "+46703000000",
"country": "SWE",
"metadata": {},
"created_at": "2019-05-22T10:32:36.118753Z",
"notified_at": null,
"claimed_at": null,
"verified_at": null,
"invitation_code": "A1B2C3D4"
}
This endpoint registers an Employee. The Employee will be notified with the invitation_code
that can be used to sign up in Gigapay and accept your invitation.
HTTP Request
POST https://api.gigapay.se/v2/employees/
Headers
Parameter | Required | Description |
---|---|---|
Authorization |
True | Your Authorization Token. |
Integration-ID |
True | Integration id. |
Idempotency-key |
False | Idempotency key. |
Body Parameters
Parameter | Type | Required | Default | Notes |
---|---|---|---|---|
id |
String | False | uuid4() | Unique per Integration. |
name |
String | True | ||
email |
String | True | ||
country |
String | True | ISO-3166 country code where the employee is living and working. | |
cellphone_number |
String | False | null | |
metadata |
Object | False | {} |
Retrieve an Employee
import requests
response = requests.get(
'https://api.gigapay.se/v2/employees/1847/',
headers={
'Authorization': 'Token cd7a4537a231356d404b553f465b6af2fa035821',
'Integration-ID': '79606358-97af-4196-b64c-5f719433d56b'
}
)
curl -X GET -H 'Authorization: Token cd7a4537a231356d404b553f465b6af2fa035821' -H 'Integration-ID: 79606358-97af-4196-b64c-5f719433d56b' https://api.gigapay.se/v2/employees/1847/
fetch("https://api.gigapay.se/v2/employees/1847/", {
headers: {
"Authorization": "Token cd7a4537a231356d404b553f465b6af2fa035821",
"Integration-Id": "79606358-97af-4196-b64c-5f719433d56b"
}
})
The above command returns JSON structured like this:
{
"id": "1847",
"name": "Albin Lindskog",
"email": "albin@gigapay.co",
"cellphone_number": "+46703000000",
"country": "SWE",
"metadata": {},
"created_at": "2019-05-22T10:32:36.118753Z",
"notified_at": "2019-05-22T10:32:37.846274Z",
"claimed_at": "2019-05-23T11:56:41.123721Z",
"verified_at": "2019-05-23T11:57:03.742345Z",
"invitation_code": null
}
This endpoint retrieves an employee.
HTTP Request
GET https://api.gigapay.se/v2/employees/:id/
Headers
Parameter | Required | Description |
---|---|---|
Authorization |
True | Your Authorization Token. |
Integration-ID |
True | Integration id. |
URL Parameters
Parameter | Required | Description |
---|---|---|
id |
True | Unique identifier for the object. |
Update an Employee
import requests
response = requests.patch(
'https://api.gigapay.se/v2/employees/1847/',
json={
'id': 8472,
},
headers={
'Authorization': 'Token cd7a4537a231356d404b553f465b6af2fa035821',
'Integration-ID': '79606358-97af-4196-b64c-5f719433d56b'
}
)
curl -X PATCH -H 'Authorization: Token cd7a4537a231356d404b553f465b6af2fa035821' -H 'Content-Type: application/json' -H 'Integration-ID: 79606358-97af-4196-b64c-5f719433d56b' -d '{"id": 8472}' https://api.gigapay.se/v2/employees/1847/
fetch("https://api.gigapay.se/v2/employees/1847/", {
method: "PATCH",
body: JSON.stringify({id: 8472}),
headers: {
"Authorization": "Token cd7a4537a231356d404b553f465b6af2fa035821",
"Content-Type": "application/json",
"Integration-Id": "79606358-97af-4196-b64c-5f719433d56b"
},
})
The above command returns JSON structured like this:
{
"id": "8472",
"name": "Albin Lindskog",
"email": "albin@gigapay.co",
"cellphone_number": "+46703000000",
"country": "SWE",
"metadata": {},
"created_at": "2019-05-22T10:32:36.118753Z",
"notified_at": "2019-05-22T10:32:37.846274Z",
"claimed_at": "2019-05-23T11:56:41.123721Z",
"verified_at": "2019-05-23T11:57:03.742345Z",
"invitation_code": null
}
This endpoint updates an Employee.
HTTP Request
PATCH https://api.gigapay.se/v2/employees/:id/
Headers
Parameter | Required | Description |
---|---|---|
Authorization |
True | Your Authorization Token. |
Integration-ID |
True | Integration id. |
URL Parameters
Parameter | Required | Description |
---|---|---|
id |
True | Unique identifier for the object. |
Body Parameters
Parameter | Type | Required | Default | Notes |
---|---|---|---|---|
id |
String | False | Previous value. | Unique per Integration. |
name |
String | False | Previous value. | |
email |
String | False | Previous value. | |
country |
String | False | Previous value. | ISO-3166 country code where the employee is living and working. |
cellphone_number |
False | False | Previous value. | |
metadata |
Object | False | Previous value. |
Replace an Employee
import requests
response = requests.put(
'https://api.gigapay.se/v2/employees/8472/',
json={
'id': 1847,
'name': 'Albin Lindskog',
'cellphone_number': '+4670000001',
'email': 'albin@mail.com',
'country': 'SWE'
},
headers={
'Authorization': 'Token cd7a4537a231356d404b553f465b6af2fa035821',
'Integration-ID': '79606358-97af-4196-b64c-5f719433d56b'
}
)
curl -X PUT -H 'Authorization: Token cd7a4537a231356d404b553f465b6af2fa035821' -H 'Content-Type: application/json' -H 'Integration-ID: 79606358-97af-4196-b64c-5f719433d56b' -d '{"id": 1847, "name": "Albin Lindskog", "cellphone_number": "+4670000001", "email": "albin@mail.com", "country": "SWE"}' https://api.gigapay.se/v2/employees/8472/
fetch("https://api.gigapay.se/v2/employees/8472/", {
method: "PUT",
body: JSON.stringify({
id: 1847,
name: "Albin Lindskog",
cellphone_number: "+4670000000",
email: "albin@mail.com",
country: "SWE"
}),
headers: {
"Authorization": "Token cd7a4537a231356d404b553f465b6af2fa035821",
"Content-Type": "application/json",
"Integration-Id": "79606358-97af-4196-b64c-5f719433d56b"
}
})
The above command returns JSON structured like this:
{
"id": "1847",
"name": "Albin Lindskog",
"email": "albin@gigapay.co",
"cellphone_number": "+46703000000",
"country": "SWE",
"metadata": {},
"created_at": "2019-05-22T10:32:36.118753Z",
"notified_at": null,
"claimed_at": null,
"verified_at": null,
"invitation_code": null
}
This endpoint replaces an Employee.
HTTP Request
PUT https://api.gigapay.se/v2/employees/:id/
Headers
Parameter | Required | Description |
---|---|---|
Authorization |
True | Your Authorization Token. |
Integration-ID |
True | Integration id. |
URL Parameters
Parameter | Required | Description |
---|---|---|
id |
True | Unique identifier for the object. |
Body Parameters
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
id |
String | False | uuid4() | Unique per Integration. |
name |
String | True | ||
email |
String | True | ||
country |
String | True | ISO-3166 country code where the employee is living and working. | |
cellphone_number |
String | False | null | |
metadata |
Object | False | {} |
Delete a Employee
import requests
response = requests.delete(
'https://api.gigapay.se/v2/employees/1847/',
headers={
'Authorization': 'Token cd7a4537a231356d404b553f465b6af2fa035821',
'Integration-ID': '79606358-97af-4196-b64c-5f719433d56b'
}
)
curl -X DELETE -H 'Authorization: Token cd7a4537a231356d404b553f465b6af2fa035821' -H 'Integration-ID: 79606358-97af-4196-b64c-5f719433d56b' https://api.gigapay.se/v2/employees/1847/
fetch("https://api.gigapay.se/v2/employees/1847/", {
method: "DELETE",
headers: {
"Authorization": "Token cd7a4537a231356d404b553f465b6af2fa035821",
"Integration-Id": "79606358-97af-4196-b64c-5f719433d56b"
}
})
The above command returns an empty response.
This endpoint deletes an Employee. You can not delete an Employee after a Payout has been registered to it.
HTTP Request
DELETE https://api.gigapay.se/v2/employees/:id/
Headers
Parameter | Required | Description |
---|---|---|
Authorization |
True | Your Authorization Token. |
Integration-ID |
True | Integration id. |
URL Parameters
Parameter | Required | Description |
---|---|---|
id |
True | Unique identifier for the object. |
Resend an Invitation
import requests
response = requests.patch(
'https://api.gigapay.se/v2/employees/1847/resend/',
headers={
'Authorization': 'Token cd7a4537a231356d404b553f465b6af2fa035821',
'Integration-ID': '79606358-97af-4196-b64c-5f719433d56b',
'Idempotency-key': 'ac4beffd-79b0-4561-b16c-846a9600b168'
}
)
curl -X PATCH -H 'Authorization: Token cd7a4537a231356d404b553f465b6af2fa035821' -H 'Integration-ID: 79606358-97af-4196-b64c-5f719433d56b' -H 'Idempotency-key: ac4beffd-79b0-4561-b16c-846a9600b168' https://api.gigapay.se/v2/employees/1847/resend/
fetch("https://api.gigapay.se/v2/employees/1847/resend/", {
method: "PATCH",
headers: {
"Authorization": "Token cd7a4537a231356d404b553f465b6af2fa035821",
"Integration-Id": "79606358-97af-4196-b64c-5f719433d56b",
"Idempotency-key": "ac4beffd-79b0-4561-b16c-846a9600b168"
}
})
The above command returns an empty response.
This endpoint resends a notification with an invitation code. After resending, you need to wait at least 24 hours before resending again.
HTTP Request
PATCH https://api.gigapay.se/v2/employees/:id/resend/
Headers
Parameter | Required | Description |
---|---|---|
Authorization |
True | Your Authorization Token. |
Integration-ID |
True | Integration id. |
Idempotency-key |
False | Idempotency key. |
URL Parameters
Parameter | Required | Description |
---|---|---|
id |
True | Unique identifier for the object. |
Messages
A Message is a one way communication object between the Integration and its Employee objects.
To issue a message to an employee or multiple employees, you can create a Message object and include a list of employees that should receive it.
Once the Message object is created, the relevant Employees will see it in the gigapay app in their home view.
The Message object
An example Message object:
{
"id": "3d5356ee-6943-4d10-8060-967d3180b79d",
"employees": [
"9c9c19a6-bb64-4c53-8dc1-516033390092",
"a5384a47-ee2b-4a5e-be29-969fac195be7"
],
"content": "The February payment is delayed",
"created_at": "2024-03-22T10:32:36.118753Z"
}
Attribute | Description |
---|---|
id |
Unique identifier for the object. |
employees |
A list of employees that will see the Message content. |
content |
The Message content to be displayed to the employees. |
created_at |
Time at which the Message was created at. Displayed as ISO 8601 string. |
List All Messages
import requests
response = requests.get(
'https://api.gigapay.se/v2/messages/',
headers={
'Authorization': 'Token cd7a4537a231356d404b553f465b6af2fa035821',
'Integration-ID': '79606358-97af-4196-b64c-5f719433d56b'
}
)
curl -X GET -H 'Authorization: Token cd7a4537a231356d404b553f465b6af2fa035821' -H 'Integration-ID: 79606358-97af-4196-b64c-5f719433d56b' https://api.gigapay.se/v2/messages/
fetch("https://api.gigapay.se/v2/messages/", {
headers: {
Authorization: "Token cd7a4537a231356d404b553f465b6af2fa035821",
"Integration-Id": "79606358-97af-4196-b64c-5f719433d56b",
},
});
The above command returns JSON structured like this:
{
"count": 4,
"next": null,
"previous": "https://api.gigapay.se/v2/messages/?page=2",
"results": [
{
"id": "2a241017-80af-467a-a3e1-50a6321a2adc",
"created_at": "2024-03-27T08:34:32.802625Z",
"employees": [
"9119e535-ef85-4a0e-a7ba-d46dddd58c3b",
"fafef424-cf39-4ada-a8a1-8b085738d64a"
],
"content": "January payment is underway"
},
{
"id": "f9a57847-5d28-43dc-a748-365f6d487084",
"created_at": "2024-03-27T08:35:05.070901Z",
"employees": [
"74fb03a0-d890-45fc-972b-8562b8d9acbe",
"ee6100b2-7d80-4c1d-b251-19e961f7fc9f",
"ba6162b0-e949-44c4-92ec-f65cc3f64a8c",
"56a34d0e-068f-4f56-9663-a36095751b9b"
],
"content": "Your application is incomplete"
}
]
}
This endpoint retrieves all Messages.
HTTP Request
GET https://api.gigapay.se/v2/messages/
Headers
Parameter | Required | Description |
---|---|---|
Authorization |
True | Your Authorization Token. |
Integration-ID |
True | Integration id. |
Query Parameters
Parameter | Default | Description |
---|---|---|
page |
1 | Which page to return. |
page_size |
25 | The number of Messages per page. |
Create a Message
import requests
response = requests.post(
'https://api.gigapay.se/v2/messages/',
json={
'employees': ['74fb03a0-d890-45fc-972b-8562b8d9acbe'],
'content': 'Payment in progress',
},
headers={
'Authorization': 'Token cd7a4537a231356d404b553f465b6af2fa035821',
'Integration-ID': '79606358-97af-4196-b64c-5f719433d56b'
}
)
curl -X POST -H 'Authorization: Token cd7a4537a231356d404b553f465b6af2fa035821' -H 'Content-Type: application/json' -H 'Integration-ID: 79606358-97af-4196-b64c-5f719433d56b' -d '{"employees": ["74fb03a0-d890-45fc-972b-8562b8d9acbe"], "content": "Payment in progress"}' https://api.gigapay.se/v2/messages/
fetch("https://api.gigapay.se/v2/messages/", {
method: "POST",
body: JSON.stringify({
employees: ["74fb03a0-d890-45fc-972b-8562b8d9acbe"],
content: "Payment in progress",
}),
headers: {
Authorization: "Token cd7a4537a231356d404b553f465b6af2fa035821",
"Content-Type": "application/json",
"Integration-Id": "79606358-97af-4196-b64c-5f719433d56b",
},
});
The above command returns JSON structured like this:
{
"id": "e9e3c146-83d9-4080-b719-091719d90629",
"employees": ["74fb03a0-d890-45fc-972b-8562b8d9acbe"],
"content": "Payment in progress",
"created_at": "2024-03-22T10:32:36.118753Z"
}
This endpoint creates a Message.
HTTP Request
POST https://api.gigapay.se/v2/messages/
Headers
Parameter | Required | Description |
---|---|---|
Authorization |
True | Your Authorization Token. |
Integration-ID |
True | Integration id. |
Idempotency-key |
False | Idempotency key. |
Body Parameters
Parameter | Type | Required | Notes |
---|---|---|---|
employees |
List | True | A list of employee ids |
content |
String | True | The Message content to be displayed to the employees. |
Retrieve a Message
import requests
response = requests.get(
'https://api.gigapay.se/v2/messages/e9e3c146-83d9-4080-b719-091719d90629/',
headers={
'Authorization': 'Token cd7a4537a231356d404b553f465b6af2fa035821',
'Integration-ID': '79606358-97af-4196-b64c-5f719433d56b'
}
)
curl -X GET -H 'Authorization: Token cd7a4537a231356d404b553f465b6af2fa035821' -H 'Integration-ID: 79606358-97af-4196-b64c-5f719433d56b' https://api.gigapay.se/v2/messages/e9e3c146-83d9-4080-b719-091719d90629/
fetch(
"https://api.gigapay.se/v2/message/e9e3c146-83d9-4080-b719-091719d90629/",
{
headers: {
Authorization: "Token cd7a4537a231356d404b553f465b6af2fa035821",
"Integration-Id": "79606358-97af-4196-b64c-5f719433d56b",
},
},
);
The above command returns JSON structured like this:
{
"id": "e9e3c146-83d9-4080-b719-091719d90629",
"employees": ["74fb03a0-d890-45fc-972b-8562b8d9acbe"],
"content": "Payment in progress",
"created_at": "2024-03-22T10:32:36.118753Z"
}
This endpoint retrieves a Message.
HTTP Request
GET https://api.gigapay.se/v2/messages/:id/
Headers
Parameter | Required | Description |
---|---|---|
Authorization |
True | Your Authorization Token. |
Integration-ID |
True | Integration id. |
URL Parameters
Parameter | Required | Description |
---|---|---|
id |
True | Unique identifier for the object. |
Update a Message
import requests
response = requests.patch(
'https://api.gigapay.se/v2/messages/e9e3c146-83d9-4080-b719-091719d90629/',
json={
'content': 'Correction: payment is delayed by 1 day',
},
headers={
'Authorization': 'Token cd7a4537a231356d404b553f465b6af2fa035821',
'Integration-ID': '79606358-97af-4196-b64c-5f719433d56b'
}
)
curl -X PATCH -H 'Authorization: Token cd7a4537a231356d404b553f465b6af2fa035821' -H 'Content-Type: application/json' -H 'Integration-ID: 79606358-97af-4196-b64c-5f719433d56b' -d '{"content": "Correction: payment is delayed by 1 day"}' https://api.gigapay.se/v2/messages/e9e3c146-83d9-4080-b719-091719d90629/
fetch(
"https://api.gigapay.se/v2/messages/e9e3c146-83d9-4080-b719-091719d90629/",
{
method: "PATCH",
body: JSON.stringify({
content: "Correction: payment is delayed by 1 day",
}),
headers: {
Authorization: "Token cd7a4537a231356d404b553f465b6af2fa035821",
"Content-Type": "application/json",
"Integration-Id": "79606358-97af-4196-b64c-5f719433d56b",
},
},
);
The above command returns JSON structured like this:
{
"id": "e9e3c146-83d9-4080-b719-091719d90629",
"employees": ["74fb03a0-d890-45fc-972b-8562b8d9acbe"],
"content": "Correction: payment is delayed by 1 day",
"created_at": "2024-03-22T10:32:36.118753Z"
}
This endpoint updates a Message.
HTTP Request
PATCH https://api.gigapay.se/v2/messages/:id/
Headers
Parameter | Required | Description |
---|---|---|
Authorization |
True | Your Authorization Token. |
Integration-ID |
True | Integration id. |
URL Parameters
Parameter | Required | Description |
---|---|---|
id |
True | Unique identifier for the object. |
Body Parameters
Parameter | Type | Required | Notes |
---|---|---|---|
employees |
List | False | A list of employee ids |
content |
String | False | The Message content to be displayed to the employees. |
Replace a Message
import requests
response = requests.put(
'https://api.gigapay.se/v2/messages/8472/',
json={
'employees': ['74fb03a0-d890-45fc-972b-8562b8d9acbe', '696f4143-1579-4352-9e9c-a0cf09df7b3f'],
'content': 'Payment 664 and 566 in progress',
},
headers={
'Authorization': 'Token cd7a4537a231356d404b553f465b6af2fa035821',
'Integration-ID': '79606358-97af-4196-b64c-5f719433d56b'
}
)
curl -X PUT -H 'Authorization: Token cd7a4537a231356d404b553f465b6af2fa035821' -H 'Content-Type: application/json' -H 'Integration-ID: 79606358-97af-4196-b64c-5f719433d56b' -d '{"employees": ["74fb03a0-d890-45fc-972b-8562b8d9acbe", "696f4143-1579-4352-9e9c-a0cf09df7b3f"],"content": "Payment 664 and 566 in progress"}' https://api.gigapay.se/v2/messages/8472/
fetch("https://api.gigapay.se/v2/messages/8472/", {
method: "PUT",
body: JSON.stringify({
employees: [
"74fb03a0-d890-45fc-972b-8562b8d9acbe",
"696f4143-1579-4352-9e9c-a0cf09df7b3f",
],
content: "Payment 664 and 566 in progress",
}),
headers: {
Authorization: "Token cd7a4537a231356d404b553f465b6af2fa035821",
"Content-Type": "application/json",
"Integration-Id": "79606358-97af-4196-b64c-5f719433d56b",
},
});
The above command returns JSON structured like this:
{
"id": "e9e3c146-83d9-4080-b719-091719d90629",
"employees": [
"74fb03a0-d890-45fc-972b-8562b8d9acbe",
"696f4143-1579-4352-9e9c-a0cf09df7b3f"
],
"content": "Payment 664 and 566 in progress",
"created_at": "2024-03-23T10:32:36.118753Z"
}
This endpoint replaces a Message.
HTTP Request
PUT https://api.gigapay.se/v2/messages/:id/
Headers
Parameter | Required | Description |
---|---|---|
Authorization |
True | Your Authorization Token. |
Integration-ID |
True | Integration id. |
URL Parameters
Parameter | Required | Description |
---|---|---|
id |
True | Unique identifier for the object. |
Body Parameters
Parameter | Type | Required | Description |
---|---|---|---|
employees |
List | True | A list of employee ids |
content |
String | True | The Message content to be displayed to the employees. |
Delete a Message
import requests
response = requests.delete(
'https://api.gigapay.se/v2/messages/e9e3c146-83d9-4080-b719-091719d90629/',
headers={
'Authorization': 'Token cd7a4537a231356d404b553f465b6af2fa035821',
'Integration-ID': '79606358-97af-4196-b64c-5f719433d56b'
}
)
curl -X DELETE -H 'Authorization: Token cd7a4537a231356d404b553f465b6af2fa035821' -H 'Integration-ID: 79606358-97af-4196-b64c-5f719433d56b' https://api.gigapay.se/v2/messages/e9e3c146-83d9-4080-b719-091719d90629/
fetch(
"https://api.gigapay.se/v2/messages/e9e3c146-83d9-4080-b719-091719d90629/",
{
method: "DELETE",
headers: {
Authorization: "Token cd7a4537a231356d404b553f465b6af2fa035821",
"Integration-Id": "79606358-97af-4196-b64c-5f719433d56b",
},
},
);
The above command returns an empty response.
This endpoint deletes a Message.
HTTP Request
DELETE https://api.gigapay.se/v2/messages/:id/
Headers
Parameter | Required | Description |
---|---|---|
Authorization |
True | Your Authorization Token. |
Integration-ID |
True | Integration id. |
URL Parameters
Parameter | Required | Description |
---|---|---|
id |
True | Unique identifier for the object. |
Payouts
To make a payout to an Employee you need to create a Payout object. The Employee is notified of the Payout once the corresponding Invoice is paid. The Employee will need to sign and accept the Payout before it is disbursed to their account.
Either amount
, invoiced_amount
or cost
is used as a basis for the Payout. For their definition and how they are
related see Pricing. Ensure that you are using the same definition when communicating with the recipient to
align everyone's expectation.
The Payout object
An example Payout object:
{
"id": "0177270d-f94b-4ab9-88ba-ac1fa2f791aa",
"amount": "100.00",
"cost": "137.99",
"currency": "SEK",
"description": "Lön genom Gigapay",
"employee": "1f1d1263-0e79-4787-b573-6df81b44bfc2",
"invoice": "bab4b830-47d6-4a24-a460-3289897f6e8e",
"metadata": {},
"start_at": null,
"end_at": null,
"created_at": "2019-05-22T10:32:38.118753Z",
"notified_at": "2019-05-22T10:38:19.874623Z",
"accepted_at": null,
"canceled_at": null
}
Attribute | Description |
---|---|
id |
Unique identifier for the object. |
amount |
Decimal formatted string of the gross salary amount. |
invoiced_amount |
Decimal formatted string of the invoiced amount. |
cost |
Decimal formatted string of the total salary cost. |
currency |
ISO-4217 currency code. |
description |
String describing the work done, displayed to the recipient. Max 255 characters. |
full_salary_specification |
Controls whether to present the payroll taxes and Gigapay's fee on the payslip. It is set to false when amount is used as a basis for the Payout, true otherwise. |
employee |
Unique identifier for the Employee object, that is the recipient of the Payout. This is an expandable object. |
invoice |
Unique identifier for the Invoice object the Payout object belongs to. This is an expandable object. |
metadata |
JSON-encoded metadata. |
start_at |
The time at which the gig will start. Displayed as ISO 8601 string. |
end_at |
The time at which the gig will end. Displayed as ISO 8601 string. |
created_at |
The time at which the Payout was created at. Displayed as ISO 8601 string. |
notified_at |
The time at which the Employee was notified of the Payout. Displayed as ISO 8601 string. |
accepted_at |
The time at which the Employee accepted the Payout. Displayed as ISO 8601 string. |
canceled_at |
The time at which the Payout was canceled. Displayed as ISO 8601 string. |
List All Payouts
import requests
response = requests.get(
'https://api.gigapay.se/v2/payouts/',
headers={
'Authorization': 'Token cd7a4537a231356d404b553f465b6af2fa035821',
'Integration-ID': '79606358-97af-4196-b64c-5f719433d56b'
}
)
curl -X GET -H 'Authorization: Token cd7a4537a231356d404b553f465b6af2fa035821' -H 'Integration-ID: 79606358-97af-4196-b64c-5f719433d56b' https://api.gigapay.se/v2/payouts/
fetch("https://api.gigapay.se/v2/payouts/", {
headers: {
"Authorization": "Token cd7a4537a231356d404b553f465b6af2fa035821",
"Integration-Id": "79606358-97af-4196-b64c-5f719433d56b"
}
})
The above command returns JSON structured like this:
{
"count": 4,
"next": null,
"previous": "https://api.gigapay.se/v2/payouts/?page=1",
"results": [
{
"id": "0177270d-f94b-4ab9-88ba-ac1fa2f791aa",
"amount": "100.00",
"cost": "137.99",
"currency": "SEK",
"description": "Lön genom Gigapay",
"employee": "1f1d1263-0e79-4787-b573-6df81b44bfc2",
"invoice": "bab4b830-47d6-4a24-a460-3289897f6e8e",
"metadata": {
"job_id": 127
},
"start_at": null,
"end_at": null,
"created_at": "2019-05-22T10:32:38.118753Z",
"notified_at": "2019-05-22T10:38:19.874623Z",
"accepted_at": null,
"canceled_at": null
}, {
"id": "8a726186-a4e4-42e0-b56e-20fd17dc67ba",
"amount": "10.00",
"cost": "13.79",
"currency": "SEK",
"description": "Lön genom Gigapay",
"employee": "1f1d1263-0e79-4787-b573-6df81b44bfc2",
"invoice": "c1554d88-b74f-4d6a-bfa6-049c14905dc7",
"metadata": {
"job_id": 128
},
"start_at": "2019-05-22T08:00:00.000000Z",
"end_at": "2019-05-22T17:00:00.000000Z",
"created_at": "2019-05-23T10:32:38.118753Z",
"notified_at": "2019-05-23T11:46:29.298742Z",
"accepted_at": "2019-05-23T12:02:16.472846Z",
"canceled_at": null
}
]
}
This endpoint retrieves all Payouts.
HTTP Request
GET https://api.gigapay.se/v2/payouts/
Headers
Parameter | Required | Description |
---|---|---|
Authorization |
True | Your Authorization Token. |
Integration-ID |
True | Integration id. |
Query Parameters
Parameter | Default | Description |
---|---|---|
page |
1 | Which page to return. |
page_size |
25 | The number of Employees per page. |
invoice |
Relational Filter. | |
employee |
Relational Filter. | |
start_at |
Timestamp filter. | |
end_at |
Timestamp filter. | |
created_at |
Timestamp filter. | |
notified_at |
Timestamp filter. | |
accepted_at |
Timestamp filter. | |
canceled_at |
Timestamp filter. | |
search |
Find payout by searching for part of payout description or employee: name, cellphone number, email. |
Register a Payout
import requests
response = requests.post(
'https://api.gigapay.se/v2/payouts/',
json={
'id': 9472,
'currency': 'SEK',
'description': 'Instagram samarbete 2021-11-13.',
'employee': 1847,
'invoiced_amount': '1000.00',
},
headers={
'Authorization': 'Token cd7a4537a231356d404b553f465b6af2fa035821',
'Integration-ID': '79606358-97af-4196-b64c-5f719433d56b'
}
)
curl -X POST -H 'Authorization: Token cd7a4537a231356d404b553f465b6af2fa035821' -H 'Content-Type: application/json' -H 'Integration-ID: 79606358-97af-4196-b64c-5f719433d56b' -d '{"id": 9472, "currency": "SEK", "description": "Instagram samarbete 2021-11-13.", "employee": 1847, "invoiced_amount": "1000.00"}' https://api.gigapay.se/v2/payouts/
fetch("https://api.gigapay.se/v2/payouts/", {
method: "POST",
body: JSON.stringify({
id: 9472,
currency: 'SEK',
description: 'Instagram samarbete 2021-11-13.',
employee: 1847,
invoiced_amount: '1000.00',
}),
headers: {
"Authorization": "Token cd7a4537a231356d404b553f465b6af2fa035821",
"Content-Type": "application/json",
"Integration-Id": "79606358-97af-4196-b64c-5f719433d56b"
}
})
The above command returns JSON structured like this:
{
"id": "9472",
"amount": "760.92",
"cost": "1020.00",
"currency": "SEK",
"description": "Lön genom Gigapay",
"employee": "1847",
"full_salary_specification": true,
"invoice": "c1554d88-b74f-4d6a-bfa6-049c14905dc7",
"invoiced_amount": "1000.00",
"metadata": {},
"start_at": null,
"end_at": null,
"created_at": "2019-05-23T10:32:38.118753Z",
"notified_at": null,
"accepted_at": null,
"canceled_at": null
}
This endpoint registers a payout.
HTTP Request
POST https://api.gigapay.se/v2/payouts/
Headers
Parameter | Required | Description |
---|---|---|
Authorization |
True | Your Authorization Token. |
Integration-ID |
True | Integration id. |
Idempotency-key |
False | Idempotency key. |
Body Parameters
Parameter | Type | Required | Default | Notes |
---|---|---|---|---|
id |
String | False | uuid4() | Unique per Integration. |
amount |
String | False | Either amount , invoiced_amount or cost is required. |
|
cost |
String | False | Either amount , invoiced_amount or cost is required. |
|
currency |
String | True | ||
description |
String | True | ||
employee |
String | True | ||
invoiced_amount |
String | True | Either amount , invoiced_amount or cost is required. |
|
metadata |
Object | False | ||
start_at |
String | False | ||
end_at |
String | False | null |
Register multiple Payouts
import requests
response = requests.post(
'https://api.gigapay.se/v2/payouts/',
json=[
{
'id': 9472,
'currency': 'SEK',
'description': 'Instagram samarbete 2021-11-13.',
'employee': 1847,
'invoiced_amount': '1000.00',
'metadata': {},
}, {
'id': 9473,
'currency': 'SEK',
'description': 'Instagram samarbete 2021-11-13.',
'employee': 1736,
'invoiced_amount': '2500.00',
'metadata': {},
},
],
headers={
'Authorization': 'Token cd7a4537a231356d404b553f465b6af2fa035821',
'Integration-ID': '79606358-97af-4196-b64c-5f719433d56b'
}
)
curl -X POST -H 'Authorization: Token cd7a4537a231356d404b553f465b6af2fa035821' -H 'Content-Type: application/json' -H 'Integration-ID: 79606358-97af-4196-b64c-5f719433d56b' -d '[{"id": 9472, "currency": "SEK", "description": "Instagram samarbete 2021-11-13.", "employee": 1847, "invoiced_amount": "1000.00"}, {"id": 9473, "currency": "SEK", "description": "Instagram samarbete 2021-11-13.", "employee": 1736, "invoiced_amount": "2500.00"}]' https://api.gigapay.se/v2/payouts/
fetch("https://api.gigapay.se/v2/payouts/", {
method: "POST",
body: JSON.stringify([
{
'id': 9472,
'currency': 'SEK',
'description': 'Instagram samarbete 2021-11-13.',
'employee': 1847,
'invoiced_amount': '1000.00',
'metadata': {},
}, {
'id': 9473,
'currency': 'SEK',
'description': 'Instagram samarbete 2021-11-13.',
'employee': 1736,
'invoiced_amount': '2500.00',
'metadata': {},
},
]),
headers: {
"Authorization": "Token cd7a4537a231356d404b553f465b6af2fa035821",
"Content-Type": "application/json",
"Integration-Id": "79606358-97af-4196-b64c-5f719433d56b"
}
})
The above command returns JSON structured like this:
[
{
"id": "9472",
"amount": "760.92",
"cost": "1020.00",
"currency": "SEK",
"description": "Instagram samarbete 2021-11-13.",
"employee": "1847",
"full_salary_specification": true,
"invoice": "c1554d88-b74f-4d6a-bfa6-049c14905dc7",
"invoiced_amount": "1000.00",
"metadata": {},
"start_at": null,
"end_at": null,
"created_at": "2019-05-23T10:32:38.118753Z",
"notified_at": null,
"accepted_at": null,
"canceled_at": null
}, {
"id": "9473",
"amount": "1902.31",
"cost": "2550.00",
"currency": "SEK",
"description": "Instagram samarbete 2021-11-13.",
"employee": "1736",
"full_salary_specification": true,
"invoice": "c1554d88-b74f-4d6a-bfa6-049c14905dc7",
"invoiced_amount": "2500.00",
"metadata": {},
"start_at": null,
"end_at": null,
"created_at": "2019-05-23T10:32:38.118812Z",
"notified_at": null,
"accepted_at": null,
"canceled_at": null
}
]
This endpoint registers multiple Payouts at once. All payouts will be added to the same Invoice object.
HTTP Request
POST https://api.gigapay.se/v2/payouts/
Headers
Parameter | Required | Description |
---|---|---|
Authorization |
True | Your Authorization Token. |
Integration-ID |
True | Integration id. |
Idempotency-key |
False | Idempotency key. |
Body Parameters
Type | Required | Default | Notes |
---|---|---|---|
Payout[] | True | Elements of array structured as Payout. |
Register a Payout with an inline Employee
import requests
response = requests.post(
'https://api.gigapay.se/v2/payouts/?expand=employee',
json={
'id': 9472,
'currency': 'SEK',
'description': 'Instagram samarbete 2021-11-13.',
'employee': {
'id': 1847,
'name': 'Albin Lindskog',
'cellphone_number': '+4670000001',
'email': 'albin@mail.com',
'country': 'SWE'
},
'invoiced_amount': '1000.00',
},
headers={
'Authorization': 'Token cd7a4537a231356d404b553f465b6af2fa035821',
'Integration-ID': '79606358-97af-4196-b64c-5f719433d56b'
}
)
curl -X POST -H 'Authorization: Token cd7a4537a231356d404b553f465b6af2fa035821' -H 'Content-Type: application/json' -H 'Integration-ID: 79606358-97af-4196-b64c-5f719433d56b' -d '{"id": 9472, "currency": "SEK", "description": "Instagram samarbete 2021-11-13.", "employee": {"id": 1847, "name": "Albin Lindskog", "cellphone_number": "+4670000001", "email": "albin@mail.com", "country": "SWE"}, "invoiced_amount": "1000.00"}' 'https://api.gigapay.se/v2/payouts/?expand=employee'
fetch("https://api.gigapay.se/v2/payouts/?expand=employee", {
method: "POST",
body: JSON.stringify({
id: 9472,
currency: 'SEK',
description: 'Instagram samarbete 2021-11-13.',
employee: {
id: 1847,
name: 'Albin Lindskog',
cellphone_number: '+4670000001',
email: 'albin@mail.com',
country: 'SWE'
},
invoiced_amount: '1000.00',
}),
headers: {
"Authorization": "Token cd7a4537a231356d404b553f465b6af2fa035821",
"Content-Type": "application/json",
"Integration-Id": "79606358-97af-4196-b64c-5f719433d56b"
}
})
The above command returns JSON structured like this:
{
"id": "9472",
"amount": "760.92",
"cost": "1020.00",
"currency": "SEK",
"description": "Instagram samarbete 2021-11-13.",
"employee": {
"id": "1847",
"name": "Albin Lindskog",
"email": "albin@mail.com",
"cellphone_number": "+46700000001",
"country": "SWE",
"metadata": {},
"created_at": "2019-05-22T10:32:36.118753Z",
"notified_at": null,
"claimed_at": null,
"verified_at": null,
"invitation_code": "ABCD1234"
},
"full_salary_specification": true,
"invoice": "c1554d88-b74f-4d6a-bfa6-049c14905dc7",
"invoiced_amount": "1000.00",
"metadata": {
"campaign_id": 12394
},
"start_at": null,
"end_at": null,
"created_at": "2019-05-23T10:32:38.118753Z",
"notified_at": null,
"accepted_at": null,
"canceled_at": null
}
This endpoint registers a Payout and an Employee at the same time. If an Employee with matching information is already registered that object will be reused.
HTTP Request
POST https://api.gigapay.se/v2/payouts/?expand=employee
Headers
Parameter | Required | Description |
---|---|---|
Authorization |
True | Your Authorization Token. |
Integration-ID |
True | Integration id. |
Idempotency-key |
False | Idempotency key. |
Body Parameters
Parameter | Type | Required | Default | Notes |
---|---|---|---|---|
id |
String | False | uuid4() | Unique per Integration. |
amount |
String | False | Either amount , invoiced_amount or cost is required. |
|
cost |
String | False | Either amount , invoiced_amount or cost is required. |
|
currency |
String | True | ||
description |
String | True | ||
employee |
Object | True | Structured as an Employee. | |
invoiced_amount |
String | True | Either amount , invoiced_amount or cost is required. |
|
metadata |
Object | False | ||
start_at |
String | False | ||
end_at |
String | False | null |
Retrieve a Payout
import requests
response = requests.get(
'https://api.gigapay.se/v2/payouts/9472/',
headers={
'Authorization': 'Token cd7a4537a231356d404b553f465b6af2fa035821',
'Integration-ID': '79606358-97af-4196-b64c-5f719433d56b'
}
)
curl -X GET -H 'Authorization: Token cd7a4537a231356d404b553f465b6af2fa035821' -H 'Integration-ID: 79606358-97af-4196-b64c-5f719433d56b' https://api.gigapay.se/v2/payouts/9472/
fetch("https://api.gigapay.se/v2/payouts/9472/", {
headers: {
"Authorization": "Token cd7a4537a231356d404b553f465b6af2fa035821",
"Integration-Id": "79606358-97af-4196-b64c-5f719433d56b"
}
})
The above command returns JSON structured like this:
{
"id": "9472",
"amount": "760.92",
"cost": "1020.00",
"currency": "SEK",
"description": "Lön genom Gigapay",
"employee": "1847",
"full_salary_specification": true,
"invoice": "c1554d88-b74f-4d6a-bfa6-049c14905dc7",
"invoiced_amount": "1000.00",
"metadata": {
"campaign_id": 12394
},
"start_at": "2019-05-22T08:00:00.000000Z",
"end_at": "2019-05-22T17:00:00.000000Z",
"created_at": "2019-05-23T10:32:38.118753Z",
"notified_at": "2019-05-23T11:46:29.298742Z",
"accepted_at": "2019-05-23T12:02:16.472846Z",
"canceled_at": null
}
This endpoint retrieves a payout.
HTTP Request
GET https://api.gigapay.se/v2/payouts/:id/
Headers
Parameter | Required | Description |
---|---|---|
Authorization |
True | Your Authorization Token. |
Integration-ID |
True | Integration id. |
URL Parameters
Parameter | Required | Description |
---|---|---|
id |
True | Unique identifier for the object. |
Delete a Payout
import requests
response = requests.delete(
'https://api.gigapay.se/v2/payouts/9472/',
headers={
'Authorization': 'Token cd7a4537a231356d404b553f465b6af2fa035821',
'Integration-ID': '79606358-97af-4196-b64c-5f719433d56b'
}
)
curl -X DELETE -H 'Authorization: Token cd7a4537a231356d404b553f465b6af2fa035821' -H 'Integration-ID: 79606358-97af-4196-b64c-5f719433d56b' https://api.gigapay.se/v2/payouts/9472/
fetch("https://api.gigapay.se/v2/payouts/9472/", {
method: "DELETE",
headers: {
"Authorization": "Token cd7a4537a231356d404b553f465b6af2fa035821",
"Integration-Id": "79606358-97af-4196-b64c-5f719433d56b"
}
})
The above command returns an empty response.
Endpoint for deleting a specific Payout. Note that you can not delete a payout belonging to a paid Invoice or an Invoice on credit.
HTTP Request
DELETE https://api.gigapay.se/v2/payouts/:id/
Headers
Parameter | Required | Description |
---|---|---|
Authorization |
True | Your Authorization Token. |
Integration-ID |
True | Integration id. |
URL Parameters
Parameter | Required | Description |
---|---|---|
id |
True | Unique identifier for the object. |
Resend a Notification
import requests
response = requests.put(
'https://api.gigapay.se/v2/payouts/9472/resend/',
headers={
'Authorization': 'Token cd7a4537a231356d404b553f465b6af2fa035821',
'Integration-ID': '79606358-97af-4196-b64c-5f719433d56b',
'Idempotency-key': 'ac4beffd-79b0-4561-b16c-846a9600b168'
}
)
curl -X PUT -H 'Authorization: Token cd7a4537a231356d404b553f465b6af2fa035821' -H 'Integration-ID: 79606358-97af-4196-b64c-5f719433d56b' -H 'Idempotency-key: ac4beffd-79b0-4561-b16c-846a9600b168' https://api.gigapay.se/v2/payouts/9472/resend/
fetch("https://api.gigapay.se/v2/payouts/9472/resend/", {
method: "PUT",
headers: {
"Authorization": "Token cd7a4537a231356d404b553f465b6af2fa035821",
"Integration-Id": "79606358-97af-4196-b64c-5f719433d56b",
"Idempotency-key": "ac4beffd-79b0-4561-b16c-846a9600b168"
}
})
The above command returns an empty response.
This endpoint resends a notification. After resending, you need to wait at least 24 hours before resending again.
HTTP Request
PATCH https://api.gigapay.se/v2/payouts/:id/resend/
Headers
Parameter | Required | Description |
---|---|---|
Authorization |
True | Your Authorization Token. |
Integration-ID |
True | Integration id. |
Idempotency-key |
False | Idempotency key. |
URL Parameters
Parameter | Required | Description |
---|---|---|
id |
True | Unique identifier for the object. |
Pricing
The Pricing endpoint allows you to calculate the price of payout you would like to make, and to retrieve the price information about previously made payouts. The endpoint is designed to mirror the Payouts endpoint as closely as possible, e.g. the same request can be used to retrieve the price information of a Payout you'd like to make and to actually make it.
The Pricing breakdown
An example Pricing breakdown for a Payout:
{
"amount": "1000.00",
"cost": "1379.91",
"currency": "SEK",
"fee": "65.71",
"health_insurance": null,
"invoiced_amount": "1314.20",
"payroll": "314.20",
"pension": null,
"tax": "300.00",
"vat": "344.97"
}
Attribute | Description |
---|---|
amount | Decimal formatted string of the gross salary amount. |
invoiced_amount | Decimal formatted string of the invoiced amount. |
cost | Decimal formatted string of the total salary cost. |
currency | ISO-4217 currency code. |
fee | Decimal formatted string of Gigapay's fee for this Payout. |
health_insurance | Decimal formatted string of the cost of mandated health insurance. Will be none if health insurance is not mandated. |
payroll | Decimal formatted string of the payroll taxes. Will be none if payroll taxes are not mandated. |
pension | Decimal formatted string of the cost of mandated pension. Will be none if pension is not mandated. |
tax | Decimal formatted string of the preliminary income taxes the will be reported and paid on behalf of the recipient. |
vat | Decimal formatted string of the VAT for the Payout. |
Either amount
, invoiced_amount
or cost
is used as a basis for calculating the Pricing breakdown. One is provided
and the other are calculated based on that. Their definitions are:
amount
: net amount paid out plus obligations paid by the recipient.invoiced_amount
:amount
plus obligations paid by the employer.cost
:invoiced_amount
plus Gigapay's fee. This is the final amount you end up paying.
Which of the attributes that are included and in what step varies between countries. Examples of what the pricing looks like in each country are provided.
List Pricing info
import requests
response = requests.get(
'https://api.gigapay.se/v2/pricing/',
headers={
'Authorization': 'Token cd7a4537a231356d404b553f465b6af2fa035821',
'Integration-ID': '79606358-97af-4196-b64c-5f719433d56b'
}
)
curl -X GET -H 'Authorization: Token cd7a4537a231356d404b553f465b6af2fa035821' -H 'Integration-ID: 79606358-97af-4196-b64c-5f719433d56b' https://api.gigapay.se/v2/pricing/
fetch("https://api.gigapay.se/v2/pricing/", {
headers: {
"Authorization": "Token cd7a4537a231356d404b553f465b6af2fa035821",
"Integration-Id": "79606358-97af-4196-b64c-5f719433d56b"
}
})
The above command returns JSON structured like this:
{
"count": 4,
"next": null,
"previous": "https://api.gigapay.se/v2/pricing/?page=1",
"results": [
{
"amount": "1000.00",
"cost": "1379.91",
"currency": "SEK",
"fee": "65.71",
"health_insurance": null,
"invoiced_amount": "1314.20",
"payroll": "314.20",
"pension": null,
"tax": "300.00",
"vat": "344.97"
}, {
"amount": "3000.00",
"cost": "4139.73",
"currency": "SEK",
"fee": "197.13",
"health_insurance": null,
"invoiced_amount": "3942.60",
"payroll": "942.60",
"pension": null,
"tax": "900.00",
"vat": "1034.93"
}
]
}
List Pricing info for past Payouts.
HTTP Request
GET https://api.gigapay.se/v2/pricing/
Headers
Parameter | Required | Description |
---|---|---|
Authorization |
True | Your Authorization Token. |
Integration-ID |
True | Integration id. |
Query Parameters
Parameter | Default | Description |
---|---|---|
page |
1 | Which page to return. |
page_size |
25 | The number of Employees per page. |
invoice |
Relational Filter. | |
employee |
Relational Filter. | |
start_at |
Timestamp filter. | |
end_at |
Timestamp filter. | |
created_at |
Timestamp filter. | |
notified_at |
Timestamp filter. | |
accepted_at |
Timestamp filter. |
Calculate Pricing info
import requests
response = requests.post(
'https://api.gigapay.se/v2/pricing/',
json={
'id': 9472,
'currency': 'SEK',
'description': 'Instagram samarbete 2021-11-13.',
'full_salary_specification': True,
'employee': 1847,
'invoiced_amount': '1000.00',
},
headers={
'Authorization': 'Token cd7a4537a231356d404b553f465b6af2fa035821',
'Integration-ID': '79606358-97af-4196-b64c-5f719433d56b'
}
)
curl -X POST -H 'Authorization: Token cd7a4537a231356d404b553f465b6af2fa035821' -H 'Content-Type: application/json' -H 'Integration-ID: 79606358-97af-4196-b64c-5f719433d56b' -d '{"id": 9472, "currency": "SEK", "description": "Instagram samarbete 2021-11-13.", "full_salary_specification": true, "employee": 1847, "invoiced_amount": "1000.00"}' https://api.gigapay.se/v2/pricing/
fetch("https://api.gigapay.se/v2/pricing/", {
method: "POST",
body: JSON.stringify({
id: 9472,
currency: 'SEK',
description: 'Instagram samarbete 2021-11-13.',
full_salary_specification: true,
employee: 1847,
invoiced_amount: '1000.00',
}),
headers: {
"Authorization": "Token cd7a4537a231356d404b553f465b6af2fa035821",
"Content-Type": "application/json",
"Integration-Id": "79606358-97af-4196-b64c-5f719433d56b"
}
})
The above command returns JSON structured like this:
{
"amount": "760.92",
"cost": "1020.00",
"currency": "SEK",
"fee": "20.00",
"health_insurance": null,
"invoiced_amount": "1000.00",
"payroll": "239.18",
"pension": null,
"tax": "228.28",
"vat": "255.00"
}
This endpoint allows you to calculate the price of payout you would like to make.
HTTP Request
POST https://api.gigapay.se/v2/pricing/
Headers
Parameter | Required | Description |
---|---|---|
Authorization |
True | Your Authorization Token. |
Integration-ID |
True | Integration id. |
Idempotency-key |
False | Idempotency key. |
Body Parameters
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
id |
String | False | uuid4() | Unique per Integration. |
amount |
String | False | Either amount , invoiced_amount or cost is required. |
|
cost |
String | False | Either amount , invoiced_amount or cost is required. |
|
currency |
String | True | ||
description |
String | True | ||
employee |
String | True | ||
full_salary_specification |
Bool | False | False | |
invoiced_amount |
String | True | Either amount , invoiced_amount or cost is required. |
|
metadata |
Object | False | ||
start_at |
String | False | ||
end_at |
String | False | null |
Calculate bulk pricing info
import requests
response = requests.post(
'https://api.gigapay.se/v2/payouts/',
json=[
{
'id': 9472,
'currency': 'SEK',
'description': 'Instagram samarbete 2021-11-13.',
'full_salary_specification': True,
'employee': 1847,
'invoiced_amount': '1000.00',
}, {
'id': 9473,
'currency': 'SEK',
'description': 'Instagram samarbete 2021-11-13.',
'full_salary_specification': True,
'employee': 1736,
'invoiced_amount': '2500.00',
},
],
headers={
'Authorization': 'Token cd7a4537a231356d404b553f465b6af2fa035821',
'Integration-ID': '79606358-97af-4196-b64c-5f719433d56b'
}
)
curl -X POST -H 'Authorization: Token cd7a4537a231356d404b553f465b6af2fa035821' -H 'Content-Type: application/json' -H 'Integration-ID: 79606358-97af-4196-b64c-5f719433d56b' -d '[{"id": 9472, "currency": "SEK", "description": "Instagram samarbete 2021-11-13.", "full_salary_specification": true, "employee": 1847, "invoiced_amount": "1000.00"}, {"id": 9473, "currency": "SEK", "description": "Instagram samarbete 2021-11-13.", "full_salary_specification": true, "employee": 1736, "invoiced_amount": "2500.00"}]' https://api.gigapay.se/v2/payouts/
fetch("https://api.gigapay.se/v2/payouts/", {
method: "POST",
body: JSON.stringify([
{
'id': 9472,
'currency': 'SEK',
'description': 'Instagram samarbete 2021-11-13.',
'full_salary_specification': true,
'employee': 1847,
'invoiced_amount': '1000.00',
}, {
'id': 9473,
'currency': 'SEK',
'description': 'Instagram samarbete 2021-11-13.',
'full_salary_specification': true,
'employee': 1736,
'invoiced_amount': '2500.00',
},
]),
headers: {
"Authorization": "Token cd7a4537a231356d404b553f465b6af2fa035821",
"Content-Type": "application/json",
"Integration-Id": "79606358-97af-4196-b64c-5f719433d56b"
}
})
The above command returns JSON structured like this:
[
{
"amount": "760.92",
"cost": "1020.00",
"currency": "SEK",
"fee": "20.00",
"health_insurance": null,
"invoiced_amount": "1000.00",
"payroll": "239.18",
"pension": null,
"tax": "228.28",
"vat": "255.00"
}, {
"amount": "1902.30",
"cost": "2550.00",
"currency": "SEK",
"fee": "50.00",
"health_insurance": null,
"invoiced_amount": "2500.00",
"payroll": "597.95",
"pension": null,
"tax": "570.70",
"vat": "637.50"
}
]
The same endpoint is used to calculate the pricing info for multiple Payouts at once.
HTTP Request
POST https://api.gigapay.se/v2/pricing/
Headers
Parameter | Required | Description |
---|---|---|
Authorization |
True | Your Authorization Token. |
Integration-ID |
True | Integration id. |
Idempotency-key |
False | Idempotency key. |
Body Parameters
Type | Required | Default | Notes |
---|---|---|---|
Payout[] | True | Elements of array structured as Payout. |
Calculate Pricing info with an inline Employee
import requests
response = requests.post(
'https://api.gigapay.se/v2/pricing/?expand=employee',
json={
'id': 9472,
'currency': 'SEK',
'description': 'Instagram samarbete 2021-11-13.',
'full_salary_specification': True,
'employee': {
'id': 1847,
'name': 'Albin Lindskog',
'cellphone_number': '+4670000001',
'email': 'albin@mail.com',
'country': 'SWE'
},
'invoiced_amount': '1000.00',
},
headers={
'Authorization': 'Token cd7a4537a231356d404b553f465b6af2fa035821',
'Integration-ID': '79606358-97af-4196-b64c-5f719433d56b'
}
)
curl -X POST -H 'Authorization: Token cd7a4537a231356d404b553f465b6af2fa035821' -H 'Content-Type: application/json' -H 'Integration-ID: 79606358-97af-4196-b64c-5f719433d56b' -d '{"id": 9472, "currency": "SEK", "description": "Instagram samarbete 2021-11-13.", "full_salary_specification": true, "employee": {"id": 1847, "name": "Albin Lindskog", "cellphone_number": "+4670000001", "email": "albin@mail.com", "country": "SWE"}, "invoiced_amount": "1000.00"}' 'https://api.gigapay.se/v2/pricing/?expand=employee'
fetch("https://api.gigapay.se/v2/pricing/?expand=employee", {
method: "POST",
body: JSON.stringify({
id: 9472,
currency: 'SEK',
description: 'Instagram samarbete 2021-11-13.',
full_salary_specification: true,
employee: {
id: 1847,
name: 'Albin Lindskog',
cellphone_number: '+4670000001',
email: 'albin@mail.com',
country: 'SWE'
},
invoiced_amount: '1000.00',
}),
headers: {
"Authorization": "Token cd7a4537a231356d404b553f465b6af2fa035821",
"Content-Type": "application/json",
"Integration-Id": "79606358-97af-4196-b64c-5f719433d56b"
}
})
The above command returns JSON structured like this:
{
"amount": "760.92",
"cost": "1020.00",
"currency": "SEK",
"fee": "20.00",
"health_insurance": null,
"invoiced_amount": "1000.00",
"payroll": "239.18",
"pension": null,
"tax": "228.28",
"vat": "255.00"
}
This endpoint registers a Payout and an Employee at the same time. If an Employee with matching information is already registered will the object be reused.
HTTP Request
POST https://api.gigapay.se/v2/payouts/?expand=employee
Headers
Parameter | Required | Description |
---|---|---|
Authorization |
True | Your Authorization Token. |
Integration-ID |
True | Integration id. |
Idempotency-key |
False | Idempotency key. |
Body Parameters
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
id |
String | False | uuid4() | Unique per Integration. |
amount |
String | False | Either amount , invoiced_amount or cost is required. |
|
cost |
String | False | Either amount , invoiced_amount or cost is required. |
|
currency |
String | True | ||
description |
String | True | ||
employee |
Object | True | Structured as an Employee. | |
full_salary_specification |
Bool | False | False | |
invoiced_amount |
String | True | Either amount , invoiced_amount or cost is required. |
|
metadata |
Object | False | ||
start_at |
String | False | ||
end_at |
String | False | null |
Retrieve Pricing info of Payout
import requests
response = requests.get(
'https://api.gigapay.se/v2/pricing/9472/',
headers={
'Authorization': 'Token cd7a4537a231356d404b553f465b6af2fa035821',
'Integration-ID': '79606358-97af-4196-b64c-5f719433d56b'
}
)
curl -X GET -H 'Authorization: Token cd7a4537a231356d404b553f465b6af2fa035821' -H 'Integration-ID: 79606358-97af-4196-b64c-5f719433d56b' https://api.gigapay.se/v2/pricing/9472/
fetch("https://api.gigapay.se/v2/pricing/9472/", {
headers: {
"Authorization": "Token cd7a4537a231356d404b553f465b6af2fa035821",
"Integration-Id": "79606358-97af-4196-b64c-5f719433d56b"
}
})
The above command returns JSON structured like this:
{
"amount": "760.92",
"cost": "1020.00",
"currency": "SEK",
"fee": "20.00",
"health_insurance": null,
"invoiced_amount": "1000.00",
"payroll": "239.18",
"pension": null,
"tax": "228.28",
"vat": "255.00"
}
This endpoint retrieves a payout.
HTTP Request
GET https://api.gigapay.se/v2/pricing/:id/
Headers
Parameter | Required | Description |
---|---|---|
Authorization |
True | Your Authorization Token. |
Integration-ID |
True | Integration id. |
URL Parameters
Parameter | Required | Description |
---|---|---|
id |
True | Unique identifier for the Payout object. |
Payruns
A Payrun groups Payouts together. It is a managed object, you can not create them directly. When a Payout is created it is added to the Payrun that is currently open. If there is no open Payrun, a new will be created.
You can keep payruns open for a certain time period by enabling batching of payouts. Contact support@gigapay.se if you are interested in this.
The Payrun object
An example Payrun object:
{
"app": "https://app.gigapay.se/i/2859272/?token=Ii9pbnZvaWNpbmcvb3Blbl9pbnZvaWNlcy9jMTMzYzIwMi0xMDUwLTQ5NTktODMwNi05NWQ3Y2IzZjNiMjgvIg",
"created_at": "2019-05-22T10:32:36.118753Z",
"currency": "SEK",
"id": "2859272",
"metadata": {},
"ocr_number": "986911160380",
"open": false,
"paid_at": "2019-05-25T9:02:16.8462735Z",
"pdf": "https://api.gigapay.se/invoice/cad7d4d7-cdc7-4f70-8246-c061e041e9e/?token=Ii9pbnZvaWNpbmcvb3Blbl9pbnZvaWNlcy8zYjcyNTYyOS05MTE4LTQ5YTctYTFiYS0yMTU4NTZhMzYwOTgvIg&language=en",
"price": "1340.48"
}
Attribute | Description |
---|---|
app |
Link to pay invoice in app. |
created_at |
Time at which the Invoice was created. Displayed as ISO 8601 string. |
currency |
ISO-4217 currency code. |
id |
A unique identifier for the object. |
metadata |
JSON-encoded metadata. |
ocr_number |
Bank reference. |
open |
Whether the Payrun is the currently open one. |
paid_at |
Time at which the Payrun was paid. Displayed as ISO 8601 string. |
pdf |
Link to download a pdf version of the Payrun. |
price |
Decimal formatted string of the price. |
List All Payruns
import requests
response = requests.get(
'https://api.gigapay.se/v2/payruns/',
headers={
'Authorization': 'Token cd7a4537a231356d404b553f465b6af2fa035821',
'Integration-ID': '79606358-97af-4196-b64c-5f719433d56b'
}
)
curl -X GET -H 'Authorization: Token cd7a4537a231356d404b553f465b6af2fa035821' -H 'Integration-ID: 79606358-97af-4196-b64c-5f719433d56b' https://api.gigapay.se/v2/payruns/
fetch("https://api.gigapay.se/v2/payruns/", {
headers: {
"Authorization": "Token cd7a4537a231356d404b553f465b6af2fa035821",
"Integration-Id": "79606358-97af-4196-b64c-5f719433d56b"
}
})
The above command returns JSON structured like this:
{
"count": 4,
"next": null,
"previous": "https://api.gigapay.se/v2/payruns/?page=1",
"results": [
{
"app": "https://app.gigapay.se/i/2859272/?token=Ii9pbnZvaWNpbmcvb3Blbl9pbnZvaWNlcy9jMTMzYzIwMi0xMDUwLTQ5NTktODMwNi05NWQ3Y2IzZjNiMjgvIg",
"created_at": "2019-05-22T10:32:36.118753Z",
"currency": "SEK",
"id": "2859272",
"metadata": {},
"ocr_number": "986911160380",
"open": false,
"paid_at": "2019-05-25T9:02:16.8462735Z",
"pdf": "https://api.gigapay.se/invoice/cad7d4d7-cdc7-4f70-8246-c061e041e9e/?token=Ii9pbnZvaWNpbmcvb3Blbl9pbnZvaWNlcy8zYjcyNTYyOS05MTE4LTQ5YTctYTFiYS0yMTU4NTZhMzYwOTgvIg&language=en",
"price": "1340.48"
}, {
"app": "https://app.gigapay.se/i/2859273/?token=Ii9pbnZvaWNpbmcvb3Blbl9pbnZvaWNlcy9jMTMzYzIwMi0xMDUwLTQ5NTktODMwNi05NWQ3Y2IzZjNiMjgvIg",
"created_at": "2019-06-22T10:28:21.847474Z",
"currency": "SEK",
"id": "2859273",
"metadata": {},
"ocr_number": "986911160349",
"open": false,
"paid_at": "2019-06-25T9:12:57.742648Z",
"pdf": "https://api.gigapay.se/invoice/cad7d4d7-cdc7-4f70-8246-c061e041e9e/?token=Ii9pbnZvaWNpbmcvb3Blbl9pbnZvaWNlcy8zYjcyNTYyOS05MTE4LTQ5YTctYTFiYS0yMTU4NTZhMzYwOTgvIg&language=en",
"price": "1340.48"
}
}
This endpoint retrieves all Payruns.
HTTP Request
GET https://api.gigapay.se/v2/payruns/
Headers
Parameter | Required | Description |
---|---|---|
Authorization |
True | Your Authorization Token. |
Integration-ID |
True | Integration id. |
Query Parameters
Parameter | Default | Description |
---|---|---|
page |
1 | Which page to return. |
page_size |
25 | The number of Payruns per page. |
created_at |
Timestamp filter. | |
paid_at |
Timestamp filter. |
Retrieve a Payrun
import requests
response = requests.get(
'https://api.gigapay.se/v2/payruns/2859272/',
headers={
'Authorization': 'Token cd7a4537a231356d404b553f465b6af2fa035821',
'Integration-ID': '79606358-97af-4196-b64c-5f719433d56b'
}
)
curl -X GET -H 'Authorization: Token cd7a4537a231356d404b553f465b6af2fa035821' -H 'Integration-ID: 79606358-97af-4196-b64c-5f719433d56b' https://api.gigapay.se/v2/payruns/2859272/
fetch("https://api.gigapay.se/v2/payruns/2859272/", {
headers: {
"Authorization": "Token cd7a4537a231356d404b553f465b6af2fa035821",
"Integration-Id": "79606358-97af-4196-b64c-5f719433d56b"
}
})
The above command returns JSON structured like this:
{
"app": "https://app.gigapay.se/i/2859272/?token=Ii9pbnZvaWNpbmcvb3Blbl9pbnZvaWNlcy9jMTMzYzIwMi0xMDUwLTQ5NTktODMwNi05NWQ3Y2IzZjNiMjgvIg",
"created_at": "2019-05-22T10:32:36.118753Z",
"currency": "SEK",
"id": "2859272",
"metadata": {},
"ocr_number": "986911160380",
"open": false,
"paid_at": "2019-05-25T9:02:16.8462735Z",
"pdf": "https://api.gigapay.se/invoice/cad7d4d7-cdc7-4f70-8246-c061e041e9e/?token=Ii9pbnZvaWNpbmcvb3Blbl9pbnZvaWNlcy8zYjcyNTYyOS05MTE4LTQ5YTctYTFiYS0yMTU4NTZhMzYwOTgvIg&language=en",
"price": "1340.48"
}
This endpoint retrieves a Payrun.
HTTP Request
GET https://api.gigapay.se/v2/payruns/:id/
Headers
Parameter | Required | Description |
---|---|---|
Authorization |
True | Your Authorization Token. |
Integration-ID |
True | Integration id. |
URL Parameters
Parameter | Required | Description |
---|---|---|
id |
True | Unique identifier for the object. |
Update a Payrun
import requests
response = requests.patch(
'https://api.gigapay.se/v2/payruns/2859272/',
json={
'id': '846271',
'metadata': {'original_id': '2859272'}
},
headers={
'Authorization': 'Token cd7a4537a231356d404b553f465b6af2fa035821',
'Integration-ID': '79606358-97af-4196-b64c-5f719433d56b'
}
)
curl -X PATCH -H 'Authorization: Token cd7a4537a231356d404b553f465b6af2fa035821' -H 'Content-Type: application/json' -H 'Integration-ID: 79606358-97af-4196-b64c-5f719433d56b' -d '{"id": "846271", "metadata": {"original_id": "2859272"}}' https://api.gigapay.se/v2/payruns/2859272/
fetch("https://api.gigapay.se/v2/payruns/2859272/", {
method: "PATCH",
body: JSON.stringify({'id': '846271', 'metadata': {'original_id': '2859272'}}),
headers: {
"Authorization": "Token cd7a4537a231356d404b553f465b6af2fa035821",
"Content-Type": "application/json",
"Integration-Id": "79606358-97af-4196-b64c-5f719433d56b"
},
})
The above command returns JSON structured like this:
{
"app": "https://app.gigapay.se/i/2859272/?token=Ii9pbnZvaWNpbmcvb3Blbl9pbnZvaWNlcy9jMTMzYzIwMi0xMDUwLTQ5NTktODMwNi05NWQ3Y2IzZjNiMjgvIg",
"created_at": "2019-05-22T10:32:36.118753Z",
"currency": "SEK",
"id": "846271",
"metadata": {
"original_id": "2859272"
},
"ocr_number": "986911160380",
"open": false,
"paid_at": "2019-05-25T9:02:16.8462735Z",
"pdf": "https://api.gigapay.se/invoice/cad7d4d7-cdc7-4f70-8246-c061e041e9e/?token=Ii9pbnZvaWNpbmcvb3Blbl9pbnZvaWNlcy8zYjcyNTYyOS05MTE4LTQ5YTctYTFiYS0yMTU4NTZhMzYwOTgvIg&language=en",
"price": "1340.48"
}
This endpoint updates a Payrun.
HTTP Request
PATCH https://api.gigapay.se/v2/payruns/:id/
Headers
Parameter | Required | Description |
---|---|---|
Authorization |
True | Your Authorization Token. |
Integration-ID |
True | Integration id. |
URL Parameters
Parameter | Required | Description |
---|---|---|
id |
True | Unique identifier for the object. |
Body Parameters
Parameter | Type | Required | Default | Notes |
---|---|---|---|---|
id |
String | False | Previous value | Unique per Integration. |
metadata |
Object | False | Previous value |
Finalize a Payrun
import requests
response = requests.post(
'https://api.gigapay.se/v2/payruns/846271/close/',
headers={
'Authorization': 'Token cd7a4537a231356d404b553f465b6af2fa035821',
'Integration-ID': '79606358-97af-4196-b64c-5f719433d56b'
}
)
curl -X POST -H 'Authorization: Token cd7a4537a231356d404b553f465b6af2fa035821' -H 'Integration-ID: 79606358-97af-4196-b64c-5f719433d56b' https://api.gigapay.se/v2/payruns/846271/close/
fetch("https://api.gigapay.se/v2/payruns/846271/close/", {
method: "POST",
headers: {
"Authorization": "Token cd7a4537a231356d404b553f465b6af2fa035821",
"Integration-Id": "79606358-97af-4196-b64c-5f719433d56b"
}
})
The above command returns an empty response.
Payruns are initially created in an open state (pro-forma) and are not immediately finalized. This allows users to review and edit their payruns before submission.
Once the payrun is ready, it can be finalized using this endpoint. Finalization has two important effects: 1. The payouts become visible to the employees 2. The payrun is sent to the email address configured in the integration settings
HTTP Request
POST https://api.gigapay.se/v2/payruns/:id/close/
Headers
Parameter | Required | Description |
---|---|---|
Authorization |
True | Your Authorization Token. |
Integration-ID |
True | Integration id. |
URL Parameters
Parameter | Required | Description |
---|---|---|
id |
True | Unique identifier for the object. |
Delete a Payrun
import requests
response = requests.delete(
'https://api.gigapay.se/v2/payruns/846271/',
headers={
'Authorization': 'Token cd7a4537a231356d404b553f465b6af2fa035821',
'Integration-ID': '79606358-97af-4196-b64c-5f719433d56b'
}
)
curl -X DELETE -H 'Authorization: Token cd7a4537a231356d404b553f465b6af2fa035821' -H 'Integration-ID: 79606358-97af-4196-b64c-5f719433d56b' https://api.gigapay.se/v2/payruns/846271/
fetch("https://api.gigapay.se/v2/payruns/846271/", {
method: "DELETE",
headers: {
"Authorization": "Token cd7a4537a231356d404b553f465b6af2fa035821",
"Integration-Id": "79606358-97af-4196-b64c-5f719433d56b"
}
})
The above command returns an empty response.
This endpoint deletes a Payrun. Note that you can not delete a paid Payrun or a Payrun on credit.
HTTP Request
DELETE https://api.gigapay.se/v2/payruns/:id/
Headers
Parameter | Required | Description |
---|---|---|
Authorization |
True | Your Authorization Token. |
Integration-ID |
True | Integration id. |
URL Parameters
Parameter | Required | Description |
---|---|---|
id |
True | Unique identifier for the object. |
Invoices
The invoice API provides a standardized interface for accessing all invoice types (payrun, prepayment, subscription, credit).
The Invoice Object
An example invoice object:
{
"id": "a0c72032-8e02-4d5d-be09-274dc67dbe2d",
"created_at": "2019-06-22T10:28:21.847474Z",
"issued_at": "2019-06-23T10:28:21.847474Z",
"paid_at": "2019-06-24T10:28:21.847474Z",
"due_date": "2024-02-15",
"currency": "EUR",
"total": "1250.00",
"amount_due": "0.00",
"amount_paid": "1250.00",
"invoice_number": "986911160380",
"customer_reference": "PO-2024-001",
"billing_type": "prepayment",
"pdf_url": null
}
Attribute | Description |
---|---|
id |
Unique identifier for the invoice (UUID4). |
created_at |
Time at which the invoice was created. ISO 8601 string. |
issued_at |
Time at which proforma was converted to invoice. Null for proformas. |
paid_at |
Time at which the invoice was paid. ISO 8601 string. |
due_date |
Due date for payment. ISO 8601 date string. |
currency |
ISO-4217 currency code. |
total |
Total invoice amount as decimal string. |
amount_due |
Amount still due (0 if paid, total minus prepayment usage). |
amount_paid |
Amount paid (full total if paid_at is set). |
invoice_number |
OCR/reference number for the invoice. |
customer_reference |
Customer reference (invoice_marking). |
billing_type |
Type of invoice: prepayment , payrun , subscription , credit . |
pdf_url |
URL to download invoice PDF (currently returns null - feature not yet implemented). |
List All Invoices
import requests
response = requests.get(
'https://api.gigapay.se/v2/invoices/',
headers={
'Authorization': 'Token cd7a4537a231356d404b553f465b6af2fa035821',
'Integration-ID': '79606358-97af-4196-b64c-5f719433d56b'
}
)
curl -X GET -H 'Authorization: Token cd7a4537a231356d404b553f465b6af2fa035821' -H 'Integration-ID: 79606358-97af-4196-b64c-5f719433d56b' https://api.gigapay.se/v2/invoices/
fetch("https://api.gigapay.se/v2/invoices/", {
headers: {
"Authorization": "Token cd7a4537a231356d404b553f465b6af2fa035821",
"Integration-ID": "79606358-97af-4196-b64c-5f719433d56b"
}
})
This endpoint retrieves all invoices across all invoice types.
The above command returns JSON structured like this:
{
"count": 1,
"next": null,
"previous": null,
"results": [
{
"id": "a0c72032-8e02-4d5d-be09-274dc67dbe2d",
"created_at": "2019-06-22T10:28:21.847474Z",
"issued_at": "2019-06-23T10:28:21.847474Z",
"paid_at": null,
"due_date": "2024-02-15",
"currency": "EUR",
"total": "1250.00",
"amount_due": "1250.00",
"amount_paid": "0.00",
"invoice_number": "986911160380",
"customer_reference": "PO-2024-001",
"billing_type": "payrun",
"pdf_url": "https://api.gigapay.se/invoice/a0c72032-8e02-4d5d-be09-274dc67dbe2d/?token=some-token&language=en"
}
]
}
HTTP Request
GET https://api.gigapay.se/v2/invoices/
Query Parameters
Parameter | Default | Description |
---|---|---|
page |
1 | Which page to return. |
page_size |
25 | The number of invoices per page. |
billing_type |
Filter by type: prepayment , payrun , subscription , credit . |
|
status |
Filter by status: proforma , invoice , paid . |
|
ordering |
Sort by: created_at , paid_at , due_date (prefix with - for desc). |
Retrieve an Invoice
import requests
response = requests.get(
'https://api.gigapay.se/v2/invoices/a0c72032-8e02-4d5d-be09-274dc67dbe2d/',
headers={
'Authorization': 'Token cd7a4537a231356d404b553f465b6af2fa035821',
'Integration-ID': '79606358-97af-4196-b64c-5f719433d56b'
}
)
curl -X GET -H 'Authorization: Token cd7a4537a231356d404b553f465b6af2fa035821' -H 'Integration-ID: 79606358-97af-4196-b64c-5f719433d56b' https://api.gigapay.se/v2/invoices/a0c72032-8e02-4d5d-be09-274dc67dbe2d/
fetch("https://api.gigapay.se/v2/invoices/a0c72032-8e02-4d5d-be09-274dc67dbe2d/", {
headers: {
"Authorization": "Token cd7a4537a231356d404b553f465b6af2fa035821",
"Integration-ID": "79606358-97af-4196-b64c-5f719433d56b"
}
})
This endpoint retrieves a specific invoice.
The above command returns JSON structured like this:
{
"id": "a0c72032-8e02-4d5d-be09-274dc67dbe2d",
"created_at": "2019-06-22T10:28:21.847474Z",
"issued_at": "2019-06-23T10:28:21.847474Z",
"paid_at": null,
"due_date": "2024-02-15",
"currency": "EUR",
"total": "1250.00",
"amount_due": "1250.00",
"amount_paid": "0.00",
"invoice_number": "986911160380",
"customer_reference": "PO-2024-001",
"billing_type": "payrun",
"pdf_url": "https://api.gigapay.se/invoice/a0c72032-8e02-4d5d-be09-274dc67dbe2d/?token=some-token&language=en"
}
HTTP Request
GET https://api.gigapay.se/v2/invoices/:id/
URL Parameters
Parameter | Description |
---|---|
id |
The ID of the invoice to retrieve |
Issue Invoice
import requests
response = requests.post(
'https://api.gigapay.se/v2/invoices/a9d59fad-4e74-4471-a081-1d8a8a107ab5/issue/',
headers={
'Authorization': 'Token cd7a4537a231356d404b553f465b6af2fa035821',
'Integration-ID': '79606358-97af-4196-b64c-5f719433d56b'
},
json={
"due_date": "2024-02-15"
}
)
curl -X POST -H 'Authorization: Token cd7a4537a231356d404b553f465b6af2fa035821' \
-H 'Integration-ID: 79606358-97af-4196-b64c-5f719433d56b' \
-H 'Content-Type: application/json' \
-d '{"due_date":"2024-02-15"}' \
https://api.gigapay.se/v2/invoices/a0c72032-8e02-4d5d-be09-274dc67dbe2d/issue/
fetch("https://api.gigapay.se/v2/invoices/a0c72032-8e02-4d5d-be09-274dc67dbe2d/issue/", {
method: "POST",
headers: {
"Authorization": "Token cd7a4537a231356d404b553f465b6af2fa035821",
"Integration-ID": "79606358-97af-4196-b64c-5f719433d56b",
"Content-Type": "application/json"
},
body: JSON.stringify({
"due_date": "2024-02-15"
})
})
This action issues any invoice type (including prepayment proformas) as a payable invoice. The operation returns a conflict error if the invoice is already issued. Requires the integration to have invoice_enabled=True
permission.
HTTP Request
POST https://api.gigapay.se/v2/invoices/:id/issue/
Parameters
Parameter | Required | Description |
---|---|---|
due_date |
False | Due date (ISO date format). Uses integration's payment terms or 14-day fallback if omitted. Must be today or future date, maximum 365 days in future. |
Response
The above command returns JSON structured like this:
{
"id": "a0c72032-8e02-4d5d-be09-274dc67dbe2d",
"created_at": "2019-06-22T10:28:21.847474Z",
"issued_at": "2024-02-15T10:28:21.847474Z",
"paid_at": null,
"due_date": "2024-02-15",
"currency": "EUR",
"total": "1250.00",
"amount_due": "1250.00",
"amount_paid": "0.00",
"invoice_number": "986911160380",
"customer_reference": "PO-2024-001",
"billing_type": "payrun",
"pdf_url": "https://api.gigapay.se/invoice/a0c72032-8e02-4d5d-be09-274dc67dbe2d/?token=hej&language=en"
}
Returns the updated invoice object with issued_at
timestamp and due_date
set.
Errors
Status | Error | Description |
---|---|---|
403 | Integration does not have permission | Integration has invoice_enabled=False |
409 | Invoice already issued | Invoice was previously issued (idempotent operation) |
400 | Validation error | Invalid due_date (past date or >365 days future) |
Prepayments
Prepayments allow clients to pre-fund anticipated payments, enabling InstantPay. Once paid, prepayments are automatically used to cover payruns in a first-in-first-out (FIFO) manner. The deduction will be shown in the monthly payrun settlement.
The Prepayment Object
An example prepayment object:
{
"id": "a0c72032-8e02-4d5d-be09-274dc67dbe2d",
"description": "Q1 2024 Influencer Campaign Budget",
"net_amount": "10000.00",
"currency": "EUR",
"available_balance": "9000.00",
"invoice_marking": "PO-2024-001",
"status": "PAID",
"created_at": "2019-06-22T10:28:21.847474Z",
"invoiced_at": "2019-06-23T10:28:21.847474Z",
"paid_at": "2019-06-24T10:28:21.847474Z",
"metadata": {},
"invoice": "a9d59fad-4e74-4471-a081-1d8a8a107ab5"
}
Attribute | Description |
---|---|
id |
Unique identifier for the prepayment. |
description |
Description of the prepayment purpose. |
net_amount |
Total prepayment amount as decimal string. |
currency |
ISO-4217 currency code. |
available_balance |
Remaining balance after usage (0 if not paid). |
invoice_marking |
Customer reference/PO number. |
status |
Status: DRAFT , INVOICED , PAID , PARTIALLY_USED , FULLY_USED . |
created_at |
Time at which prepayment was created. ISO 8601 string. |
invoiced_at |
Time at which proforma was converted to invoice. |
paid_at |
Time at which prepayment was paid. |
metadata |
JSON metadata object for storing arbitrary data. |
invoice |
Invoice reference (expandable). |
Expandable Invoice Reference
The invoice
field can be expanded to show full invoice details by using the expand
query parameter:
# Collapsed (default) - returns invoice ID only
curl -X GET https://api.gigapay.se/v2/prepayments/a0c72032-8e02-4d5d-be09-274dc67dbe2d/
# Expanded - returns full invoice object
curl -X GET https://api.gigapay.se/v2/prepayments/a0c72032-8e02-4d5d-be09-274dc67dbe2d/?expand=invoice
List Prepayments
const response = await fetch('https://api.gigapay.se/v2/prepayments/', {
method: 'GET',
headers: {
'Authorization': 'Token cd7a4537a231356d404b553f465b6af2fa035821',
'Integration-ID': '79606358-97af-4196-b64c-5f719433d56b'
}
});
import requests
response = requests.get(
'https://api.gigapay.se/v2/prepayments/',
headers={
'Authorization': 'Token cd7a4537a231356d404b553f465b6af2fa035821',
'Integration-ID': '79606358-97af-4196-b64c-5f719433d56b'
}
)
curl -X GET -H 'Authorization: Token cd7a4537a231356d404b553f465b6af2fa035821' \
-H 'Integration-ID: 79606358-97af-4196-b64c-5f719433d56b' \
https://api.gigapay.se/v2/prepayments/
The above command returns JSON structured like this:
{
"count": 4,
"next": null,
"previous": "https://api.gigapay.se/v2/prepayments/?page=1&page_size=2",
"results": [
{
"id": "a0c72032-8e02-4d5d-be09-274dc67dbe2d",
"description": "Q1 2024 Influencer Campaign Budget",
"net_amount": "10000.00",
"currency": "EUR",
"available_balance": "9000.00",
"invoice_marking": "PO-2024-001",
"status": "PAID",
"created_at": "2019-06-22T10:28:21.847474Z",
"invoiced_at": "2019-06-23T10:28:21.847474Z",
"paid_at": "2019-06-24T10:28:21.847474Z",
"invoice": "a9d59fad-4e74-4471-a081-1d8a8a107ab5",
"metadata": {}
},
{
"id": "b1d73143-9f13-5e6e-cf1a-385ed68ecf3e",
"description": "Q2 2024 Marketing Budget",
"net_amount": "5000.00",
"currency": "SEK",
"available_balance": "0.00",
"invoice_marking": "PO-2024-002",
"status": "DRAFT",
"created_at": "2019-07-01T08:15:30.123456Z",
"invoiced_at": null,
"paid_at": null,
"invoice": "c8e74152-0a24-5f7f-d092-296fe79fdf6b",
"metadata": {
"department": "marketing",
"campaign": "summer_2024"
}
}
]
}
HTTP Request
GET https://api.gigapay.se/v2/prepayments/
Create a Prepayment
const response = await fetch('https://api.gigapay.se/v2/prepayments/', {
method: 'POST',
headers: {
'Authorization': 'Token cd7a4537a231356d404b553f465b6af2fa035821',
'Integration-ID': '79606358-97af-4196-b64c-5f719433d56b',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"description": "Q1 2024 Influencer Campaign Budget",
"net_amount": "10000.00",
"currency": "EUR",
"invoice_marking": "PO-2024-001",
"metadata": {}
})
});
import requests
response = requests.post(
'https://api.gigapay.se/v2/prepayments/',
headers={
'Authorization': 'Token cd7a4537a231356d404b553f465b6af2fa035821',
'Integration-ID': '79606358-97af-4196-b64c-5f719433d56b'
},
json={
"description": "Q1 2024 Influencer Campaign Budget",
"net_amount": "10000.00",
"currency": "EUR",
"invoice_marking": "PO-2024-001",
"metadata": {}
}
)
curl -X POST -H 'Authorization: Token cd7a4537a231356d404b553f465b6af2fa035821' \
-H 'Integration-ID: 79606358-97af-4196-b64c-5f719433d56b' \
-H 'Content-Type: application/json' \
-d '{"description":"Q1 2024 Influencer Campaign Budget","net_amount":"10000.00","currency":"EUR","invoice_marking":"PO-2024-001","metadata":{}}' \
https://api.gigapay.se/v2/prepayments/
The above command returns JSON structured like this:
{
"id": "a0c72032-8e02-4d5d-be09-274dc67dbe2d",
"description": "Q1 2024 Influencer Campaign Budget",
"net_amount": "10000.00",
"currency": "EUR",
"available_balance": "0.00",
"invoice_marking": "PO-2024-001",
"status": "DRAFT",
"created_at": "2019-06-22T10:28:21.847474Z",
"invoiced_at": null,
"paid_at": null,
"invoice": "a9d59fad-4e74-4471-a081-1d8a8a107ab5",
"metadata": {}
}
HTTP Request
POST https://api.gigapay.se/v2/prepayments/
Parameters
Parameter | Required | Description |
---|---|---|
description |
True | Description of the prepayment purpose. |
net_amount |
True | Prepayment amount (positive decimal). |
currency |
True | ISO-4217 currency code (3 letters). |
invoice_marking |
False | Customer reference/PO number. |
metadata |
False | JSON metadata object for arbitrary data. |
Retrieve a Prepayment
const response = await fetch('https://api.gigapay.se/v2/prepayments/a0c72032-8e02-4d5d-be09-274dc67dbe2d/', {
method: 'GET',
headers: {
'Authorization': 'Token cd7a4537a231356d404b553f465b6af2fa035821',
'Integration-ID': '79606358-97af-4196-b64c-5f719433d56b'
}
});
import requests
response = requests.get(
'https://api.gigapay.se/v2/prepayments/a0c72032-8e02-4d5d-be09-274dc67dbe2d/',
headers={
'Authorization': 'Token cd7a4537a231356d404b553f465b6af2fa035821',
'Integration-ID': '79606358-97af-4196-b64c-5f719433d56b'
}
)
curl -X GET -H 'Authorization: Token cd7a4537a231356d404b553f465b6af2fa035821' \
-H 'Integration-ID: 79606358-97af-4196-b64c-5f719433d56b' \
https://api.gigapay.se/v2/prepayments/a0c72032-8e02-4d5d-be09-274dc67dbe2d/
The above command returns JSON structured like this:
{
"id": "a0c72032-8e02-4d5d-be09-274dc67dbe2d",
"description": "Q1 2024 Influencer Campaign Budget",
"net_amount": "10000.00",
"currency": "EUR",
"available_balance": "9000.00",
"invoice_marking": "PO-2024-001",
"status": "PAID",
"created_at": "2019-06-22T10:28:21.847474Z",
"invoiced_at": "2019-06-23T10:28:21.847474Z",
"paid_at": "2019-06-24T10:28:21.847474Z",
"invoice": "a9d59fad-4e74-4471-a081-1d8a8a107ab5",
"metadata": {}
}
HTTP Request
GET https://api.gigapay.se/v2/prepayments/:id/
Update a Prepayment
const response = await fetch('https://api.gigapay.se/v2/prepayments/a0c72032-8e02-4d5d-be09-274dc67dbe2d/', {
method: 'PATCH',
headers: {
'Authorization': 'Token cd7a4537a231356d404b553f465b6af2fa035821',
'Integration-ID': '79606358-97af-4196-b64c-5f719433d56b',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"description": "Updated Q1 2024 Influencer Campaign Budget",
"invoice_marking": "PO-2024-001-UPDATED",
"metadata": {"campaign_type": "influencer"}
})
});
import requests
response = requests.patch(
'https://api.gigapay.se/v2/prepayments/a0c72032-8e02-4d5d-be09-274dc67dbe2d/',
headers={
'Authorization': 'Token cd7a4537a231356d404b553f465b6af2fa035821',
'Integration-ID': '79606358-97af-4196-b64c-5f719433d56b'
},
json={
"description": "Updated Q1 2024 Influencer Campaign Budget",
"invoice_marking": "PO-2024-001-UPDATED",
"metadata": {"campaign_type": "influencer"}
}
)
curl -X PATCH -H 'Authorization: Token cd7a4537a231356d404b553f465b6af2fa035821' \
-H 'Integration-ID: 79606358-97af-4196-b64c-5f719433d56b' \
-H 'Content-Type: application/json' \
-d '{"description":"Updated Q1 2024 Influencer Campaign Budget","invoice_marking":"PO-2024-001-UPDATED","metadata":{"campaign_type":"influencer"}}' \
https://api.gigapay.se/v2/prepayments/a0c72032-8e02-4d5d-be09-274dc67dbe2d/
Note: Prepayments can only be updated while in DRAFT
status. Once invoiced or paid, they become read-only.
The above command returns JSON structured like this:
{
"id": "a0c72032-8e02-4d5d-be09-274dc67dbe2d",
"description": "Updated Q1 2024 Influencer Campaign Budget",
"net_amount": "10000.00",
"currency": "EUR",
"available_balance": "0.00",
"invoice_marking": "PO-2024-001-UPDATED",
"status": "DRAFT",
"created_at": "2019-06-22T10:28:21.847474Z",
"invoiced_at": null,
"paid_at": null,
"invoice": "a9d59fad-4e74-4471-a081-1d8a8a107ab5",
"metadata": {
"campaign_type": "influencer"
}
}
HTTP Request
PATCH https://api.gigapay.se/v2/prepayments/:id/
Parameters
Parameter | Required | Description |
---|---|---|
description |
False | Description of the prepayment purpose. |
net_amount |
False | Prepayment amount (positive decimal). |
currency |
False | ISO-4217 currency code (3 letters). |
invoice_marking |
False | Customer reference/PO number. |
metadata |
False | JSON metadata object for arbitrary data. |
Delete a Prepayment
const response = await fetch('https://api.gigapay.se/v2/prepayments/a0c72032-8e02-4d5d-be09-274dc67dbe2d/', {
method: 'DELETE',
headers: {
'Authorization': 'Token cd7a4537a231356d404b553f465b6af2fa035821',
'Integration-ID': '79606358-97af-4196-b64c-5f719433d56b'
}
});
import requests
response = requests.delete(
'https://api.gigapay.se/v2/prepayments/a0c72032-8e02-4d5d-be09-274dc67dbe2d/',
headers={
'Authorization': 'Token cd7a4537a231356d404b553f465b6af2fa035821',
'Integration-ID': '79606358-97af-4196-b64c-5f719433d56b'
}
)
curl -X DELETE -H 'Authorization: Token cd7a4537a231356d404b553f465b6af2fa035821' \
-H 'Integration-ID: 79606358-97af-4196-b64c-5f719433d56b' \
https://api.gigapay.se/v2/prepayments/a0c72032-8e02-4d5d-be09-274dc67dbe2d/
Note: Prepayments can only be deleted while in DRAFT
status. Once invoiced or paid, deletion is not permitted.
HTTP Request
DELETE https://api.gigapay.se/v2/prepayments/:id/
Payment Term
Payment Term defines the financial conditions under which your Gigapay integration operates, including credit limits, payment schedules, and batching intervals for processing payouts.
Prepayments affect your credit limit dynamically: when a prepayment is paid, your available credit limit increases by that amount. When a payrun is settled against your prepayment credit, your available credit limit decreases accordingly.
The Payment Term object
An example Payment Term object:
{
"batching_duration": 86400,
"due_days": 14,
"batching_interval": "weekly",
"credit_terms": [
{
"currency": "SEK",
"credit_limit": "50000.00",
"credit_used": "12345.67"
},
{
"currency": "EUR",
"credit_limit": "25000.00",
"credit_used": "5432.10"
}
]
}
Attribute | Description |
---|---|
batching_duration |
Duration in seconds that a Payrun stays active before being automatically closed. |
due_days |
Number of days from invoice issuance until payment is due. |
batching_interval |
Frequency at which payruns are automatically closed. One of: weekly , monthly , quarterly . |
credit_terms |
Array of credit term objects, one per supported currency. |
credit_terms[].currency |
ISO-4217 currency code for this credit term. |
credit_terms[].credit_limit |
Maximum credit amount available in this currency (decimal formatted string). |
credit_terms[].credit_used |
Currently used credit amount in this currency (decimal formatted string). |
Retrieve Payment Term
import requests
response = requests.get(
'https://api.gigapay.se/v2/payment_term/',
headers={
'Authorization': 'Token cd7a4537a231356d404b553f465b6af2fa035821',
'Integration-ID': '79606358-97af-4196-b64c-5f719433d56b'
}
)
curl -X GET -H 'Authorization: Token cd7a4537a231356d404b553f465b6af2fa035821' -H 'Integration-ID: 79606358-97af-4196-b64c-5f719433d56b' https://api.gigapay.se/v2/payment_term/
fetch("https://api.gigapay.se/v2/payment_term/", {
headers: {
"Authorization": "Token cd7a4537a231356d404b553f465b6af2fa035821",
"Integration-ID": "79606358-97af-4196-b64c-5f719433d56b"
}
})
The above command returns JSON structured like this:
{
"batching_duration": 86400,
"due_days": 14,
"batching_interval": "weekly",
"credit_terms": [
{
"currency": "SEK",
"credit_limit": "50000.00",
"credit_used": "12345.67"
},
{
"currency": "EUR",
"credit_limit": "25000.00",
"credit_used": "5432.10"
}
]
}
This endpoint retrieves your payment term configuration, including credit limits and current usage across all supported currencies.
HTTP Request
GET https://api.gigapay.se/v2/payment_term/
Headers
Parameter | Required | Description |
---|---|---|
Authorization |
True | Your Authorization Token. |
Integration-ID |
True | Integration id. |
Webhooks
Webhooks allows you to receive real-time status updates any time an event happens on your account. For a complete description of these notifications, see Events.
In the case where the receiving server is unavailable, we will retry the webhook notification up to 10 times with an exponential backoff.
The Webhook object
An example Webhook object
{
"id": "38a93e19-886a-4246-9cfe-471214ff6739",
"url": "https://jobmatchr.se/webhooks/payouts/",
"events": ["Payout.notified", "Payout.accepted"],
"secret_key": "c1329a085d65f7757838df5920fdcc9a",
"metadata": {}
}
Attribute | Description |
---|---|
id |
Unique identifier for the object. |
url |
URL to which the notifications are posted. |
events |
List of events to subscribe to. |
secret_key |
Secret key used to sign the Webhook notifications. |
metadata |
JSON-encoded metadata. |
List All Registered Webhooks
import requests
response = requests.get(
'https://api.gigapay.se/v2/webhooks/',
headers={
'Authorization': 'Token cd7a4537a231356d404b553f465b6af2fa035821',
'Integration-ID': '79606358-97af-4196-b64c-5f719433d56b'
}
)
curl -X GET -H 'Authorization: Token cd7a4537a231356d404b553f465b6af2fa035821' -H 'Integration-ID: 79606358-97af-4196-b64c-5f719433d56b' https://api.gigapay.se/v2/webhooks/
fetch("https://api.gigapay.se/v2/webhooks/", {
headers: {
"Authorization": "Token cd7a4537a231356d404b553f465b6af2fa035821",
"Integration-Id": "79606358-97af-4196-b64c-5f719433d56b"
}
})
The above command returns JSON structured like this:
{
"count": 4,
"next": null,
"previous": "https://api.gigapay.se/v2/webhooks/?page=2",
"results": [
{
"id": "38a93e19-886a-4246-9cfe-471214ff6739",
"url": "https://jobmatchr.se/webhooks/payouts/",
"events": ["Payout.notified", "Payout.accepted"],
"secret_key": "c1329a085d65f7757838df5920fdcc9a",
"metadata": {}
}, {
"id": "0630bfcf-ad0a-458a-9794-816b54b542b6",
"url": "https://jobmatchr.se/webhooks/employees/",
"events": ["Employee.verified"],
"secret_key": "1fc0ee40ecf33f83cbd3f930443074ca",
"metadata": {}
}
]
}
This endpoint retrieves all webhooks.
HTTP Request
GET https://api.gigapay.se/v2/webhooks/
Headers
Parameter | Required | Description |
---|---|---|
Authorization |
True | Your Authorization Token. |
Integration-ID |
True for integration-scoped webhooks | Having integration id in the header will list integration-scoped webhook along with user-scoped webhooks. If it ommited then only user-scoped webhooks will be listed. |
Query Parameters
Parameter | Default | Description |
---|---|---|
page |
1 | Which page to return. |
page_size |
25 | The number of Webhooks per page. |
Register a Webhook
import requests
response = requests.post(
'https://api.gigapay.se/v2/webhooks/',
json={
'url': 'https://jobmatchr.se/webhooks/payouts/',
'events': ['Payout.created']
},
headers={
'Authorization': 'Token cd7a4537a231356d404b553f465b6af2fa035821',
'Integration-ID': '79606358-97af-4196-b64c-5f719433d56b'
}
)
curl -X POST -H 'Authorization: Token cd7a4537a231356d404b553f465b6af2fa035821' -H 'Content-Type: application/json' -H 'Integration-ID: 79606358-97af-4196-b64c-5f719433d56b' -d '{"url": "http://0.0.0.0:8000/", "events": ["Payout.created"]}' https://jobmatchr.se/webhooks/payouts/
fetch("https://api.gigapay.se/v2/webhooks/", {
method: "POST",
body: JSON.stringify({url: "https://jobmatchr.se/webhooks/payouts/", events: ["Payout.created"]}),
headers: {
"Authorization": "Token cd7a4537a231356d404b553f465b6af2fa035821",
"Integration-Id": "79606358-97af-4196-b64c-5f719433d56b"
},
})
The above command returns JSON structured like this:
{
"id": "38a93e19-886a-4246-9cfe-471214ff6739",
"url": "https://jobmatchr.se/webhooks/payouts/",
"events": ["Payout.created"],
"secret_key": "c1329a085d65f7757838df5920fdcc9a",
"metadata": {}
}
This endpoint creates a webhook.
HTTP Request
POST https://api.gigapay.se/v2/webhooks/
Headers
Parameter | Required | Description |
---|---|---|
Authorization |
True | Your Authorization Token. |
Integration-ID |
True for integration-scoped events | The integration id is requied if any of the events that is being registered is integration-scoped event. |
Idempotency-key |
False | Idempotency key. |
Body Parameters
Parameter | Type | Required | Default | Notes |
---|---|---|---|---|
id |
String | False | uuid4() | Unique per user account or integration. |
url |
URL | True | ||
events |
String[] | True | ||
secret_key |
String | False | 32 char random string | |
metadata |
Object | False | {} |
Retrieve a Webhook
import requests
response = requests.get(
'https://api.gigapay.se/v2/webhooks/481272/',
headers={
'Authorization': 'Token cd7a4537a231356d404b553f465b6af2fa035821',
'Integration-ID': '79606358-97af-4196-b64c-5f719433d56b'
}
)
curl -X GET -H 'Authorization: Token cd7a4537a231356d404b553f465b6af2fa035821' -H 'Integration-ID: 79606358-97af-4196-b64c-5f719433d56b' https://api.gigapay.se/v2/webhooks/481272/
fetch("https://api.gigapay.se/v2/webhooks/481272/", {
headers: {
"Authorization": "Token cd7a4537a231356d404b553f465b6af2fa035821",
"Integration-Id": "79606358-97af-4196-b64c-5f719433d56b"
}
})
The above command returns JSON structured like this:
{
"id": "38a93e19-886a-4246-9cfe-471214ff6739",
"url": "https://jobmatchr.se/webhooks/payouts/",
"events": ["Payout.created"],
"secret_key": "c1329a085d65f7757838df5920fdcc9a",
"metadata": {}
}
This endpoint retrieves a webhook.
HTTP Request
GET https://api.gigapay.se/v2/webhooks/:id/
Headers
Parameter | Required | Description |
---|---|---|
Authorization |
True | Your Authorization Token. |
Integration-ID |
True for integration-scoped events | The integration id is requied if the webhook that's being retrieved contains one or more integration-scoped events. |
URL Parameters
Parameter | Required | Description |
---|---|---|
id |
True | Unique identifier for the object. |
Update a Webhook
import requests
response = requests.patch(
'https://api.gigapay.se/v2/webhooks/481272/',
json={
'events': ['Payout.created', 'Payout.notified']
},
headers={
'Authorization': 'Token cd7a4537a231356d404b553f465b6af2fa035821',
'Integration-ID': '79606358-97af-4196-b64c-5f719433d56b'
}
)
curl -X PATCH -H 'Authorization: Token cd7a4537a231356d404b553f465b6af2fa035821' -H 'Content-Type: application/json' -H 'Integration-ID: 79606358-97af-4196-b64c-5f719433d56b' -d '{"events": ["Payout.created", "Payout.notified"]}' https://api.gigapay.se/v2/webhooks/481272/
fetch("https://api.gigapay.se/v2/webhooks/481272/", {
method: "PATCH",
body: JSON.stringify({events: ["Payout.created", "Payout.notified"]}),
headers: {
"Authorization": "Token cd7a4537a231356d404b553f465b6af2fa035821",
"Content-Type": "application/json",
"Integration-Id": "79606358-97af-4196-b64c-5f719433d56b"
},
})
The above command returns JSON structured like this:
{
"id": "481272",
"url": "https://jobmatchr.se/webhooks/payouts/",
"events": ["Payout.created", "Payout.notified"],
"secret_key": "c1329a085d65f7757838df5920fdcc9a",
"metadata": {}
}
This endpoint updates a webhook.
HTTP Request
PATCH https://api.gigapay.se/v2/webhooks/:id/
Headers
Parameter | Required | Description |
---|---|---|
Authorization |
True | Your Authorization Token. |
Integration-ID |
True for integration-scoped events | The integration id is requied if any of the events that is being updated is integration-scoped event. |
URL Parameters
Parameter | Required | Description |
---|---|---|
id |
True | Unique identifier for the object. |
Body Parameters
Parameter | Type | Required | Default | Notes |
---|---|---|---|---|
id |
String | False | Previous value | Unique per user account or integration. |
url |
URL | False | Previous value | |
events |
String[] | False | Previous value | |
secret_key |
String | False | Previous value | |
metadata |
Object | False | Previous value |
Replace a Webhook
import requests
response = requests.put(
'https://api.gigapay.se/v2/webhooks/481272/',
json={
'url': 'https://jobmatchr.se/webhooks/payruns/',
'events': ['Payrun.created']
},
headers={
'Authorization': 'Token cd7a4537a231356d404b553f465b6af2fa035821',
'Integration-ID': '79606358-97af-4196-b64c-5f719433d56b'
}
)
curl -X PUT -H 'Authorization: Token cd7a4537a231356d404b553f465b6af2fa035821' -H 'Content-Type: application/json' -H 'Integration-ID: 79606358-97af-4196-b64c-5f719433d56b' -d '{"url": "https://jobmatchr.se/webhooks/payruns/", "events": ["Payrun.created"]}' https://api.gigapay.se/v2/webhooks/481272/
fetch("https://api.gigapay.se/v2/webhooks/481272/", {
method: "PUT",
body: JSON.stringify({url: "https://jobmatchr.se/webhooks/payruns/", events: ["Payrun.created"]}),
headers: {
"Authorization": "Token cd7a4537a231356d404b553f465b6af2fa035821",
"Content-Type": "application/json",
"Integration-Id": "79606358-97af-4196-b64c-5f719433d56b"
}
})
The above command returns JSON structured like this:
{
"id": "481272",
"url": "https://jobmatchr.se/webhooks/payruns/",
"events": ["Payrun.created"],
"secret_key": "vksnrsc6tamq73tc26rzrnzf33a4pgdv",
"metadata": {}
}
{
"id": "481272",
"url": "https://jobmatchr.se/webhooks/payruns/",
"events": ["Payrun.created"],
"secret_key": "vksnrsc6tamq73tc26rzrnzf33a4pgdv",
"metadata": {}
}
This endpoint replaces a webhook.
HTTP Request
PUT https://api.gigapay.se/v2/webhooks/:id/
Headers
Parameter | Required | Description |
---|---|---|
Authorization |
True | Your Authorization Token. |
Integration-ID |
True for integration-scoped events | The integration id is requied if any of the events that is being replaced is integration-scoped event. |
URL Parameters
Parameter | Required | Description |
---|---|---|
id |
True | Unique identifier for the object. |
Body Parameters
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
id |
String | False | uuid4() | Unique per Integration. |
url |
URL | True | ||
events |
String[] | True | ||
secret_key |
String | False | 32 char random string | |
metadata |
Object | False | {} |
Delete a Webhook
import requests
response = requests.delete(
'https://api.gigapay.se/v2/webhooks/481272/',
headers={
'Authorization': 'Token cd7a4537a231356d404b553f465b6af2fa035821',
'Integration-ID': '79606358-97af-4196-b64c-5f719433d56b'
}
)
curl -X DELETE -H 'Authorization: Token cd7a4537a231356d404b553f465b6af2fa035821' -H 'Integration-ID: 79606358-97af-4196-b64c-5f719433d56b' https://api.gigapay.se/v2/webhooks/481272/
fetch("https://api.gigapay.se/v2/webhooks/481272/", {
method: "DELETE",
headers: {
"Authorization": "Token cd7a4537a231356d404b553f465b6af2fa035821",
"Integration-Id": "79606358-97af-4196-b64c-5f719433d56b"
}
})
The above command returns an empty response.
This endpoint deletes a webhook.
HTTP Request
DELETE https://api.gigapay.se/v2/webhooks/:id/
Headers
Parameter | Required | Description |
---|---|---|
Authorization |
True | Your Authorization Token. |
Integration-ID |
True for integration-scoped events | The integration id is requied if the webhook that is being deleted contains one or more integration-scoped events. |
URL Parameters
Parameter | Required | Description |
---|---|---|
id |
True | Unique identifier for the object. |