Generate user tokens to access GTF BE APIs
All Backend to Backend api calls to GTF are protected via JWT token authentication. The partner should use this api to get the token needed to call GTF BE apis. Once the token is generated, the partner can use the token to make multiple api calls to GTF BE until the token expires. Once the token expires, the partner can regenerate a new token using the same API.
Endpoint: GET /v2/coe/authentication
The API will take in the following parameters:
- Authentication keys
Upon a successful API call, a GTF user token will be returned in the response, which can then be used in subsequent api calls to GTF BE.
curl --request GET \
--url https://onekyc-token-sandbox.gopayapi.com/v2/coe/authentication \
--header 'client-id: 123123' \
--header 'pass-key: pass123' \
--header 'x-onboarding-partner: <ONBOARDING_PARTNER>' \
--header 'x-partner-user-id: <PARTNER_USER_ID> \
--header 'x-partner-user-id-type: <PARTNER_USER_ID_TYPE>'Refer to the API spec for full details on the request/response parameters - Get User Token API
Get Presigned URL
Partner can use this endpoint to get presigned url that will be used to upload file that be used to do submissions (e.g KTP).
Endpoint: GET /v1/submissions/urls?submissionType=KTP_SCAN
The API will take in the following parameters:
- GTF user token retrievable from the Get User Token API (see Generate user tokens to access GTF BE APIs)
- Partner specific information such as user ID and session ID
Upon a successful API call, a presigned url will be returned in the response, which can then be used to upload file that will be used for submissions.
curl --request GET \
--url 'https://onekyc.ky.id.sandbox.gopayapi.com/coe/v1/submissions/urls?submissionType=' \
--header 'x-onekyc-token: <TOKEN>' \
--header 'x-sdk-session-id: <SDK_SESSION_ID>' \
--header 'x-partner-session-id: <PARTNER_SESSION_ID>'Refer to the API spec for full details on the request/response parameters - Get Presgined URL API
Confirm Submission
After uploading all required file to presgined url, partner can start the submission with hitting this API
Endpoint: PUT /v1/submissions/urls
The API will take in the following parameters:
- GTF user token retrievable from the Get User Token API (see Generate user tokens to access GTF BE APIs)
- Partner specific information such as session ID and sdk-session-id
- submissionId that got from getPresignedUrl Response
curl --request PUT \
--url https://onekyc.ky.id.staging.gopayapi.com/coe/v1/submissions/urls \
--header 'x-onekyc-token: <TOKEN>' \
--header 'x-sdk-session-id: <SDK_SESSION_ID>' \
--header 'x-partner-session-id: <PARTNER_SESSION_ID>'
--data '{
"submissionId": "8527781b-8fdd-48e3-adfe-4136aee5e985"
}'Refer to the API spec for full details on the request/response parameters - Confirm Submission API
Polling Submission Status
To get result of the submission, partner can wait for the callback or doing polling to this API.
Endpoint: GET v1/submissions/SUBMISSION_UUID/status
The API will take in the following parameters:
- GTF user token retrievable from the Get User Token API (see Generate user tokens to access GTF BE APIs)
- Partner specific information such as session ID and sdk-session-id
Refer to the API spec for full details on the request/response parameters - Submission Status API
Get Submission Result Details
Upon completion of submission from FE, Partner BE can call this API to retrieve submission results.
Endpoint: GET /v1/submissions
The API will take in the following parameters:
- GTF user token retrievable from the Get User Token API (see Generate user tokens to access GTF BE APIs)
- Partner specific information such as user ID and session ID
Refer to the API spec for full details on the request/response parameters - Submission Details API
Partner Callback API
Upon completion of submission processing, GTF BE will call this api on Partner BE to push the submission results. If partners can implement this call back they don't need to call the api on GTF to get the submission results.
Endpoint: POST /coe/submissions-callback