PayPay Points Code API is designed to be used by our partners to perform Points Code related operations so as to deliver the best experience to end users. After being onboarded as a PayPay Client,you will have the following capabilities:
This document will be focusing on APIs that support the above functionalities.
In addition, PayPay Gift Certificate Code is also supported. When using it, please read "Points Code" as "Gift Certificate Code".
To start utilizing our Open API platform, 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 set up for the client:
groupId. Merchants are allowed to have multiple Points Code groupId based on the business requirement.
The operation of creating Points Code groupId needs to be set up by your sales representative.
Access by users to the PayPay app and PayPay web screen from outside Japan is restricted. Please contact us for details.Every time an API is called, the merchant identifier needs to be passed along with the request. There are two ways to pass the merchant identifier:
In a query string parameter:
?assumeMerchant={MerchantId}
Or in HTTP headers:
X-ASSUME-MERCHANT: {MerchantId}
If both are provided, the query string parameter would take precedence.
Everything related to OPA API Authorization is described here.
PayPay OPA uses HTTP response status codes and OPA error codes to indicate the success or failure of requests. With this information, you can decide what error handling strategy to use. In general, PayPay OPA returns the following HTTP response status codes.
| Status | Code | Description |
|---|---|---|
| 200 | SUCCESS | Success |
| 400 | INVALID_REQUEST_PARAMS | The information provided by the request contains invalid data, e.g., unsupported currency. |
| 400 | MISSING_REQUEST_PARAMS | The set parameter is invalid. |
| 401 | UNAUTHORIZED | No valid api key and secret provided |
| 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 | SERVICE_ERROR | A service error has occurred. |
| 500 | INTERNAL_SERVER_ERROR | This code means that something went wrong, but we don't know exactly if the transaction has happened or not. It should be treated as unknown payment status. |
| 503 | MAINTENANCE_MODE | Sorry, we are down for scheduled maintenance. |
| Status | Code | Description |
|---|---|---|
| 400 | BUDGET_NOT_ENOUGH | Points Code group doesn't have enough budget. |
| 400 | EXCEED_CHARGE_CODE_GROUP_MAX_PERIOD | The period between startAt and endAt is over group maxPeriodDays setting |
| 400 | GIFT_CARD_GROUP_NOT_EXIST | Points Code group does not exist. |
| 400 | INVALID_CHARGE_CODE_AMOUNT | Points Code value is less then minimum limit amount. |
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
Create new Points Code. For timeout and internal error(5XX HTTP status codes) , merchants can safely retry the request with same requestId.
Timeout: 30s
| requestId required | string RequestId will be the idempotency key for creating Points Code |
| groupId required | integer <int64> |
| giftCardName required | string [ 1 .. 40 ] Points Code name which will be displayed in PayPay app after user tops up |
| giftCardValue required | integer <int32> [ 1 .. 999999 ] Value of the Points Code in JPY |
| startAt required | string <yyyy-MM-dd> |
| endAt required | string <yyyy-MM-dd> |
{- "requestId": "ea233cbd-f949-42f3-98e7-ddd1cb5e6ffd",
- "groupId": 29952775505428480,
- "giftCardName": "Points Code 01",
- "giftCardValue": 1000,
- "startAt": "2021-10-10",
- "endAt": "2022-10-09"
}{- "resultInfo": {
- "code": "string",
- "message": "string",
- "codeId": "string"
}, - "data": {
- "groupId": 29952775505428480,
- "giftCardName": "Points Code name",
- "giftCard": "MYOG-6BKL-CRPP-19U7",
- "giftCardValue": 1000,
- "startAt": "2021-10-10",
- "endAt": "2022-10-09",
- "inquiryNumber": 706637276862275600
}
}{- "resultInfo": {
- "code": "string",
- "message": "string",
- "codeId": "string"
}, - "data": {
- "merchantId": 13145928525414400,
- "groups": [
- {
- "id": 29952775505428480,
- "name": "Points Code group name",
- "balanceType": "CASHBACK",
- "maxPeriodDays": 365,
- "chargeLimit": 5,
- "status": "enable",
- "totalBudget": 10000,
- "remainingBudget": 10000
}
]
}
}