Payments

Learn how to get payment transactions to your server via webhooks

This webhook service keeps you informed about any successful payment transaction including one-time and subscription based payments.

Setup the Endpoint URL

Webhook events are sent to your server via HTTP POST. You configure the endpoint URL through Developer Tools / Webhooks menu under your project.

Events Format

Webhook events are serialized in JSON. The body of a POST request to your server will contain the serialized event.

{
  "queue" : {
    "type" : "TransactionInsert",
    "createDate" : "2020-03-20 12:35:41",
    "appId" : "1"
  },
  "parameters" : {
    "credit_card" : "41111111******1111",
    "status" : "start_paid",
    "refund_price" : null,
    "country" : "TR",
    "transaction_id" : "f5e58d26-ce4e-4e8c-bbc4-0b250d0ed396",
    "provider_transaction_id" : "20225RBnF07028494",
    "currency" : "TRY",
    "provider_name" : "İş Bankası (Payten)",
    "create_date" : "2020-08-12 14:01:40",
    "subscriber_id" : "1",
    "custom_parameters" : {
      "country" : "RU",
      "adjust" : {
        "idfa" : "A16122492-7DC3-4B15-B14C-33453995AFCC"
      },
      "source" : "Landing"
    },
    "original_purchase_date" : "2020-08-12 14:01:40",
    "app_id" : 5,
    "package_id" : "package",
    "expire_date" : "2020-09-11 14:01:40",
    "provider_status" : "Approved",
    "id" : "1740",
    "purchase_date" : "2020-08-12 14:01:40",
    "payment_type" : "subscription",
    "quantity" : 1,
    "refund_date" : null,
    "original_transaction_id" : "f5e58d26-ce4e-4e8c-bbc4-0b250d0ed396",
    "provider_id" : 8,
    "package_price" : 1,
    "is_refund" : "0",
    "price" : 1,
    "comment" : null,
    "refund_reason" : null,
    "team_id" : 5
  }
}

Fields

queue

Webhook type and history.

parameters

Details about the webhook.

status

Contains the transaction types, possible values :

trial : A trial started

trial_to_paid : Trial converted to paid subscription

start_paid : A paid subscription started (no trial package)

renewal : Subscription renewed

reactive : User reactivated a passive subscription with a payment

consumable :Purchased a one-time package

transaction_id

Unique transaction ID.

package_id

ID of the package purchased.

credit_card

Credit card used in the transaction.

provider_name

Payment provider information where the transaction took place.

provider_transaction_id

Transaction ID of relevant payment provider.

currency

Currency used in the transaction.

create_date

Transaction start date.

subscriber_id

Subscriber ID associated with the transaction.

custom_parameters

If the subscriber has custom parameters, they are sent in this field.

original_purchase_date

Subscriptions original start date.

expire_date

Expiration date if it is a subscription purchase.

purchase_date

Transaction completion date.

payment_type

Contains the type of payment, possible values :

subscription : Transaction is for a subscription

consumable: Transaction is for a in-app product or one-time payment.

quantity

The number of items purchased.

price

Transaction amount.

package_price

Standard package price.

Last updated