Skip to main content

GoBiz API Reference

Gojek serves all of its merchants through GoBiz Platform. It is an all-in-one business solution that enables connectivity, digital payments, and other financial services for small and individual merchants. GoBiz helps you grow your business by making it easy to record orders, providing various types of payments, and bringing in customers. To enhance the experiences of its merchants, GoBiz also provides a platform for our partners to integrate with. GoBiz currently supports two types of integration, Direct Integration and Facilitator.

Integration TypeDescription
Direct IntegrationYou’re a GoBiz merchant and you want to access Gojek features directly from your own system.
FacilitatorYou’re a facilitator. Either you a POS provider or an online order aggregator and you want to enable features to your merchants.

Scroll down for code samples, example requests, and responses.

HTTP(S) API

You can communicate with GoBiz API by sending HTTP(S) request. The request consists of Base URL and HTTP(S) Header. The Base URL specifies the resource to which the request is applied. The HTTP(S) Header carries the data type of the request, data type of the response, and the authentication information. GoBiz then sends a response back in JSON format.

Base & GoAuth URLs

In the Sandbox Environment, the partner can perform internal end-to-end testing using the GoAuth Staging credentials.

Once the testing is completed successfully, the GoBiz service can be fully utilized in the Production Environment using the GoAuth Production credentials. The URLs for Sandbox and Production environments are given below.

Sandbox Environment

BASE_URL: https://api.partner-sandbox.gobiz.co.id/

OAUTH_URL: https://integration-goauth.gojekapi.com

Sandbox Request - Code Sample
curl -X POST https://api.partner-sandbox.gobiz.co.id/
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer {access-token}'

Production Environment

BASE_URL: https://api.gobiz.co.id/

OAUTH_URL: https://accounts.go-jek.com

Production Request - Code Sample
curl -X POST https://api.gobiz.co.id/
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer {access-token}'

HTTP(S) Header

An HTTP Header is used in an HTTP request to provide information about the request. The HTTP Header for GoBiz API requests carries the information described in the table below.

HeaderDescriptionValueTypeRequired
Content-TypeThe Content-Type field indicates the JSON type that is acceptable to send to the recipient.application/jsonStringRequired
AuthorizationThe Authorization field creates the JSON Web Token (JWT) to send to the recipient when authentication is successful.
Note: For Direct integration authentication, refer Direct Integration Client Credentials and for facilitator authentication, refer Facilitator Authentication.
Bearer {access-token}StringRequired

Responses

GoBiz uses conventional HTTP status response codes to indicate the success or failure of an API request. The response codes used in GoBiz are given below.

  • Success codes
  • Error codes
  • Server error codes

Success Codes

Status codes in the 2xx range indicate success. Different success codes in the 2xx range are returned based on what the request attempts to do.

Error Codes

Status codes in the 4xx range indicate an error. The error codes are returned when the information provided by the client is incorrect or incomplete (for example, incorrect format, omission of a required parameter, invalid information, and so on). Certain 4xx errors can be handled programmatically.

Server Error Codes

Status codes in the 5xx range indicate a server error. The server error codes are returned when the GoBiz server does not work as expected.

Response Format

The HTTP response consists of three fields given below.

  • success
  • data
  • errors

success represents the success status of the request.

data returns the values in the response.

errors returns the error message title and the error message for a request.

Success Response

The field success is set to true when data (if any) is returned.

JSON AttributeDescriptionType
successIt should always be set to true. Request is successful and data, if any, is returned.Boolean
dataThe object acts as a wrapper for any data returned by the API call.Object
Sample Success Response Code
{
"success": true,
"data": {
"key": "value"
}
}

Error Response

The field success is set to false when data (if any) is not returned and represents that a problem has occurred. The root cause can be either of the following:

  • A problem with the submitted data or unsatisfied API Call pre-conditions
  • An error in the processing of request
JSON AttributeDescriptionType
successIt should always be set to false. Request is unsuccessful and data (if any) is not returned.Boolean
errorsThe array acts as a wrapper for the error objects returned by the API call.Array (Object)
» message_titleIt is the short description of the HTTP error.String
» messageIt describes the cause of the HTTP error.String
Sample Error Response Code
{
"success": false,
"errors": [
{
"message_title": "Error hint",
"message": "Start date must be after today."
}
]
}

HTTP Status Code Summary

Status codes used by GoBiz APIs are categorized into 2xx, 4xx, and 5xx.

Code 2xx

StatusDescription
200 - OKIt indicates that the request is successful.
201 - CreatedIt indicates that the request is successful and the resource is created.

Code 4xx

StatusDescription
400 - Bad RequestIt indicates that the request cannot be processed due to an error (for example, incorrect parameters).
401 - UnauthorizedIt indicates that the request contains invalid access token.
403 - ForbiddenIt indicates that the access token does not have the permission to access the resource.
404 - Not FoundIt indicates that the requested resource does not exist.
409 - ConflictIt indicates that the request cannot be completed due to a conflict with the current state of resource or another request.
415 - Unsupported Media TypeIt indicates that the request does not contain the correct versioning.
422 - Unprocessable EntityIt indicates that the request contains correct syntax but the contents are incorrect.

Code 5xx

StatusDescription
50x - GoBiz Server ErrorIt indicates a problem at the GoBiz server and the server is unable to process any request.

Error Glossary

The errors and errors responses common to all the endpoints are described in the table given below.

The sample error response code for each error is given at the side, in the code section.

ErrorDescriptionTypeNotes
UnsupportedAcceptTypeInvalid versioning header in the request. Refer Errors Response.StringFor errors object, refer Errors 404/406/415.
UnregisteredOutletInvalid versioning header in the request. Refer Errors Response.StringFor errors object, refer Errors 404/406/415).
UnauthorizedThe outlet is not yet registered in the Partner Integration system. Please contact the support team. Refer Errors Response.StringFor errors object, refer Errors 401 - Unauthorized.

Errors Response

JSON AttributeDescriptionType
successStatus of the request. Value false indicates an error.Boolean
errorsDetails of the error.Array(Object)
Sample Response - 415/406 Unsupported Accept Type
{
"success": false,
"errors": [
{
"message_title": "UnsupportedAcceptType",
"message": "Invalid Accept header: application/vnd.eim.v0+json"
}
]
}
Sample Response - 404 Unregistered Outlet
{
"success": false,
"errors": [
{
"message_title": "Requested resource not found",
"message": "The outlet is not yet registered for integration. Please contact the support team."
}
]
}
Sample Response - 401 Unauthorized
{
"success": false,
"errors": [
{
"code": "HTTP_401",
"message": "Your session is expired. Please login again.",
"message_title": "Session Expired",
"message_severity": "error"
}
]
}