クレジット情報取得API


概要

クレジットカードの情報取得をするAPIです。


エンドポイント

メソッド URI Headers
GET /api/payment/credit/{id} Default

リクエストパラメーター

パラメーター名 内容 特記
id int 監理団体ID
/api/payment/credit/1

レスポンス

パラメーター名 内容 特記
gmo_id int gmoの管理ID 多分
credit_card_type int カード種類 VISA等
credit_card_number int カード下四桁
credit_card_nominee string カード名義人
credit_card_effective_month tinyint カード有効期限 月
credit_card_effective_year tinyint カード有効期限 年
{
    "result"   : true,
    "errors"   : "",
    "data"     : {
        'gmo_id'               : 1,
        'credit_card_type'     : 1,
        'credit_card_number'   : 1,
        'credit_card_nominee'  : 'カード 名義人',
        'credit_card_effective': '2022/10',
    },
}

{primary} 登録がなければnull


{danger} 失敗時は200以外のエラーコードが返却されます。共通ルールのレスポンスをチェック。


{primary} 本機能で取得するデータに対してのvalidationを明記します

バリデーション

画面項目名 フィールド名 チェック内容 備考
gmoの管理ID gmo_id required


numeric
カード種類 credit_card_type required


string
カード下四桁 credit_card_number required


digits:4
カード名義人 credit_card_nominee required


string
カード有効期限 credit_card_effective required


digits:2

データ取得

SELECT
    *
FROM
    `organization_payment_settings`
WHERE
    `organization_payment_settings`.`organization_id` = $this->route('id')
AND `organization_payment_settings`.`deleted_at` IS NULL

RUN