그래프 API 버전

/{payment-id}/refunds

모든 결제 환불을 발행하는 데 사용합니다.

읽기

이 에지는 읽을 수 없습니다.

게시

이 에지를 사용하여 환불을 시작할 수 있습니다.

POST /v19.0/{payment-id}/refunds HTTP/1.1
Host: graph.facebook.com

currency=EUR&amount=1.00
/* PHP SDK v5.0.0 */
/* make the API call */
try {
  // Returns a `Facebook\FacebookResponse` object
  $response = $fb->post(
    '/{payment-id}/refunds',
    array (
      'currency' => 'EUR',
      'amount' => '1.00',
    ),
    '{access-token}'
  );
} catch(Facebook\Exceptions\FacebookResponseException $e) {
  echo 'Graph returned an error: ' . $e->getMessage();
  exit;
} catch(Facebook\Exceptions\FacebookSDKException $e) {
  echo 'Facebook SDK returned an error: ' . $e->getMessage();
  exit;
}
$graphNode = $response->getGraphNode();
/* handle the result */
Bundle params = new Bundle();
params.putString("currency", "EUR");
params.putString("amount", "1.00");
/* make the API call */
new GraphRequest(
    AccessToken.getCurrentAccessToken(),
    "/{payment-id}/refunds",
    params,
    HttpMethod.POST,
    new GraphRequest.Callback() {
        public void onCompleted(GraphResponse response) {
            /* handle the result */
        }
    }
).executeAsync();
NSDictionary *params = @{
  @"currency": @"EUR",
  @"amount": @"1.00",
};
/* make the API call */
FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc]
                               initWithGraphPath:@"/{payment-id}/refunds"
                                      parameters:params
                                      HTTPMethod:@"POST"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
                                      id result,
                                      NSError *error) {
    // Handle the result
}];

권한

  • 해당 앱에 대한 환불을 발행하려면 앱 액세스 토큰이 필요합니다.

필드

이름 설명 유형

currency

환불 금액을 지정한 통화의 세 글자 ISO 코드입니다. 이는 원래 구매에 표시된 통화와 동일해야 합니다. 이는 필수 항목입니다.

string

amount

환불할 금액입니다. 이는 필수 항목입니다. 상위 결제 개체의 refundable_amount 필드보다 작거나 이와 같아야 합니다.

string

reason

이 주문을 환불하는 이유입니다.

enum{MALICIOUS_FRAUD, FRIENDLY_FRAUD, CUSTOMER_SERVICE}

응답

성공한 경우:

{
  "success": true
}

실패할 경우 관련 오류 메시지가 반환됩니다.

삭제

이 에지를 사용하여 삭제할 수 없습니다.