Pango Platform
HomeConsole
  • What is Pango Developer Platform
  • Getting started
    • Sign up on the Management Console
    • Create a new project
    • Switch projects
    • Change console settings
    • Edit your profile
    • Try out the demo app
    • Keep exploring
    • Deprecation and Sunset
  • Console details
    • Dashboard
      • General
      • Location loading
    • Users
      • User page
    • Active sessions
    • Network
      • Countries
      • Locations
      • Pools
        • Optimal location
        • Location rules
    • Settings
      • General
        • Project config description (JSON format)
          • Server selector (JSON format)
          • Request selector (JSON format)
      • Authentication methods
        • Auth Plugin requirements
      • VPN
        • General
        • VPN Bypass list
        • Client Networks
      • Member
    • Export Data
    • Log
  • SDK
    • Unified VPN SDK for Android
      • Setup
        • Application Setup
        • Proguard Rules, Notification, and Analytics Configurations
        • Backend URL Configuration
      • Usage
        • Initialization
        • VPN Interface
        • Backend interface
      • Features
        • Hydra Protocol
          • Location profile (Hydra only)
        • Custom sdk dependencies
        • Deferred VPN Service Initialization
        • Authentication
        • Client Network List (CNL)
        • OpenVPN transport
        • Wireguard Transport
        • Reconnection strategy
        • Single Protocol SDK
        • Killswitch
        • Domain route via VPN
        • Process route via VPN
        • Process Bypass
        • Domain Bypass
        • Traffic rules
        • VPN Node DNS Configuration
        • Multihop
          • Optimal Location
      • Exceptions
      • Version migration
      • Changelog
    • Unified VPN SDK for Apple
      • Setup
        • Application Setup
        • Network Extension Setup
          • Network Extension Setup for tvOS
        • Backend URL Configuration
      • Usage
        • Single Protocol SDK
        • Unified SDK
        • Logging
        • Decoding Encoded VPN SDK Logs
      • Features
        • Deferred VPN Service Initialization
        • Authentication
        • Wireguard Transport
        • Reconnection strategy
        • Killswitch
        • Domain Bypass
        • Multihop
          • Optimal Location
        • Client Network List (CNL)
        • Domain route via VPN
      • Changelog
      • API Reference
    • IPSEC VPN SDK for Apple
    • Unified VPN SDK for Windows
      • Setup
        • Backend URL Configuration
        • Service command line arguments
        • ARM Platform Support
      • Usage
        • CoreAPI
        • Events
        • Generating a Unique Device Identifier
        • Error processing
        • Pipe Messaging
      • Features
        • Traffic protection
          • Killswitch
          • Prevent IP Leaks
          • Block Local Networks
        • Other
          • Firewall
            • DNS Monitor
            • Process Bypass
            • Domain Bypass
            • Process route via VPN
            • Domain route via VPN
          • Throttling
          • Optimal Location
          • Common issues
        • Hydra Protocol
          • CustomDNS, UserDNS, MultiHop, VpnProfiles
        • OpenVPN Protocol
        • Wireguard Protocol
        • IPSec Protocol
      • Collecting Debug Logs
      • Changelog
    • Unified VPN SDK for Routers
      • SDK. Shared library.
      • Configuration Interface (CI)
        • Unix Domain Sockets CI
        • REST API CI
    • Unified VPN SDK Feature Comparison By Platform
    • Unified VPN SDK
      • Features
        • Personal Bridge
    • Tunnel Vision and Tunnel Crack Prevention
  • REST API
    • Partner API
  • Sample applications
    • Unified VPN SDK demo for Windows
    • Hydra VPN SDK demo for iOS
    • IPSEC VPN SDK demo for iOS
    • Unified VPN SDK demo for Android
    • Hydra VPN SDK demo for OpenWRT
    • OpenVPN configuration file
  • Resources
    • Use cases
      • Public VPN
      • Business VPN
        • Creating a Business VPN Project
        • Wi-Fi Security for Business
      • Application anti-blocking
    • How-to
      • Create a Firebase project for User Authentication
      • AWS CloudFront Distribution of the Platform URL
      • How can I get Shared Secret key from iTunes Connect for In-App Purchase
  • FAQ
    • General
      • VPN Platform Flow
      • What data is collected by the Platform?
      • What analytic data is collected by your SDK?
      • How the Platform restricts access to our data?
      • Why DNS Leak tests often indicate positive result?
      • Do we need to perform endpoint health checks?
      • How is the VPN exit node found?
      • How are streams re-marked if VPN is enabled/disabled on an active flow?
      • Is there a maximum number of supported devices?
      • Are both IPv4 and IPv6 supported?
      • What is the MTU of the tunnel?
      • Are any redundancy measures in terms of reliability provided?
      • Is there any load balancing?
      • Do you block broadcast and multicast to/from the VPN?
    • List of Open Source libs
