신용 한도를 사용한 후불 잔액 관리하기

현재 Apigee Edge 문서가 표시되고 있습니다.
Apigee X 문서로 이동
정보

소개

조직에 지원되는 통화를 추가하는 경우 지원되는 통화 추가에 설명된 대로 후불 개발자의 신용 한도를 설정할 수 있습니다. 크레딧 한도는 조직의 모든 후불 개발자에게 적용됩니다. 또한 다음 섹션에 설명된 대로 개별 후불 개발자에 대한 신용 한도를 설정할 수 있습니다. 이 경우 신용 한도는 지정된 개발자에 대해서만 통화에 설정된 한도를 재정의합니다.

API를 사용하여 신용 한도 설정

개별 개발자의 신용 한도를 설정하려면 /organizations/{org_name}/developers/{developer_id}/developer-credit-limit에 POST 요청을 실행합니다. 여기서 {developer_id}는 개발자의 이메일 주소입니다. 요청을 실행할 때 크레딧 금액과 크레딧에 사용되는 통화를 쿼리 매개변수로 지정해야 합니다. 예를 들어 다음 요청에서는 개발자의 신용 한도를 $1, 000로 설정합니다.

$ curl -H "Content-Type:application/json" -X POST \
"https://api.enterprise.apigee.com/v1/mint/organizations/{org_name}/developers/dev7@myorg/developer-credit-limit?amount=1000&supportedCurrencyId=usd" \
-u email:password

API를 사용하여 신용 한도 검색

후불 개발자의 신용 한도를 가져오려면 /organizations/{org_name}/developers/{developer_id}/developer-credit-limit에 GET 요청을 실행합니다. 여기서 {developer_id}는 개발자의 이메일 주소입니다. 예를 들면 다음과 같습니다.

$ curl -H "Accept:application/json" -X GET \
"https://api.enterprise.apigee.com/v1/mint/organizations/{org_name}/developers/dev7@myorg/developer-credit-limit" \
-u email:password

응답은 다음과 같아야 합니다(응답의 일부만 표시됨).

{
  "developerBalance" : [ {
    "amount" : 1000.0000,
    "id" : "ddd98cd5-06bc-481b-ae42-76a7345933a9",
    "supportedCurrency" : {
      "description" : "United States Dollar",
      "displayName" : "United States Dollar",
      "id" : "usd",
      "name" : "USD",
      "organization" : {
        ...
      },
      "status" : "ACTIVE",
      "virtualCurrency" : false
    },
    "usage" : 76.6052
  } ],
  "totalRecords" : 1
}

다음 단계

수익 창출을 사용하여 환불을 게시할 수 있습니다 (구매 거래에만 해당). 환불 게시에서 방법을 알아보세요.