RIDI Pay API (0.1.0)

Download OpenAPI specification:Download

public-api

모든 가맹점 서비스에서 호출 가능한 API

구독 예약

header Parameters
Api-Key
required
string
Example: 550E8400-E29B-41D4-A716-446655440000

가맹점에서 RIDI Pay API 연동을 위해 필요한 ID

Secret-Key
required
string
Example: 550E8400-E29B-41D4-A716-446655440000

가맹점에서 RIDI Pay API 연동을 위해 필요한 Secret

Request Body schema: application/json
payment_method_id
required
string

RIDI Pay 결제 수단 ID

product_name
required
string

구독 상품

return_url
required
string

RIDI Pay 결제 비밀번호 확인 성공/실패 후, Redirect 되는 가맹점 URL

Responses

200

Success

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

500

Internal Server Error

post /payments/subscriptions/reserve

Local Server

https://pay-api.local.ridi.io/payments/subscriptions/reserve

Test Server

https://pay-api.dev.ridi.io/payments/subscriptions/reserve

Production Server

https://pay-api.ridibooks.com/payments/subscriptions/reserve

Request samples

Content type
application/json
Copy
Expand all Collapse all
{}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "reservation_id": "880E8200-A29B-24B2-8716-42B65544A000"
}

구독 해지

path Parameters
subscription_id
required
string
Example: 550E8400-E29B-41D4-A716-446655440000

RIDI Pay 구독 ID

header Parameters
Api-Key
required
string
Example: 550E8400-E29B-41D4-A716-446655440000

가맹점에서 RIDI Pay API 연동을 위해 필요한 ID

Secret-Key
required
string
Example: 550E8400-E29B-41D4-A716-446655440000

가맹점에서 RIDI Pay API 연동을 위해 필요한 Secret

Responses

200

Success

401

Unauthorized

403

Forbidden

404

Not Found

500

Internal Server Error

delete /payments/subscriptions/{subscription_id}

Local Server

https://pay-api.local.ridi.io/payments/subscriptions/{subscription_id}

Test Server

https://pay-api.dev.ridi.io/payments/subscriptions/{subscription_id}

Production Server

https://pay-api.ridibooks.com/payments/subscriptions/{subscription_id}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "subscription_id": "880E8200-A29B-24B2-8716-42B65544A000",
  • "product_name": "리디북스 전자책",
  • "subscribed_at": "2018-06-07T01:59:30+09:00",
  • "unsubscribed_at": "2018-06-07T03:30:30+09:00"
}

구독 해지 취소

path Parameters
subscription_id
required
string
Example: 550E8400-E29B-41D4-A716-446655440000

RIDI Pay 구독 ID

header Parameters
Api-Key
required
string
Example: 550E8400-E29B-41D4-A716-446655440000

가맹점에서 RIDI Pay API 연동을 위해 필요한 ID

Secret-Key
required
string
Example: 550E8400-E29B-41D4-A716-446655440000

가맹점에서 RIDI Pay API 연동을 위해 필요한 Secret

Responses

200

Success

401

Unauthorized

403

Forbidden

404

Not Found

500

Internal Server Error

put /payments/subscriptions/{subscription_id}/resume

Local Server

https://pay-api.local.ridi.io/payments/subscriptions/{subscription_id}/resume

Test Server

https://pay-api.dev.ridi.io/payments/subscriptions/{subscription_id}/resume

Production Server

https://pay-api.ridibooks.com/payments/subscriptions/{subscription_id}/resume

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "subscription_id": "880E8200-A29B-24B2-8716-42B65544A000",
  • "product_name": "리디셀렉트 구독",
  • "subscribed_at": "2018-06-07T01:59:30+09:00"
}

구독 정보 조회

path Parameters
subscription_id
required
string

RIDI Pay 구독 ID

header Parameters
Api-Key
required
string
Example: 550E8400-E29B-41D4-A716-446655440000

가맹점에서 RIDI Pay API 연동을 위해 필요한 ID

Secret-Key
required
string
Example: 550E8400-E29B-41D4-A716-446655440000

가맹점에서 RIDI Pay API 연동을 위해 필요한 Secret

Responses

200

Success

401

Unauthorized

404

Not Found

500

Internal Server Error

get /payments/subscriptions/{subscription_id}/status

Local Server

https://pay-api.local.ridi.io/payments/subscriptions/{subscription_id}/status

Test Server

https://pay-api.dev.ridi.io/payments/subscriptions/{subscription_id}/status

Production Server

https://pay-api.ridibooks.com/payments/subscriptions/{subscription_id}/status

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "subscription_id": "550E8400-E29B-41D4-A716-446655440000",
  • "u_idx": 0,
  • "payment_method_id": "880E8200-A29B-24B2-8716-42B65544A000",
  • "payment_method_type": "CARD",
  • "product_name": "리디셀렉트 구독",
  • "subscribed_at": "2018-06-07T01:59:30+09:00",
  • "unsubscribed_at": "2018-06-08T01:59:30+09:00"
}

