The Cashback usage setting provides a service that allows set and retrieve the availability of the PayPay Point.
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 |
| 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. |
| 500 | INTERNAL_SERVER_ERROR | Something went wrong on PayPay service side. |
| 500 | SERVICE_ERROR | A service error has occurred. |
In principle, all API responses include an X-REQUEST-ID in the response header (with some exceptions).
When contacting PayPay support, please provide this request ID.
Format: Alphanumeric characters and hyphens (maximum 64 characters)
Example:
OPA45F681001AEF4605B2A50939F611F4B8
On the application, Cashback setting status is expressed by three statuses, ポイントを貯める, 支払いに使う and ポイント運用に自動追加.
Status is switched by setting 2 flags of useCashback and cashbackAutoInvestment.
Statuses mean that SAVE is ポイントを貯める, USE is 支払いに使う, and INVEST is ポイント運用に自動追加.
| Status | flag | Request | After Status | After flag |
|---|---|---|---|---|
| SAVE | useCashback : false cashbackAutoInvestment : false |
/v1/user/use_cashback useCashback: true |
USE | useCashback : true cashbackAutoInvestment : false |
| SAVE | useCashback : false cashbackAutoInvestment : false |
/v1/user/cashback_auto_investment cashbackAutoInvestment : true |
INVEST | useCashback : false cashbackAutoInvestment : true |
| SAVE | useCashback : false cashbackAutoInvestment : false |
/v1/user/cashback_auto_investment cashbackAutoInvestment : false |
USE | useCashback : true cashbackAutoInvestment : false |
| USE | useCashback : true cashbackAutoInvestment : false |
/v1/user/use_cashback useCashback : false |
SAVE | useCashback : false cashbackAutoInvestment : false |
| USE | useCashback : true cashbackAutoInvestment : false |
/v1/user/cashback_auto_investment cashbackAutoInvestment : true |
INVEST | useCashback : false cashbackAutoInvestment : true |
| INVEST | useCashback : false cashbackAutoInvestment : true |
/v1/user/use_cashback useCashback : true |
USE | useCashback : true cashbackAutoInvestment : false |
| INVEST | useCashback : false cashbackAutoInvestment : true |
/v1/user/cashback_auto_investment cashbackAutoInvestment : false |
SAVE | useCashback : false cashbackAutoInvestment : false |
| INVEST | useCashback : false cashbackAutoInvestment : true |
/v1/user/use_cashback useCashback : false |
SAVE | useCashback : false cashbackAutoInvestment : false |
Get cashback setting state of specified user
| userAuthorizationId required | string |
{- "resultInfo": {
- "code": "string",
- "message": "string",
- "codeId": "string"
}, - "data": {
- "useCashback": true,
- "cashbackAutoInvestment": false
}
}Set useCashback flag
request body of set useCashback flag API
| userAuthorizationId required | string The PayPay user reference id returned by the user authorization flow |
| useCashback required | boolean The flag whether user use cashback for payment |
{- "userAuthorizationId": "string",
- "useCashback": true
}{- "resultInfo": {
- "code": "string",
- "message": "string",
- "codeId": "string"
}, - "data": { }
}Set cashbackAutoInvestment flag
request body of set cashbackAutoInvestment flag API
| userAuthorizationId required | string The PayPay user reference id returned by the user authorization flow |
| cashbackAutoInvestment required | boolean The flag whether user auto-invests points for Point Investment |
| updatedAt | integer |
{- "userAuthorizationId": "string",
- "cashbackAutoInvestment": true,
- "updatedAt": 1609426800
}{- "resultInfo": {
- "code": "string",
- "message": "string",
- "codeId": "string"
}, - "data": { }
}