Skip to main content
POST
/
api
/
v1.0
/
access-token
/
b2b
Generate OAuth access token
curl --request POST \
  --url https://sandbox-biller-b2b.singapay.id/api/v1.0/access-token/b2b \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: <content-type>' \
  --header 'X-PARTNER-ID: <x-partner-id>' \
  --data '
{
  "grant_type": "client_credentials"
}
'
{
  "status": 200,
  "success": true,
  "data": {
    "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...",
    "token_type": "Bearer",
    "expires_in": "3600"
  }
}

Authorizations

Authorization
string
header
required

Basic authentication using Base64 encoded client_id:client_secret. Format: Authorization: Basic <base64(client_id:client_secret)>

Headers

X-PARTNER-ID
string
required

Merchant API key

Content-Type
string
default:Application/json
required

Response format

Body

application/json
grant_type
enum<string>
required
Available options:
client_credentials
Example:

"client_credentials"

Response

Token generated successfully

Successful access token response (uses laravel-responder format)

status
integer
required
Example:

200

success
boolean
required
Example:

true

data
object
required