TwoPay
    TwoPay
    • Authentication
      POST
    • Payout
      POST
    • Payout status check
      GET
    • Payout Notification
      POST
    • Get PSE Bank
      GET
    • Payin by PSE
      POST
    • Payin by Cash
      POST
    • Payin status check
      GET
    • Payin Notification
      POST
    • Payout balance check
      GET
    • Payin balance check
      GET

      Authentication

      Developing
      POST
      co/v1/oauth2/token

      Request

      Body Params application/json
      client_id
      string 
      required
      The Id of the client
      client_secret
      string 
      required
      The secret key of the client
      Example
      {
          "client_secret": "mollit",
          "client_id": "54"
      }

      Request samples

      Shell
      JavaScript
      Java
      Swift
      Go
      PHP
      Python
      HTTP
      C
      C#
      Objective-C
      Ruby
      OCaml
      Dart
      R
      Request Request Example
      Shell
      JavaScript
      Java
      Swift
      curl --location --request POST 'http://test-cn.your-api-server.comco/v1/oauth2/token' \
      --header 'Content-Type: application/json' \
      --data-raw '{
          "client_secret": "mollit",
          "client_id": "54"
      }'

      Responses

      🟢200response
      application/json
      Body
      code
      enum<integer> <int32>
      required
      code: 200, request success 401,request fail
      Allowed values:
      200401
      Default:
      200
      Example:
      200
      message
      string 
      required
      When the response code is 200, the content is "SUCCESS" If the response code is not 200, an error message is displayed
      data
      object 
      required
      Specific response content
      access_token
      string 
      required
      access token
      expires_in
      integer 
      required
      token will expire after {expires_in} seconds
      token_type
      string 
      required
      Must be "Bearer" here
      Example
      {
          "code": 200,
          "message": "string",
          "data": {
              "access_token": "string",
              "expires_in": 0,
              "token_type": "string"
          }
      }
      Modified at 2023-05-11 06:58:21
      Next
      Payout
      Built with