Payment Status Events

After a payment or subscription has been "Linked", meaning either "Get Payment Link" or Get Subscription Link" have been called, it is possible to listen to changes to the Payment or Subscription.

Topic (Production): payment-gateway-transaction-status

Topic (Staging): payment-gateway-transaction-status-staging

Payment Event

{
   "type":"Payment",
   "transactionId":"0beba304-7ecf-4a86-b198-cbede4e83cb1",
   "orderId":"0011",
   "transactionCreatedAt":"2023-11-06T07:06:58.758947",
   "timestamp":"2023-11-06T07:07:33.9458912Z",
   "statusCode":15,
   "playerId":"61af11a2c1ddcf4fd944a401",
   "currency":"DKK",
   "amount":10.50,
   "paymentProviderPaymentMethodId":"a3894914-f95b-4ccd-90cc-aa1ae4c1d0ab"
}
Unknown = 0,
Initialized = 5,
Linked = 10,
SubscriptionPending = 11,
Pending = 12,
Settled = 15,
Declined = 20,
Cancelled = 25,
InvalidCardNumber = 30,
InvalidCardDate = 31,
InvalidCardCVC = 32,
InsufficientFunds = 33,
ExceedsWithdrawalAmountLimit = 34,
ExceedsWithdrawalFrequencyLimit = 35,
CardExpired = 36,
PSD2Error = 37,
FraudDetectionError = 38,
PaymentTypeNotSupported = 50,
Reversed = 60,
SystemFailure = 70,
UnrecoverableErrors = 100

Any error code with a value greater than 15 is an error and should be regarded as a rejection.

A successful flow will typically include the following events:

  1. The "Linked" (10) status code
  2. The "Pending" (12) status code
  3. The "Settled" (15) status code

Subscription Event

📘

A subscription is currently always accompanied by a Payment. So if you create a recurring payment/subscription for $5.99, the payment will also be made immediately (given the Payment Provider accepts the subscription).

{
   "type":"Subscription",
   "transactionId":"0beba304-7ecf-4a86-b198-cbede4e83cb1",
   "orderId":"9999",
   "transactionCreatedAt":"2023-11-06T07:06:58.758947",
   "timestamp":"2023-11-06T07:07:33.9458912Z",
   "statusCode":15,
   "playerId":"61af11a2c1ddcf4fd944a401"
}
Unknown = 0,
Initialized = 5,
Linked = 10,
Pending = 12,
Approved = 15,
Rejected = 20

A successful flow will typically include the following events:

  1. The "Linked" (10) status code
  2. The "Pending" (12) status code
  3. The "Approved" (15) status code

It will also trigger the "Payment" for the initial subscription purchase, so the Payment Events will also be sent.