구독 결제 승인

path Parameters
subscription_id
required
string
Example: 550E8400-E29B-41D4-A716-446655440000

RIDI Pay 구독 ID

header Parameters
Api-Key
required
string
Example: 550E8400-E29B-41D4-A716-446655440000

가맹점에서 RIDI Pay API 연동을 위해 필요한 ID

Secret-Key
required
string
Example: 550E8400-E29B-41D4-A716-446655440000

가맹점에서 RIDI Pay API 연동을 위해 필요한 Secret

Request Body schema: application/json
partner_transaction_id
required
string

가맹점 주문 번호

buyer_id
required
string

구매자 ID(가맹점)

buyer_name
required
string

구매자 이름

buyer_email
required
string

구매자 Email

invoice_id
required
string

가맹점에서 중복 결제를 방지하기 위해서 입력하는 Identifier

Responses

200

Success

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

500

Internal Server Error

post /payments/subscriptions/{subscription_id}/pay

Local Server

https://pay-api.local.ridi.io/payments/subscriptions/{subscription_id}/pay

Test Server

https://pay-api.dev.ridi.io/payments/subscriptions/{subscription_id}/pay

Production Server

https://pay-api.ridibooks.com/payments/subscriptions/{subscription_id}/pay

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "partner_transaction_id": "string",
  • "buyer_id": "string",
  • "buyer_name": "string",
  • "buyer_email": "string",
  • "invoice_id": "string"
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "transaction_id": "550E8400-E29B-41D4-A716-446655440000",
  • "partner_transaction_id": "string",
  • "subscription_id": "880E8200-A29B-24B2-8716-42B65544A000",
  • "amount": "10000",
  • "subscribed_at": "2018-06-07T01:59:30+09:00",
  • "approved_at": "2018-06-07T03:30:30+09:00"
}

결제 예약

header Parameters
Api-Key
required
string
Example: 550E8400-E29B-41D4-A716-446655440000

가맹점에서 RIDI Pay API 연동을 위해 필요한 ID

Secret-Key
required
string
Example: 550E8400-E29B-41D4-A716-446655440000

가맹점에서 RIDI Pay API 연동을 위해 필요한 Secret

Request Body schema: application/json
payment_method_id
required
string

RIDI Pay 결제 수단 ID

partner_transaction_id
required
string

가맹점 주문 번호

product_name
required
string

결제 상품

amount
required
integer

결제 금액

return_url
required
string

RIDI Pay 결제 비밀번호 확인 성공/실패 후, Redirect 되는 가맹점 URL

Responses

200

Success

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

500

Internal Server Error

post /payments/reserve

Local Server

https://pay-api.local.ridi.io/payments/reserve

Test Server

https://pay-api.dev.ridi.io/payments/reserve

Production Server

https://pay-api.ridibooks.com/payments/reserve

Request samples

Content type
application/json
Copy
Expand all Collapse all
{}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "reservation_id": "880E8200-A29B-24B2-8716-42B65544A000"
}

결제 승인

path Parameters
transaction_id
required
string
Example: 550E8400-E29B-41D4-A716-446655440000

RIDI Pay 주문 번호

header Parameters
Api-Key
required
string
Example: 550E8400-E29B-41D4-A716-446655440000

가맹점에서 RIDI Pay API 연동을 위해 필요한 ID

Secret-Key
required
string
Example: 550E8400-E29B-41D4-A716-446655440000

가맹점에서 RIDI Pay API 연동을 위해 필요한 Secret

Request Body schema: application/json
buyer_id
required
string

구매자 ID(가맹점)

buyer_name
required
string

구매자 이름

buyer_email
required
string

구매자 Email

Responses

200

Success

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

500

Internal Server Error

post /payments/{transaction_id}/approve

Local Server

https://pay-api.local.ridi.io/payments/{transaction_id}/approve

Test Server

https://pay-api.dev.ridi.io/payments/{transaction_id}/approve

Production Server

https://pay-api.ridibooks.com/payments/{transaction_id}/approve

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "buyer_id": "string",
  • "buyer_name": "string",
  • "buyer_email": "string"
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "transaction_id": "550E8400-E29B-41D4-A716-446655440000",
  • "partner_transaction_id": "string",
  • "product_name": "리디북스 전자책",
  • "amount": "10000",
  • "reserved_at": "2018-06-07T01:59:30+09:00",
  • "approved_at": "2018-06-07T01:59:59+09:00"
}

결제 취소

path Parameters
transaction_id
required
string
Example: 550E8400-E29B-41D4-A716-446655440000

RIDI Pay 주문 번호

header Parameters
Api-Key
required
string
Example: 550E8400-E29B-41D4-A716-446655440000

