Copyright notation
The copyright of this document belongs to GRANDPAY. (hereinafter referred to as “GRANDPAY” or “Company”).
No part of this publication may be reproduced, modified, distributed, or similarly reproduced in any form or by any means, including electronic or mechanical, without the prior written permission of the Company.
All contents of this document are protected by the Japanese Copyright Law.
While every effort has been made to ensure the accuracy of the contents of this document, please contact us if you notice any omissions or other problems.
1. Introduction
This technical document explains how to successfully connect through a redirect link to the GRANDPAY payment gateway.
GRANDPAY Redirect API
has production, sandbox environment, and so-called simulation mode
that can be used for testing.
2. Preparation
Before the user connects to GRANDPAY Redirect API
, please confirm that the user owns an API URL
and Tenant key
. This information can be found after login to the system in the API information section.
The API URL:
{{API_URL}}
The tenant key:
{{TENANT_KEY}}
3. API
This session will explain how to connect to the Redirect API
provided by GRANDPAY.
Before the user creates a payment link for the customer to pay, it needs to call the 3.1 Get Authentication Token
API to own the token first. After that, use the token to call the 3.2 Create Redirect Payment
api create the payment.
3.1 Get Authentication Token
The API is for users to own the token for creating the payment with the 3.2 Create Redirect Payment
API.
Request
Authorization:
Basic {{CLIENT_ID}}
Method: POST
Body raw (urlencoded):
key | value |
---|---|
grant_type | [custom-password-grant] |
username | {{MERCHANT_PORTAL_LOGIN_ACCOUNT}} |
credentials | {{MERCHANT_PORTAL_LOGIN_PASSWORD}} |
Response
Body raw (json):
{
"code": "SYS0000",
"message": "Success.",
"data": {
"accessToken": "eyJraWQiOiJhbHRlY2gtdWFhIiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiI3MTQyMTU4NTI3MDQwMDYxNDQwIiwiYXVkIjoiY2xpZW50IiwibWV0YWRhdGEiOnsiaWRlbnRpZmllciI6IjY4MjE1Mjc0In0sIm5iZiI6MTcwMjkwNzQwNywic2NvcGUiOlsib3BlbmlkIl0sImlzcyI6Imh0dHA6Ly9sb2NhbGhvc3Q6ODA4MCIsImV4cCI6MTcwMjkxMTAwNywiaWF0IjoxNzAyOTA3NDA3fQ.Q2V-0VHv2ClMU4nIPwm7mDC9L-EasdJJ5XQ8VT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[
"openid"
],
"tokenType": "Bearer",
"expiresIn": 3597
}
}
3.2 Create Redirect Payment
This API is for creating payments with the token owned in the 3.1 Get Authentication Token
API.
Request
Authorization:
Bearer
3.1 Get Authentication Token.response.data.accessToken
Header: x-tenant-key
{{TENANT_KEY}}
Header: IsTestMode
(Optional)
true
Method: POST
Body raw (json):
{
"title": "123",
"type": "WEB_REDIRECT",
"currency": "JPY",
"nature": "ONE_OFF",
"payer": {
"name": "Post Man",
"phone": "98765432",
"email": "postman@postman.com",
"areaCode": "081",
"city":"tokyo",
"country":"JP"
},
"successUrl": "https://merchant-api.com/callback?success=1",
"failureUrl": "https://merchant-api.com/callback?fail=1",
"lineItems": [
{
"priceData": {
"currency": "JPY",
"productData": {
"name": "Testing"
},
"unitAmount": "9999",
"taxBehavior": "string"
},
"adjustableQuantity": {
"enabled": true,
"minimum": 1,
"maximum": 10
},
"quantity": 1
}
]
}
Request-Parameter Detail
Parameter | Description | Usage |
---|---|---|
title | Title of the transaction | required |
type | Type of the token that will be created | [WEB_REDIRECT] |
currency | Currency for the transaction | [JPY/USD/EUR/GBP] |
nature | - | [ONE_OFF] |
payer | Customer information object | - |
-name | Customer name | required |
-phone | Customer phone | required |
Customer email | required | |
-areaCode | Customer phone area code | required |
-city | Customer live city | required |
-country | Customer live country | required |
successUrl | URL to redirect on successful transaction | required |
failureUrl | URL to redirect on failed transaction | required |
lineItems | Array of line items in the transaction | - |
-priceData | Pricing information for the item | - |
—currency | Currency of the item | [JPY/USD/EUR/GBP] |
—productData | Product information for the item | - |
—-name | Name of the product | required |
—unitAmount | Unit amount of the item | required |
—taxBehavior | Tax behavior for the item | [string] |
-adjustableQuantity | Adjustable quantity settings | - |
—enabled | Whether adjustable quantity is enabled | [true] |
—minimum | Minimum quantity allowed | required |
—maximum | Maximum quantity allowed | required |
-quantity | Quantity of the item | required |
Response
Body raw (json):
{
"code": "SYS0000",
"message": "Success.",
"data": {
"createDt": "2023-11-29 12:11:10",
"payer": {
"name": "Post Man",
"mobile": "68215274",
"email": "postman@olg-grandpay-backup.local"
},
"total": "9999",
"subtotal": "9999",
"checkoutTarget": {
"payer": {
"name": "Post Man",
"mobile": "68215274",
"email": "postman@olg-grandpay-backup.local"
}
},
"title": "123",
"currency": "JPY",
"type": "WEB_REDIRECT",
"id": "cos_ec16a750f73b412cd3dc411893e3406c",
"status": "OPEN",
"checkoutUrl": "https:/{{API_URL}}/checkout/ec16a750f73b412cd3dc411893e3406c",
"lineItems": [
{
"id": "12028722601660416",
"priceData": {
"currency": "JPY",
"productData": {
"name": "Testing"
},
"unitAmount": "9999",
"taxBehavior": "string"
},
"adjustableQuantity": {
"enabled": true,
"minimum": 1,
"maximum": 10
},
"quantity": 1,
"total": "9999",
"subtotal": "9999"
}
]
}
}
Response-Parameter Detail
Parameter | Description |
---|---|
code | Status code indicating the result of the request |
message | A message describing the result of the request |
data | Object containing transaction-related information |
-createDt | Creation date and time of the transaction |
-payer | Payer information |
—name | Payer’s name |
—mobile | Payer’s mobile number |
Payer’s email address | |
-total | Total amount of the transaction |
-subtotal | Subtotal amount of the transaction |
-checkoutTarget | Target information for checkout |
—payer | Payer information for checkout target |
—-name | Name of the payer for checkout target |
—-phone | Mobile number of the payer for checkout target |
Email address of the payer for checkout target | |
-title | Title of the transaction |
-currency | Currency of the transaction |
-type | Type of transaction |
-id | Transaction ID |
-status | Status of the transaction |
-checkoutUrl | URL for the transaction checkout |
-lineItems | Array of line items in the transaction |
—id | ID of the line item |
—priceData | Pricing information for the line item |
—-currency | Currency of the line item |
—-productData | Product information for the line item |
——name | Name of the product for the line item |
—-unitAmount | Unit amount of the line item |
—-taxBehavior | Tax behavior for the line item |
—adjustableQuantity | Adjustable quantity settings for the line item |
—-enabled | Whether adjustable quantity is enabled |
—-minimum | Minimum quantity allowed for the line item |
—-maximum | Maximum quantity allowed for the line item |
—quantity | Quantity of the line item |
—total | Total amount of the line item |
—subtotal | Subtotal amount of the line item |
3.3 Check Payment Status
This API is for checking the payment status in 3.2 Create Redirect Payment
. All related transaction can finded in response.data.payments
.
Request
Authorization:
Bearer
3.1 Get Authentication Token.response.data.accessToken
Header: x-tenant-key
{{TENANT_KEY}}
Header: IsTestMode
(Optional)
true
Method: GET
https://{{API_URL}}/p/v2/checkout-sessions/{{`3.2 Create Redirect Payment.response.data.id`}}
Response
Body raw (json):
{
"code": "SYS0000",
"message": "Success.",
"data": {
"mode": "TEST",
"payer": {
"name": "Post Man",
"email": "postman@postman.com"
},
"total": "9999",
"subtotal": "9999",
"checkoutTarget": {
"payer": {
"name": "Post Man",
"email": "postman@postman.com"
}
},
"title": "Testing",
"currency": "JPY",
"type": "WEB_REDIRECT",
"nature": "ONE_OFF",
"id": "cos_test_f2ee56af02cabe547d8343ac27e232f1",
"status": "EXPIRED",
"checkoutUrl": "https://grand-pay.dev.pg.at-dev.io/checkout/test_f2ee56af02cabe547d8343ac27e232f1",
"lineItems": [
{
"id": "125854347663 056",
"priceData": {
"currency": "JPY",
"productData": {
"name": "Testing"
},
"unitAmount": "9999",
"taxBehavior": "string"
},
"adjustableQuantity": {
"enabled": true,
"minimum": 1,
"maximum": 10
},
"quantity": 1,
"total": "9999",
"subtotal": "9999"
}
],
"createDt": "2024-01-17 08:00:47",
"p": "bvk",ˆ
"tenantContext": {
"name": "Merchant - Main Store"
},
"payments": [
{
"id": "p_7153295345353490432",
"amount": "9999",
"currency": "JPY",
"status": "COMPLETED",
"mode": "TEST",
"createDt": "2024-01-17 08:01:52",
"updateDt": "2024-01-17 08:01:52"
},
{
"id": "p_7153295177740713984",
"amount": "9999",
"currency": "JPY",
"status": "REJECTED",
"mode": "TEST",
"createDt": "2024-01-17 08:01:12",
"updateDt": "2024-01-17 08:01:12"
}
]
}
}
Response-Parameter Detail
Parameter | Description |
---|---|
code | Status code indicating the result of the request |
message | A message describing the result of the request |
data | Object containing transaction-related information |
-mode | Mode of the transaction |
-payer | Payer information object |
—name | Payer’s name |
Payer’s email address | |
-total | Total amount of the transaction |
-subtotal | Subtotal amount of the transaction |
-checkoutTarget | Target information for checkout |
—payer | Payer information for checkout target |
—-name | Name of the payer for checkout target |
Email address of the payer for checkout target | |
-title | Title of the transaction |
-currency | Currency of the transaction |
-type | Type of transaction |
-nature | Nature of the transaction |
-id | Transaction ID |
-status | Status of the transaction |
-checkoutUrl | URL for the transaction checkout |
-lineItems | Array of line items in the transaction |
—id | ID of the line item |
—priceData | Pricing information for the line item |
—-currency | Currency of the line item |
—-productData | Product information for the line item |
——name | Name of the product for the line item |
—-unitAmount | Unit amount of the line item |
—-taxBehavior | Tax behavior for the line item |
—adjustableQuantity | Adjustable quantity settings for the line item |
—-enabled | Whether adjustable quantity is enabled |
—-minimum | Minimum quantity allowed for the line item |
—-maximum | Maximum quantity allowed for the line item |
—quantity | Quantity of the line item |
—total | Total amount of the line item |
—subtotal | Subtotal amount of the line item |
-createDt | Creation date and time of the transaction |
-fixedPsp | Fixed Payment Service Provider |
-tenantContext | Tenant context information |
—name | Name of the tenant context |
-payments | Array of payment information |
—id | Payment ID |
—amount | Amount of the payment |
—currency | Currency of the payment |
—status | Status of the payment |
—mode | Mode of the payment |
—createDt | Creation date and time of the payment |
—updateDt | Update date and time of the payment |
4. Error Code
Code | Message |
---|---|
COS0001 | Incorrect Checkout Session. |
COS0002 | Expired Checkout Session. |
COS0003 | Payment Method not found. |
COS0004 | Completed Checkout Session. |
LIT0001 | Incorrect Line Item. |
PYT0001 | Payment Record is not found. |
PYT0002 | Payment Transaction Record is not found. |
PYT0003 | Credit Card Number is not found. |
PYT0004 | Incorrect Payment Service adapter/sdk. |
PYT0005 | No pg feature is subscribed. |
PYT0006 | This type of tenant is not allowed to perform this feature. |
PMD0001 | Payment Method Record is not found. |
SYS0000 | Success. |
SYS9400 | API Client Error. |
SYS9901 | SQL Error. |
SYS9902 | Redis Key not existed / expired. |
SYS9999 | Fail. |
SYSA400 | AuthenticationException. |
SYSA401 | AccessDeniedException. |
PARM400 | Invalid field validation. |
TENT400 | Tenant id / key not found. |
TENT404 | TenantContext null in [PO] @PrePersist. |
著作権に関する表記
本書の著作権は「GRANDPAY(以下、弊社という 及びGRANDPAY)」に帰属します。
本書のいかなる部分においても、弊社に事前の書面による許可なく、電子的、機械的を含むいかなる手段や形式によって もその複製、改変、頒布、ならびにそれらに類似する行為を禁止します。
本書の内容は、日本国著作権法によりすべての内容について保護されています。
本書の内容について万全を期しておりますが、万一記載もれ等お気づきの点がございましたら、弊社までご連絡ください。
1. 初めに
本書は、リダイレクトリンクを通じてGRANDPAYペイメントゲートウェイへの接続方法説明いたします。
GRANDPAY「リダイレクトAPI」には、本番環境、サンドボックス環境、シュミレーションモードがございまして、それぞれにてテスティングが行えます。
2. 準備
ユーザー様がGRANDPAY「リダイレクトAPI」に接続する前に必ずAPI URL及びテナントキーをお持ちであることをご確認ください。こちらの情報は、(1. 加盟店ポータルにログイン>2. 左側のメニューから「情報」を選択>3. 「API情報」を選択>4. API_URL及びテナントキーの表示)よりご確認いただけます。
API URL
{{API_URL}}
テナントキー:
{{TENANT_KEY}}
3. API
本セッションにてGRANDPAY「リダイレクトAPI」への接続方法を説明いたします。
ユーザー様がお客様のお支払い用にペイメントリンクを作成する前に、3.1 オーセンティケーショントークン取得
APIをコールして先にトークンを所有してください。その後、トークンを利用して 3.2 リダイレクト支払い作成
APIをコールして支払いを作成してください。
3.1 オーセンティケーショントークン取得
このAPIはユーザー様がトークンを所有して、3.2 リダイレクト支払い作成
APIを通じて支払いを作成します。
リクエスト
Authorization:
Basic {{CLIENT_ID}}
Method: POST
Body raw (urlencoded):
key | value |
---|---|
grant_type | [custom-password-grant] |
username | {{MERCHANT_PORTAL_LOGIN_NAME}} |
credentials | {{MERCHANT_PORTAL_LOGIN_PASSWORD}} |
レスポンス
Body raw (json):
{
"code": "SYS0000",
"message": "Success.",
"data": {
"accessToken": "eyJraWQiOiJhbHRlY2gtdWFhIiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiI3MTQyMTU4NTI3MDQwMDYxNDQwIiwiYXVkIjoiY2xpZW50I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zjW3sbzTMKCQ3h2loxJCm60B4ClzHi-lX9DEA2k5KOgly0jD4IomjAcp1GvTHae1K6vWvqocwAah8bkJOfw1QaQchW_4J0GJCU2BEUYYrhAr-x8wn3SjG3U8Wr8UhDInq8_F6U-al3yP3z6V6l7s2zWBrhQcG5NkeEIHVkPlWZ050Aw5MU34xnbsksAHF5vBGnBcLSFk8om29jPRRyB33YsJSu86qXU4dgA",
"scopes": [
"openid"
],
"tokenType": "Bearer",
"expiresIn": 3597
}
}
3.2 リダイレクト支払い作成
こちらのAPIは3.1 Get Authentication Token
APIで取得したトークンを利用して支払い作成が出来ます。
リクエスト
Authorization:
Bearer
3.1 Get Authentication Token.response.data.accessToken
Header: x-tenant-key
{{TENANT_KEY}}
Header: IsTestMode
(Optional)
true
Method: POST
Body raw (json):
{
"title": "123",
"type": "WEB_REDIRECT",
"currency": "JPY",
"nature": "ONE_OFF",
"payer": {
"name": "Post Man",
"phone": "98765432",
"email": "postman@postman.com",
"areaCode": "81",
"city":"tokyo",
"country":"JP"
},
"successUrl": "https://merchant-api.com/callback?success=1",
"failureUrl": "https://merchant-api.com/callback?fail=1",
"lineItems": [
{
"priceData": {
"currency": "JPY",
"productData": {
"name": "Testing"
},
"unitAmount": "9999",
"taxBehavior": "string"
},
"adjustableQuantity": {
"enabled": true,
"minimum": 1,
"maximum": 10
},
"quantity": 1
}
]
}
リクエスト-パラメータ詳細
パラメーター | 詳細 | 取り扱い |
---|---|---|
title | 決済タイトル | 必須 |
type | 作成されるトークン種別 | [WEB_REDIRECT] |
currency | 決定通過 | [JPY/USD/EUR/GBP] |
nature | - | [ONE_OFF] |
payer | お客様情報オブジェクト | - |
-name | お客様名義 | 必須 |
-phone | お客様電話番号 | 必須 |
お客様email | 必須 | |
-areaCode | お客様電話番号エリアコード | 必須 |
-city | お客様がお住まいの町 | 必須 |
-country | お客様がお住まいの国 | 必須 |
successUrl | 決済成功時にリダイレクトするURL | 必須 |
failureUrl | 決済否認時にリダイレクトするURL | 必須 |
lineItems | 決済ラインアイテムのアレイ | - |
-priceData | アイテム商品価格 | - |
—currency | アイテム通貨 | [JPY/USD/EUR/GBP] |
—productData | アイテムの商品詳細 | - |
—-name | 商品名 | 必須 |
—unitAmount | アイテムのユニットアマウント | 必須 |
—taxBehavior | アイテムの税金処理 | [string] |
-adjustableQuantity | 変更可能な数量設定 | - |
—enabled | 数量設定の可否 | [true] |
—minimum | 可能な最小数量 | 必須 |
—maximum | 可能な最大数量 | 必須 |
-quantity | アイテムの数量 | 必須 |
レスポンス
Body raw (json):
{
"code": "SYS0000",
"message": "Success.",
"data": {
"createDt": "2023-11-29 12:11:10",
"payer": {
"name": "Post Man",
"mobile": "68215274",
"email": "postman@olg-grandpay-backup.local"
},
"total": "9999",
"subtotal": "9999",
"checkoutTarget": {
"payer": {
"name": "Post Man",
"mobile": "68215274",
"email": "postman@olg-grandpay-backup.local"
}
},
"title": "123",
"currency": "JPY",
"type": "WEB_REDIRECT",
"id": "cos_ec16a750f73b412cd3dc411893e3406c",
"status": "OPEN",
"checkoutUrl": "https:/{{API_URL}}/checkout/ec16a750f73b412cd3dc411893e3406c",
"lineItems": [
{
"id": "12028722601660416",
"priceData": {
"currency": "JPY",
"productData": {
"name": "Testing"
},
"unitAmount": "9999",
"taxBehavior": "string"
},
"adjustableQuantity": {
"enabled": true,
"minimum": 1,
"maximum": 10
},
"quantity": 1,
"total": "9999",
"subtotal": "9999"
}
]
}
}
レスポンス-パラメーター詳細
パラメーター | 詳細 |
---|---|
code | 決済処理結果のステータスコード |
message | 決済結果を説明するメッセージ |
data | 決済関連情報を含むオブジェクト |
-createDt | 決済作成日時 |
-payer | 支払人情報 |
—name | 支払人名義 |
—mobile | 支払人電話番号 |
支払人メールアドレス | |
-total | 決済合計 |
-subtotal | 決済小計 |
-checkoutTarget | チェックアウト用のターゲット情報 |
—payer | チェックアウトターゲット用の支払人情報 |
—-name | チェックアウトターゲット用の支払人名義 |
—-phone | チェックアウトターゲット用の支払人電話番号 |
チェックアウトターゲット用の支払人メールアドレス | |
-title | 決済タイトル |
-currency | 決済通貨 |
-type | 決済種別 |
-id | 決済ID |
-status | 決済ステータス |
-checkoutUrl | 決済チェックアウトのURL |
-lineItems | 決済ラインアイテムのアレイ |
—id | ラインアイテムのID |
—priceData | ラインアイテム用の価格情報 |
—-currency | ラインアイテムの通貨 |
—-productData | ラインアイテム用の商品詳細 |
——name | ラインアイテム用の商品名 |
—-unitAmount | ラインアイテムのユニットアマウント |
—-taxBehavior | ラインアイテム用の税金処理 |
—adjustableQuantity | ラインアイテム用の変更可能な数量設定 |
—-enabled | 数量設定の可否 |
—-minimum | ラインアイテム用の最小数量 |
—-maximum | ラインアイテム用の最大数量 |
—quantity | ラインアイテムの数量 |
—total | ラインアイテムの合計 |
—subtotal | ラインアイテムの小計 |
3.3 支払ステータスの確認
こちらのAPIは、3.2 Create Redirect Payment
の支払ステータスの確認用です。全関連決済はresponse.data.payments
で見れます。
リクエスト
Authorization:
Bearer
3.1 Get Authentication Token.response.data.accessToken
Header: x-tenant-key
{{TENANT_KEY}}
Header: IsTestMode
(Optional)
true
Method: GET
https://{{API_URL}}/p/v2/checkout-sessions/{{`3.2 Create Redirect Payment.response.data.id`}}
Response
Body raw (json):
{
"code": "SYS0000",
"message": "Success.",
"data": {
"mode": "TEST",
"payer": {
"name": "Post Man",
"email": "postman@postman.com"
},
"total": "9999",
"subtotal": "9999",
"checkoutTarget": {
"payer": {
"name": "Post Man",
"email": "postman@postman.com"
}
},
"title": "Testing",
"currency": "JPY",
"type": "WEB_REDIRECT",
"nature": "ONE_OFF",
"id": "cos_test_f2ee56af02cabe547d8343ac27e232f1",
"status": "EXPIRED",
"checkoutUrl": "https://{{API_URL}}}/checkout/test_f2ee56af02cabe547d8343ac27e232f1",
"lineItems": [
{
"id": "12585434766381056",
"priceData": {
"currency": "JPY",
"productData": {
"name": "Testing"
},
"unitAmount": "9999",
"taxBehavior": "string"
},
"adjustableQuantity": {
"enabled": true,
"minimum": 1,
"maximum": 10
},
"quantity": 1,
"total": "9999",
"subtotal": "9999"
}
],
"createDt": "2024-01-17 08:00:47",
"p": "bvk",
"tenantContext": {
"name": "Merchant - Main Store"
},
"payments": [
{
"id": "p_7153295345353490432",
"amount": "9999",
"currency": "JPY",
"status": "COMPLETED",
"mode": "TEST",
"createDt": "2024-01-17 08:01:52",
"updateDt": "2024-01-17 08:01:52"
},
{
"id": "p_7153295177740713984",
"amount": "9999",
"currency": "JPY",
"status": "REJECTED",
"mode": "TEST",
"createDt": "2024-01-17 08:01:12",
"updateDt": "2024-01-17 08:01:12"
}
]
}
}
レスポンス-パラメーター詳細
パラメーター | 詳細 |
---|---|
code | 決済処理結果のステータスコード |
message | 決済結果を説明するメッセージ |
data | 決済関連情報を含むオブジェクト |
-mode | 決済モード |
-payer | 支払人情報オブジェクト |
—name | 支払人名義 |
支払人メールアドレス | |
-total | 決済合計 |
-subtotal | 決済小計 |
-checkoutTarget | チェックアウト用のターゲット情報 |
—payer | チェックアウトターゲット用の支払人情報 |
—-name | チェックアウトターゲット用の支払人名義 |
チェックアウトターゲット用の支払人メールアドレス | |
-title | 決済タイトル |
-currency | 決済通貨 |
-type | 決済種別 |
-nature | 決済内容 |
-id | 決済ID |
-status | 決済ステータス |
-checkoutUrl | 決済チェックアウトのURL |
-lineItems | 決済ラインアイテムのアレイ |
—id | ラインアイテムのID |
—priceData | ラインアイテム用の価格情報 |
—-currency | ラインアイテムの通貨 |
—-productData | ラインアイテム用の商品詳細 |
——name | ラインアイテム用の商品名 |
—-unitAmount | ラインアイテムのユニットアマウント |
—-taxBehavior | ラインアイテム用の税金処理 |
—adjustableQuantity | ラインアイテム用の変更可能な数量設定 |
—-enabled | 数量設定の可否 |
—-minimum | ラインアイテム用の最小数量 |
—-maximum | ラインアイテム用の最大数量 |
—quantity | ラインアイテムの数量 |
—total | ラインアイテムの合計 |
—subtotal | ラインアイテムの小計 |
-createDt | 決済作成時 |
-fixedPsp | 固定ペイメントサービスプロバイダー |
-tenantContext | テナントコンテキスト情報 |
—name | テナントコンテキストの名前 |
-payments | 支払情報のアレイ |
—id | 支払ID |
—amount | 支払額 |
—currency | 支払通貨 |
—status | 支払ステータス |
—mode | 支払モード |
—createDt | 支払作成時 |
—updateDt | 支払のアップデート時 |
4. エラーコード
コード | メッセージ |
---|---|
COS0001 | 不正チェックアウトセッション |
COS0002 | 有効期限切れチェックアウトセッション |
COS0003 | 支払方法が見つかりませんでした |
COS0004 | チェックアウトセッションが完了しました |
LIT0001 | 不正ラインアイテム |
PYT0001 | 支払履歴が見つかりませんでした |
PYT0002 | 決済支払履歴が見つかりませんでした |
PYT0003 | クレジットカード番号が見つかりませんでした |
PYT0004 | 間違った支払いサービスアダプター/SDK |
PYT0005 | No pg フィーチャーに登録されてません |
PYT0006 | この種類のテナントはこの機能を実行する許可がありません |
PMD0001 | 支払方法履歴が見つかりませんでした |
SYS0000 | 成功 |
SYS9400 | APIクライアントエラー |
SYS9901 | SQLエラー |
SYS9902 | Redisキーが存在しません/期限切れです |
SYS9999 | 失敗 |
SYSA400 | 例外オーセンチケーション |
SYSA401 | アクセス拒否された例外 |
PARM400 | フィールド不適合 |
TENT400 | テナントID/キーが見つかりませんでした |
TENT404 | [PO] @PrePersistのテナントコンテキストがヌル |