Kin SDK for Partners

Kin SDK for Partners

  • Docs
  • Help

›SDK API

Guidelines

  • Rollout Plan
  • Sybil Prevention
  • Brand

SDK API

  • Intro
  • Create Account
  • Get Balance
  • Native Earn
  • Native Spend
  • Pay To User
  • Launch Experience
  • Add Native Offer to Wall
  • Order Confirmation
  • Miscellaneous
  • Errors

Server

  • Marketplace
  • JWT Service
  • Payment Service
  • Local Environment

Requesting an Order Confirmation

In the normal flow of a transaction, you will receive an order confirmation from the Kin Server through the purchase API's callback function. This indicates that the transaction was completed. But if you missed this notification for any reason, for example, because the user closed the app before it arrived, or the app closed due to some error, you can request confirmation for an order according to its ID.

To request an order confirmation:

Call the order confirmation function, while passing the order’s ID and implementing the appropriate callback functions. (See ServiceException for possible errors.)

Android
iOS
try {
    Kin.getOrderConfirmation("your_offer_id", new KinCallback<OrderConfirmation>() {
        @Override
        public void onResponse(OrderConfirmation orderConfirmation) {
            if (orderConfirmation.getStatus() == Status.COMPLETED) {
                String jwtConfirmation = orderConfirmation.getJwtConfirmation()
            }
        }

        @Override
        public void onFailure(KinEcosystemException exception) {
            ...
        }
    });
}
catch (ClientException exception) {
    // ...
}
Kin.shared.orderConfirmation(for: "NSOffer_01") { status, error in
    if let s = status, case let .completed(jwt) = s {
        print("order complete. jwt confirmation is: \(jwt)")
    } else {
        // handle errors
    }
}
← Add Native Offer to WallMiscellaneous →
  • Requesting an Order Confirmation
Kin SDK for Partners
Docs
AndroidiOSServer
GitHub
iOS SDKAndroid SDKMarketplace ServerPayment ServiceJWT Service
Community
Stack OverflowReddit r/KinFoundation/Kin BlogInside Kin BlogTwitterYouTubeKin Ecosystem
Copyright © 2019 Kin Ecosystem