Powered by GitBook
On this page
  • Payment Flow
  • Purchase receipt example
  • Server side: Delete purchase
  • Purchase receipt verification

Was this helpful?

  1. Console details
  2. Settings
  3. Payment methods

Payments Plugin requirements

Learn the description and requirements of the user payment plugin

Last updated 4 years ago

Was this helpful?

You need a payment plugin if your application uses another payment service, not supported by the Platform.

Payment Flow

Step 1. Your App buys a subscription in your Payment service and gets a purchase receipt.

Step 2. Send the purchase receipt to the Platform side:

  1. the App calls POST (SDK includes the same method) with parameters token = your purchase receipt and type = name your plagin.

  2. your Backend calls with parameters body = your purchase receipt and user_id = the user ID.

Step 3. The Platform verifies the purchase receipt in your Payment service.

  • If the result is Failed, the Platform:

    • returns the error code.

  • If the result is Success, the Platform:

    • changes a user's status to Paid,

    • changes the user's traffic limit to Unlimited,

    • sends a purchase_id to the App.

Step 4. The Platform will check the Purchase receipt every 24 hours.

  • If the result is Success, the Platform:

    • does nothing.

  • If the result is Failed, the Platform:

    • changes the user's status to Free ,

    • changes the user's bandwidth limit to Free limit = 100Mb.

Purchase receipt example

Purchase receipt should be in JSON format and include the following details:

Field name

Type

Description

purchase_info

object

Purchase vendor-specific data about the purchase, such as receipt

receipt

object

Raw JSON receipt of the purchase. “orderId” will be used as a unique key for each subscription

active_timestamp

Number, Long

Active time for current subscription period

body format

"receipt": {
  "orderId": "1299976ABC3169054705758ABC",
  "transactionId": "1299976ABC3169054705758ABC",
  "purchaseTime": 1345678900000,
  "expireTime": 167890000000,
  "purchaseState": 0,
  “trialLength”: 7,
  “usdAmount”: 7.99,
  “originalPurchaseTime”: 123445000,
  “planName”: “abc_yearly_trial_2999”,
  "type": "mcafee"
}

Detailed purchase info in the “receipt"

Field name

Type

Description

orderId

string

Unique identifier of the subscription which should not change upon renewal. This ID is used to verify purchase.

transactionId

string

Unique identifier for each transaction (purchase), the payment system sends different IDs for different transactions.

purchaseTime

long

Unix timestamp of the most recent subscription purchase

expireTime

long

Unix timestamp of when the subscription is to expire

purchaseState

int

0: Successful paid transaction, 1: Refunded transaction, 2: Free transaction (trial)

If it’s null, assume it is a successful paid transaction.

trialLength

int

Number of days of free trial. 0: No trial

usdAmount

float

Price of the subscription in USD. It is not mandatory, but it is desirable to have this in your project. If the user is on trial period, the value should be 0.

originalPurchaseTime

long

UNIX timestamp of when the first transaction was performed (the first purchase or trial start)

planName

string

Plan or SKU name of the subscription for reference

type

string

Payment Plugin name

Server side: Delete purchase

Field name

Type

Mandatory

Description

user_id

integer

Yes

Unique user ID on the Platform

access_token

string

Yes

Unique token for partner API. Expires every 24 hours.

purchase_id

integer

Yes

Platform purchase ID of the user. Sent back as a response when a purchase is added to a user.

purchase_info

object

No

Add the latest purchase_info to a purchase that is going to be deleted. It is important to change the purchaseState appropriately, especially for refund.

Purchase receipt verification

Platform will call this POST method to verify a purchase (see Steps 3-4 in the Flow diagram) when it is first performed, and every day after that.

Parameters

Field name

Type

Description

Mandatory

partner_user_id

string

Unique user id generated by the partner system

Yes

purchase_info

string

“orderId” must be present and is used as unique identifier for the verification

Yes

Response

Field name

Type

Description

Mandatory

is_valid

Boolean

A marker whether the purchase is valid or not. Possible values: true/false

Yes

user_info

Object

Details of current user parameters

No

To delete a purchase, you need to call the API method DELETE with the following parameters:

/user/purchase
POST
/partner/subscribers/{user_id}/purchase
/partner/subscribers/{user_id}/purchase