To access the SynchPay API, you need to obtain an access token by authorizing with your ClientId and ClientSecret, which are provided by SynchPay support. Note: Keep your ClientId and ClientSecret secure and do not expose them in client-side code or public repositories.Documentation Index
Fetch the complete documentation index at: https://apidocs.synchpay.dev/llms.txt
Use this file to discover all available pages before exploring further.
Obtaining an Access Token
Token Endpoint
- URL: https://api.synchpay.com/auth/token
- Method: POST
Request Body
The request body should be in JSON format and contain the following fields:- ClientId: Your client ID provided by SynchPay support.
- ClientSecret: Your client secret provided by SynchPay support. You can request a new client secret via this form.
Response
Upon successful authorization, the endpoint returns a JSON object with the following fields:- AccessToken: The access token to be used in API requests.
- TokenType: The type of the token, which is “Bearer”.
- ExpiresInSeconds: The number of seconds until the token expires (3600 seconds, which is one hour).
Using the Access Token
To make authorized requests to the API, include the access token in the Authorization header of your HTTP requests:Authorization: Bearer \<AccessToken>
Replace <AccessToken> with the actual access token received from the token endpoint.
Example: