Get balance provides a service that allows users to get balance in each account and the total balance in the wallet.
The PayPay Open Payment API requires that you use TLS 1.2 or higher as a security measure. Note that you cannot connect with TLS1.0 and TLS1.1.
To start utilizing our Open Payment API platform, at first the business needs to be onboarded as a PayPay merchant.
This process usually consists of information collection, manual verification, contract confirmation and credentials issuance.
After becoming a merchant on PayPay, the following items would be setup for the client:
This setup can be managed using our merchant panel/ getting in touch with the sales representative.
Everything related to OPA API Authorization is described here.
PayPay OPA uses HTTP response status codes and OPA error code to indicate the success or
failure of the requests. With these information, you can decide what error handling strategy
to use. In general, PayPay OPA return the following http status codes.
Status | Code | Description |
---|---|---|
200 | SUCCESS | Success |
400 | INVALID_REQUEST_PARAMS | The information provided by the request contains invalid data, e.g., unsupported push text. |
400 | BAD_REQUEST | Other cases that we do not mention. |
400 | MISSING_REQUEST_PARAMS | The request does not contain required data. |
401 | UNAUTHORIZED | No valid api key and secret provided |
401 | INVALID_USER_AUTHORIZATION_ID | The specified user authorization ID is invalid. |
401 | OP_OUT_OF_SCOPE | The operation is not permitted. |
404 | OPA_CLIENT_NOT_FOUND | OPA Client not found |
429 | RATE_LIMIT | Too many requests |
500 | INTERNAL_SERVER_ERROR | Something went wrong on PayPay service side. |
500 | SERVICE_ERROR | A service error has occurred. |
503 | MAINTENANCE_MODE | Sorry, we are in maintenance. |
Retrieve the total amount in a user's Wallet. Application to PayPay is separately required to get user wallet balance. Timeout: 15s
userAuthorizationId required | string (UserAuthorizationId) <= 64 characters The PayPay user reference id returned by the user authorization flow |
currency required | string Value: "JPY" |
productType | string (ProductTypeForGetBalanceMixin) Enum: "VIRTUAL_BONUS_INVESTMENT" "PAY_LATER_REPAYMENT" "REAL_INVESTMENT" "POINT" The product type in PayPay system.
Generally, this request parameter is optional.
For some merchants that are restricted to use only certain product types, the product type must be properly set.
|
onetimeUseCashback | string (OnetimeUseCashbackForGetBalance) Enum: "ENABLED" "DISABLED" Example: onetimeUseCashback=ENABLED To use this parameter, Whether to include cashback.
For example, PayPay will take cashback balance into account if it's Note: This parameter will be ignored when the master setting is "Earn Points" If it is not provided, PayPay will apply user's master settings. |
{- "resultInfo": {
- "code": "string",
- "message": "string",
- "codeId": "string"
}, - "data": {
- "userAuthorizationId": "string",
- "totalBalance": {
- "amount": 0,
- "currency": "JPY"
}, - "preference": {
- "useCashback": false,
- "cashbackAutoInvestment": false
}
}
}
Get the masked phone number of the user
userAuthorizationId required | string (UserAuthorizationId) <= 64 characters The PayPay user reference id returned by the user authorization flow |
{- "resultInfo": {
- "code": "string",
- "message": "string",
- "codeId": "string"
}, - "data": {
- "phoneNumber": "*******1234"
}
}
Date of Documentation Update | Date of Release | Type of Change | Section | Updates |
---|---|---|---|---|
2023.01.12 | 2023.01.13 | Feature | Get user wallet balance | When merchant passes productType either VIRTUAL_BONUS_INVESTMENT or POINT , PayPay returns the user's current point balance regardless of the setting status of useCashback flag. |