Access Token B2B

Type Value
Service Code
73
Name
Access Token B2B
HTTP Method
POST

Flow

API URL

Environment URL
Sandbox
Port of HTTPS (443)
https://sandbox-api.espay.id/api/v1.0/access-token/b2b
Production
Port of HTTPS (443)
https://api.espay.id/api/v1.0/access-token/b2b

Headers

Name Type Mandatory Description
Content-Type
String
Y
Content of your request body.

Example:
application/json
X-TIMESTAMP
String
Y
Customer's current local date and time.

Format:
yyyy-MM-ddThh:mi:ssTZD (ISO 8601)

Example:
2024-03-14T07:49:28+07:00
X-CLIENT-KEY
String
Y
Client Key from Espay team.
X-SIGNATURE
String
Y

Request Parameters

Name Type Mandatory Description
grantType
String
Y
Fixed value:
client_credentials
additionalInfo
Object
O
Additional info.

Response Parameters

Name Type Mandatory Description
responseCode
String (7)
Y
Response Code.

Format:
HTTP code + Service code + Error code.

Example:
200+73+00 = 2007300.
responseMessage
String (150)
Y
Response description.
accessToken
String (2048)
Y
Access token.
tokenType
String
Y
Token type.
expiresIn
String
Y
Session expiry.

Format:
Second

Example:
900 = 15 minute
additionalInfo
Object
O

Try It!

Anda bisa coba masukkan data sesuai dengan input yang telah disediakan. Setelah itu Anda submit dan lihat hasilnya!
























Sample Header

Content-Type:application/json
X-TIMESTAMP:2020-01-01T00:00:00+07:00
X-CLIENT-KEY:962489e9-de5d-4eb7-92a4-b07d44d64bf4
X-SIGNATURE:07abc7c30d245c0ecce3ef6c2a9ac76cd9ffaf6d0d090773b429c2b97437dc72047f46d9890abb2d6d8af7594ea19787e79ec80e388e2f6225b449c2e4d82e7df50f37c301424aede785935703c1c70235ba4e59f589f571218ce2dce4c061e598f0f38d1ac57f3feb52cf0c31078e3ceee8d796c53983fe1d38ebd71155aaa613700dc21f5a57941b787f921af7d287e72687d5242eb3063d543d5f5923f76db008cf4f56fb9c618f7f4bc8366ae70d88705617487754563e629119013fa0549e6645b397524b3dd2fa7e7f3fe9faf0fbf77da59f566861a3c510241fd4416ab7d0eba42d998e1178da51d607e0ef866607c458837c762323be53827d86e875
             














Sample Request

{
    "grantType":"client_credentials",
    "additionalInfo":{}
}
             



Sample Response

{
   "responseCode":"2007300",
   "responseMessage":"Successful",
   "accessToken":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJiZjFmM2Q3ZS1kOTA3LTRkOWItODJlNC02Y2IxZGYxOTBlOWUiLCJjbGllbnRJZCI6IjZhZTk1N2M0LTI4NjMtNDcxMy1hY2NlLWJhMTJkZTYzNmNmYyIsIm5iZiI6MTYxMTQ2ODg1NiwiZXhwIjoxNjExNDY5NzU2LCJpYXQiOjE2MTE0Njg4NTZ9.-7HRhcyEh4y0qsG2H3DRdu0AeYv3MEJHfWRKhRBYcNU",
   "tokenType":"Bearer",
   "expiresIn":"900",
   "additionalInfo":{}
}
              



CURL
Scroll to Top