Cashback usage setting (1.0)

Introduction

The Cashback usage setting provides a service that allows set and retrieve the availability of the PayPay Point.

TLS implementation

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.

Onboard merchant

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:

  • api key and secret
  • webhook endpoints
  • client IP whitelist

This setup can be managed using our merchant panel/ getting in touch with the sales representative.

Acquire user authorization

To be able to collect payment from PayPay user’s wallet, you need to obtain user’s authorization explicitly.

Acquiring user authorization can be achieved using our simple account linking flow here.

API Authentication

Everything related to OPA API Authorization is described here.

Error Handling

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.

Response code list

Common response code

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.

API General Request ID

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

Cashback setting status flow

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

Cashback

Everything related to cashback usage setting

Get Cashback Settings

Get cashback setting state of specified user

path Parameters
userAuthorizationId
required
string

Responses

Response samples

Content type
application/json
{
  • "resultInfo": {
    },
  • "data": {
    }
}

Set the useCashback flag of specified user

Set useCashback flag

Request Body schema: application/json

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

Responses

Request samples

Content type
application/json
{
  • "userAuthorizationId": "string",
  • "useCashback": true
}

Response samples

Content type
application/json
{
  • "resultInfo": {
    },
  • "data": { }
}

Set cashbackAutoInvestment flag of specified user

Set cashbackAutoInvestment flag

Request Body schema: application/json

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

Responses

Request samples

Content type
application/json
{
  • "userAuthorizationId": "string",
  • "cashbackAutoInvestment": true,
  • "updatedAt": 1609426800
}

Response samples

Content type
application/json
{
  • "resultInfo": {
    },
  • "data": { }
}