Your own PayPal

Revenue

Sell through your own PayPal account and send every capture, refund and dispute to Revenue with a verified webhook.

The clip shows, in order:

  1. Every store gets its own webhook address.
  2. Set custom_id to the buyer's UUID.
  3. Revenue adds every store together.
  4. Refunds and disputes come off.

#How it works

This is for a server that takes money through its own PayPal account, not a webstore. It has nothing to do with how you pay us.

PayPal sends a webhook when a payment is captured, refunded, reversed, or disputed. For every delivery we ask PayPal itself, through its verify webhook signature call, whether the delivery is real. Anything PayPal does not confirm is refused.

We keep the capture id, the amount, the currency and the player UUID. No card data, no email and no address ever reach us.

#Setting it up

  • In Settings, Integrations, press Add store, pick PayPal and name it. Copy the webhook address it shows.
  • In the PayPal developer dashboard open the REST app of the account that takes the money, or create one.
  • Add a webhook with that address and the events Payment capture completed, Payment capture refunded, Payment capture reversed, and Customer dispute created.
  • Paste the app client ID, the app secret and the webhook ID into the store row. Pick Sandbox to test first, then Live.
  • Make a sandbox payment. It shows on the store row as the first event.
What the app keys are for
We use them only to ask PayPal whether a delivery is real. The secret is sealed before it is stored. Remove the store and it is wiped.

#Sending the player UUID

When your checkout creates the PayPal order, set custom_id on the purchase unit to the buyer's premium UUID. PayPal carries it onto the capture and we match on it.

With no UUID in custom_id the sale still counts, in Unmatched.

jsoncreate-order.json
{
  "intent": "CAPTURE",
  "purchase_units": [
    {
      "custom_id": "069a79f4-44e9-4726-a5be-fca90e38aaf5",
      "amount": { "currency_code": "USD", "value": "9.99" }
    }
  ]
}

#Limits

  • A full refund takes the sale off. A partial refund leaves the sale counted in full.
  • A reversal or a dispute marks the sale as a chargeback.
  • If PayPal cannot be reached to verify, we answer 503 and PayPal sends the delivery again later.
  • Past sales are not imported. Revenue starts with the first delivery after you connect.