Payouts

To make a payout to an Employee (Gigger) 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.

The Payout object

Attribute

Description

id

Unique identifier for the object.

amount

Decimal formatted string of the gross amount.

cost

Decimal formatted string of the salary cost.

currency

ISO-4217 currency code.

description

String describing the work done, displayed to the recipient.

full_salary_specification

If True will a full salary specification be shown to the Employee, including payroll taxes and Gigapay's fee, in addition to the standard taxes and vacation pay.

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.

post
Create a Payout

https://api.gigapay.se/v2/payouts/
Endpoint for creating Payouts.
Request
Response
Request
Headers
Authentication
required
string
Authentication token.
Integration-ID
required
string
Integration ID.
Idempotency-Key
optional
string
Idempotency key.
Body Parameters
id
optional
string
A unique identifier for the object. If an identifier is not provided will a UUID4 be generated.
amount
optional
string
A decimal formatted string of the gross amount. Either amount or cost is required.
cost
optional
string
A decimal formatted string of the salary cost. Either amount or cost is required.
currency
required
string
ISO-4217 currency code.
description
required
string
Description of the gig, displayed to the recipient. The max length is 200 characters.
full_salary_specification
optional
boolean
Whether to show a full salary specification to the recipient.
employee
required
string
Unique identifier for the Employee that is the recipient of the Payout.
metadata
optional
object
JSON-encoded metadata. If none is provided will and empty object be used.
start_at
optional
string
ISO 8601 formatted string detailing when the gig will start. Required for insured gigs.
end_at
optional
string
ISO 8601 formatted string detailing when the gig will end. Required for insured gigs.
Response
201: Created
Payout successfully created.
{
"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": "2019-05-21T08:00:00.000000Z",
"end_at": "2019-05-21T17:00:00.000000Z",
"created_at": "2019-05-22T10:32:38.118753Z",
"notified_at": null,
"accepted_at": null,
}
400: Bad Request
Body contained an apparent error.
{
"employee": [
"Object with id "+46703000000" does not exist."
]
}

post
Create multiple Payouts

https://api.gigapay.se/v2/payouts/
The same endpoint can be used to create multipe Payouts at once by posting an array of data.
Request
Response
Request
Headers
Authentication
required
string
Authentication token.
Integration-ID
required
string
Integration ID.
Idempotency-Key
optional
string
Idempotency key.
Body Parameters
required
array
An array of the data required to create a Payout following the same format as above.
Response
200: OK
Payouts successfully created.
[
{
"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": "2019-05-21T08:00:00.000000Z",
"end_at": "2019-05-21T17:00:00.000000Z",
"created_at": "2019-05-22T10:32:38.118753Z",
"notified_at": "2019-05-22T10:38:19.874623Z",
"accepted_at": "2019-05-23T12:02:53.027482Z",
}, {
"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",
}
]
400: Bad Request
Body contained an apparent error. Note that in this example only the data for the second Payout contained an error.
[
{},
{
"employee": [
"Object with id "+46703000000" does not exist."
]
}
]

post
Create a Payout with an inline Employee

https://api.gigapay.se/v2/payouts/?expand=employee
The same endpoint can be used to create a Payout and an Employee at once.
Request
Response
Request
Headers
Authentication
required
string
Authentication token.
Integration-ID
required
string
Integration ID.
Idempotency-Key
optional
string
Idempotency key.
Body Parameters
id
optional
string
A unique identifier for the object. If an identifier is not provided, a UUID4 will be generated.
amount
optional
string
A decimal formatted string of the gross amount. Either amount or cost is required.
cost
optional
string
A decimal formatted string of the salary cost. Either amount or cost is required.
currency
required
string
ISO-4217 currency code.
description
required
string
Description of the gig, displayed to the recipient. The max length is 200 characters.
full_salary_specification
optional
boolean
Whether to show a full salary specification to the recipient.
employee
required
object
The data required to create a Employee, following the same format as in the Employee endpoint . If there is already an Employee object matching the provided data will it be used instead of creating a new Employee.
metadata
optional
object
JSON-encoded metadata. If none is provided will an empty object be used.
start_at
optional
string
ISO 8601 formatted string detailing when the gig will start. Required for insured gigs.
end_at
optional
string
ISO 8601 formatted string detailing when the gig will end. Required for insured gigs.
Response
201: Created
Payout and Employee successfully created.
{
"id": "0177270d-f94b-4ab9-88ba-ac1fa2f791aa",
"amount": "100.00",
"cost": "137.99",
"currency": "SEK",
"description": "Lön genom Gigapay",
"employee": {
"id": "1f1d1263-0e79-4787-b573-6df81b44bfc2",
"name": "Albin Lindskog",
"cellphone_number": "+46703000000",
"email": null,
"country": "SWE",
"metadata": {
"user_id": 2,
},
"created_at": "2019-05-22T10:32:36.118753Z",
"verified_at": null,
},
"invoice": "bab4b830-47d6-4a24-a460-3289897f6e8e",
"metadata": {
"job_id": 127
},
"start_at": "2019-05-21T08:00:00.000000Z",
"end_at": "2019-05-21T17:00:00.000000Z",
"created_at": "2019-05-22T10:32:38.118753Z",
"notified_at": null,
"accepted_at": null,
}
400: Bad Request
Body contained an apparent error.
{
"employee": {
"non_field_errors": [
"Either email or cellphone_number is required."
]
}
}

get
List Payouts

https://api.gigapay.se/v2/payouts/
Endpoint for listing Payouts. The Payouts are returned sorted by creation date, with the most recent Payout created appearing first.
Request
Response
Request
Headers
Authentication
required
string
Authentication Token.
Integration-ID
required
string
Integration ID.
Query Parameters
page
optional
number
Which page to return_
page_size
optional
number
The number of Payouts per page.
employee
optional
string
Filter out all Payouts belonging to the Employee with the provided identifier
invoice
optional
string
Filter out all Payouts belonging to the Invoice with the given identifier.
Response
200: OK
Payouts successfully listed.
{
"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": "2019-05-21T08:00:00.000000Z",
"end_at": "2019-05-21T17:00:00.000000Z",
"created_at": "2019-05-22T10:32:38.118753Z",
"notified_at": "2019-05-22T10:38:19.874623Z",
"accepted_at": "2019-05-23T12:02:53.027482Z",
}, {
"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",
}
]
}

get
Retrieve a Payout

https://api.gigapay.se/v2/payouts/:id/
Endpoint for retrieving a specific Payout.
Request
Response
Request
Path Parameters
id
required
number
The identifier of the Payout to be retrieved.
Headers
Authentication
required
string
Authentication token.
Integration-ID
required
string
Integration ID.
Response
200: OK
Payout successfully retrieved.
{
"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": "2019-05-21T08:00:00.000000Z",
"end_at": "2019-05-21T17:00:00.000000Z",
"created_at": "2019-05-22T10:32:38.118753Z",
"notified_at": "2019-05-22T10:38:19.874623Z",
"accepted_at": "2019-05-23T12:02:53.027482Z",
}

delete
Delete a Payout

https://api.gigapay.se/v2/payouts/:id/
Endpoint for deleting a specific Invoice.
Request
Response
Request
Path Parameters
id
required
string
Identifier of Payout to be deleted.
Headers
Authentication
required
string
Authentication token.
Integration-ID
required
string
Integration-ID.
Response
204: No Content
Payout successfully deleted.