가맹점에서 RIDI Pay API 연동을 위해 필요한 ID

Secret-Key
required
string
Example: 550E8400-E29B-41D4-A716-446655440000

가맹점에서 RIDI Pay API 연동을 위해 필요한 Secret

Responses

200

Success

401

Unauthorized

403

Forbidden

404

Not Found

500

Internal Server Error

post /payments/{transaction_id}/cancel

Local Server

https://pay-api.local.ridi.io/payments/{transaction_id}/cancel

Test Server

https://pay-api.dev.ridi.io/payments/{transaction_id}/cancel

Production Server

https://pay-api.ridibooks.com/payments/{transaction_id}/cancel

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "transaction_id": "550E8400-E29B-41D4-A716-446655440000",
  • "partner_transaction_id": "string",
  • "product_name": "리디북스 전자책",
  • "amount": "10000",
  • "reserved_at": "2018-06-07T01:59:30+09:00",
  • "approved_at": "2018-06-07T01:59:59+09:00",
  • "canceled_at": "2018-06-07T01:59:59+09:00"
}

결제 상태 조회

path Parameters
transaction_id
required
string
Example: 550E8400-E29B-41D4-A716-446655440000

RIDI Pay 주문 번호

header Parameters
Api-Key
required
string
Example: 550E8400-E29B-41D4-A716-446655440000

가맹점에서 RIDI Pay API 연동을 위해 필요한 ID

Secret-Key
required
string
Example: 550E8400-E29B-41D4-A716-446655440000

가맹점에서 RIDI Pay API 연동을 위해 필요한 Secret

Responses

200

Success

401

Unauthorized

404

Not Found

500

Internal Server Error

get /payments/{transaction_id}/status

Local Server

https://pay-api.local.ridi.io/payments/{transaction_id}/status

Test Server

https://pay-api.dev.ridi.io/payments/{transaction_id}/status

Production Server

https://pay-api.ridibooks.com/payments/{transaction_id}/status

Response samples

Content type
application/json
Copy
Expand all Collapse all
{}

private-api

RIDI Pay 내부 호출 API

구독 예약 정보 조회

path Parameters
reservation_id
required
string

RIDI Pay 구독 예약 ID, [POST] /payments/subscriptions/reserve API 참고

Responses

200

Success

401

Unauthorized

403

Forbidden

404

Not Found

500

Internal Server Error

get /payments/subscriptions/{reservation_id}

Local Server

https://pay-api.local.ridi.io/payments/subscriptions/{reservation_id}

Test Server

https://pay-api.dev.ridi.io/payments/subscriptions/{reservation_id}

Production Server

https://pay-api.ridibooks.com/payments/subscriptions/{reservation_id}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "is_pin_validation_required": "true",
  • "validation_token": "550E8400-E29B-41D4-A716-446655440000"
}

구독 등록

Request Body schema: application/json
validation_token
required
string

결제 비밀번호 확인 후 발급된 토큰

Responses

200

Success

403

Forbidden

404

Not Found

500

Internal Server Error

post /payments/subscriptions/{reservation_id}

Local Server

https://pay-api.local.ridi.io/payments/subscriptions/{reservation_id}

Test Server

https://pay-api.dev.ridi.io/payments/subscriptions/{reservation_id}

Production Server

https://pay-api.ridibooks.com/payments/subscriptions/{reservation_id}

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "validation_token": "550E8400-E29B-41D4-A716-446655440000"
}

Response samples

Content type
application/json

결제 예약 정보 조회

path Parameters
reservation_id
required
string

RIDI Pay 결제 예약 ID, [POST] /payments/reserve API 참고

Responses

200

Success

401

Unauthorized

403

Forbidden

404

Not Found

500

Internal Server Error

get /payments/{reservation_id}

Local Server

https://pay-api.local.ridi.io/payments/{reservation_id}

Test Server

https://pay-api.dev.ridi.io/payments/{reservation_id}

Production Server

https://pay-api.ridibooks.com/payments/{reservation_id}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{ }

결제 비밀번호 확인 성공 후, 결제 생성

path Parameters
reservation_id
required
string

RIDI Pay 결제 예약 ID, [POST] /payments/reserve API 참고

Request Body schema: application/json
validation_token
required
string

결제 비밀번호 확인 후 발급된 토큰

Responses

200

Success

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

500

Internal Server Error

post /payments/{reservation_id}

Local Server

https://pay-api.local.ridi.io/payments/{reservation_id}

Test Server

https://pay-api.dev.ridi.io/payments/{reservation_id}

Production Server

https://pay-api.ridibooks.com/payments/{reservation_id}

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "validation_token": "550E8400-E29B-41D4-A716-446655440000"
}

Response samples

Content type
application/json

카드 등록

Request Body schema: application/json
card
string

카드 번호

card_expiration_date