Xsolla-logoXsolla Developers
または
パブリッシャーアカウントへ

Declined paymentWebhook POST

If a transaction is declined by a payment system, Xsolla sends the transaction details in a webhook of the ps_declined type to your configured webhook URL. The webhook is sent during the authorization or payment processing stage. In this case, the payment\ order_paid webhook is not sent.

Typical reasons for payment system declines:

  • Card authorization failed (for example, the payment system could not complete the authorization process due to a technical error or no response from the bank) or was declined (for example, the bank responded but refused the transaction due to insufficient funds or invalid card details).
  • 3-D Secure verification failed, was not completed, or the user confirmation timed out.
  • The processor or acquiring bank is temporarily unavailable or returns a hard decline due to an irreversible error, such as a closed account or an invalid card number. Retrying without addressing the underlying issue will not result in a successful transaction.

Should not be confused with:

  • Anti-fraud rejections, which are reported via the afs_reject webhook.
  • Refunds and partial refunds after a successful payment, which are reported via the refund and partial_refund webhooks.

Note

To receive the ps_declined webhook, contact your Customer Success Manager or email csm@xsolla.com.

Request
Request Body schema: application/json
notification_type
required
string

通知タイプ。

required
object

トランザクションの詳細(オブジェクト)。

dry_run
integer

テストトランザクション。パラメータは、テストトランザクションの場合は1つの値を持ち、もしくはトランザクションが実際の場合は送信されません。

external_id
string

トランザクション外部ID。

id
integer

トランザクションID。

payment_method
integer

決済方法のID。

object

Refund details (object).

author
string

返金イニシエーター。フィールド値は、次の表に従って渡されます:

返金イニシエーター フィールド値
ゲーム(API経由)。 API
パブリッシャーアカウントのユーザー(自動返金)。 ユーザーのメールアドレス
パブリッシャー アカウント ユーザー(エクソラカスタマーサポートの支援を受けて)。 support@xsolla.com
エクソラ(エクソラカスタマーサポートの支援を受けて)。 support@xsolla.com
code
integer

コードID。

reason
string

返金の理由。

object

カスタムプロジェクト設定(オブジェクト)。

merchant_id
integer

マーチャントID。

project_id
integer

プロジェクトID。このパラメータは、ドメインページのプロジェクト名の横にあります。

object

ユーザーの詳細(オブジェクト)。

id
required
string

ユーザーID。

country
string

ユーザーの国。2文字の国コード(大文字)は、ISO 3166-1 alpha-2に従って使用されます。

email
string

ユーザーのEメール。

ip
string

ユーザーIP。

name
string

ユーザー名。

Responses
204

処理の成功を示すために戻ります。

400

提供された情報にエラーがある場合に返されます(例: 必須パラメータの欠落、認証の失敗など)。この場合、ユーザーのお金は引き落とされますが、購入は失敗します。返金を行うには、エクソーラカスタマーサポートsupport@xsolla.comにお問い合わせください。

500

リターンはサーバーに一時的なエラーが発生したことを示します。

Request samples
curl -v 'https://your.hostname/your/uri' \
-X POST \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-H 'Authorization: Signature 80543ba63e1e50cf05f15150fe75e7245da9a898' \
-d '{
  "notification_type": "ps_declined",
  "settings": {
    "project_id": "18404",
    "merchant_id": "2340"
  },
  "user": {
    "ip": "127.0.0.1",
    "email": "email@example.com",
    "id": "1234567",
    "country": "US"
  },
  "transaction": {
    "id": "1",
    "dry_run": "1",
    "payment_method": "1"
  },
  "refund_details": {
    "author": "support@xsolla.com",
    "code": "8",
    "reason": "Cancellation by the PS request",
    "reason_detail": "Insufficient funds"
  }
}'
Response samples
application/json
{
  • "error": {
    }
}