Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Building Payment Service in Android App by LINE Pay API

Building Payment Service in Android App by LINE Pay API

LINE Developers Thailand

September 13, 2020
Tweet

More Decks by LINE Developers Thailand

Other Decks in Technology

Transcript

  1. 14:25 - 15:55
    Somkiat Khitwongwattana
    Building Payment
    Service in Android App
    by LINE Pay API
    Android Engineer, LINE MAN Wongnai

    View Slide

  2. View Slide

  3. Building Payment
    Service in
    Android app by
    LINE Pay API

    View Slide

  4. Thailand
    Global, Japan and Taiwan

    View Slide

  5. View Slide

  6. View Slide

  7. Reduce your costs
    Reasonable fees
    Increase your sales
    Convenient to use
    LINE Pay API
    Why?

    View Slide

  8. 4.5 Million Rabbit LINE Pay Users
    Thailand in 2018
    ~ 10.2% of LINE Users
    source : vgi.co.th

    View Slide

  9. LINE MAN JD CENTRAL Watsons Konvy
    myAIS
    McDonald's
    Thailand
    OfficeMate
    and more!

    View Slide

  10. Registration

    View Slide

  11. https://pay.line.me
    For Merchant

    View Slide

  12. https://pay.line.me/th/developers/main/main
    For Developer

    View Slide

  13. View Slide

  14. View Slide

  15. View Slide

  16. View Slide

  17. View Slide

  18. View Slide

  19. View Slide

  20. Integration

    View Slide

  21. LINE Pay API Version 3
    Version 2
    Version 1
    https://pay.line.me/documents/online_v3_en.html

    View Slide

  22. https://bit.ly/integrate-line-pay-api-v3-th
    LINE Chat Bot + LINE Pay API

    View Slide

  23. LINE Pay
    API
    Your
    Server
    Your
    App
    LINE
    App
    Android Server

    View Slide

  24. Navigate App to Rabbit LINE Pay
    Your App
    LINE App

    View Slide

  25. Navigate App to Rabbit LINE Pay
    Your App
    LINE App

    View Slide

  26. Navigate App to Rabbit LINE Pay
    Your App
    LINE App

    View Slide

  27. Navigate App to Rabbit LINE Pay
    Your App
    LINE App

    View Slide

  28. Transaction Successful
    Your App
    LINE App

    View Slide

  29. Transaction Successful
    Your App
    LINE App

    View Slide

  30. Transaction Successful
    Your App
    LINE App

    View Slide

  31. Transaction Successful
    Your App
    LINE App

    View Slide

  32. Transaction Cancelled
    Your App
    LINE App

    View Slide

  33. Transaction Cancelled
    Your App
    LINE App

    View Slide

  34. Transaction Cancelled
    Your App
    LINE App

    View Slide

  35. Transaction Failed
    Your App
    LINE App

    View Slide

  36. Transaction Failed
    Your App
    LINE App

    View Slide

  37. Transaction Failed
    Your App
    LINE App

    View Slide

  38. Your App LINE App Your Server LINE Pay API
    Start

    View Slide

  39. Your App LINE App Your Server LINE Pay API
    Create Order
    Start

    View Slide

  40. Your App LINE App Your Server LINE Pay API
    Create Order
    Request API
    Start

    View Slide

  41. Request API's request body

    View Slide

  42. Request API's request body

    View Slide

  43. Request API's request body

    View Slide

  44. Your App LINE App Your Server LINE Pay API
    Create Order
    Request API
    Start

    View Slide

  45. Your App LINE App Your Server LINE Pay API
    Create Order
    Request API
    Response
    • Transaction ID
    • Payment Token
    • Payment URL
    Start

    View Slide

  46. Request API's response

    View Slide

  47. Request API's response

    View Slide

  48. Your App LINE App Your Server LINE Pay API
    Create Order
    Request API
    Response
    • Transaction ID
    • Payment Token
    • Payment URL
    Start

    View Slide

  49. Your App LINE App Your Server LINE Pay API
    Create Order
    Request API
    Response
    • Transaction ID
    • Payment Token
    • Payment URL
    Response
    • Payment URL
    Start

    View Slide

  50. Check LINE app and LINE Pay supported in Android

    View Slide

  51. Open Google Play or other app store to install LINE app

    View Slide

  52. Open LINE Pay API's payment URL

    View Slide

  53. Your App LINE App Your Server LINE Pay API
    Create Order
    Request API
    Response
    • Transaction ID
    • Payment Token
    • Payment URL
    Response
    • Payment URL
    Open LINE App
    (With Payment URL)
    Start

    View Slide

  54. Your App LINE App Your Server LINE Pay API
    Create Order
    Request API
    Response
    • Transaction ID
    • Payment Token
    • Payment URL
    Response
    • Payment URL
    Open LINE App
    (With Payment URL)
    Complete
    (By Deep Link)
    Start

    View Slide

  55. Deep Link From Rabbit LINE Pay
    ltdc://payment/confirm-order?transactionId=...&orderId=...
    Confirm URL
    ltdc://payment/cancel-order?transactionId=...&orderId=...
    Cancel URL

    View Slide

  56. Deep Link From Rabbit LINE Pay
    ltdc://payment/confirm-order?transactionId=...&orderId=...
    Confirm URL
    ltdc://payment/cancel-order?transactionId=...&orderId=...
    Cancel URL

    View Slide

  57. Activity with deep link for complete payment

    View Slide

  58. Activity with deep link for complete payment

    View Slide

  59. Activity with deep link for complete payment

    View Slide

  60. Activity with deep link for complete payment

    View Slide

  61. Activity with deep link for cancel payment

    View Slide

  62. Activity with deep link for cancel payment

    View Slide

  63. Activity with deep link for cancel payment

    View Slide

  64. Get query parameters from deep link's URL

    View Slide

  65. Your App LINE App Your Server LINE Pay API
    Create Order
    Request API
    Response
    • Transaction ID
    • Payment Token
    • Payment URL
    Response
    • Payment URL
    Open LINE App
    (With Payment URL)
    Complete
    (By Deep Link)
    Start

    View Slide

  66. Your App LINE App Your Server LINE Pay API
    Create Order
    Request API
    Response
    • Transaction ID
    • Payment Token
    • Payment URL
    Response
    • Payment URL
    Open LINE App
    (With Payment URL)
    Complete
    (By Deep Link)
    Order Payment Complete
    • Order ID
    Start
    • Transaction ID

    View Slide

  67. Your App LINE App Your Server LINE Pay API
    Create Order
    Request API
    Response
    • Transaction ID
    • Payment Token
    • Payment URL
    Response
    • Payment URL
    Open LINE App
    (With Payment URL)
    Complete
    (By Deep Link)
    Order Payment Complete
    • Order ID
    Confirm API
    Start
    • Transaction ID

    View Slide

  68. Confirm API's request body

    View Slide

  69. Your App LINE App Your Server LINE Pay API
    Create Order
    Request API
    Response
    • Transaction ID
    • Payment Token
    • Payment URL
    Response
    • Payment URL
    Open LINE App
    (With Payment URL)
    Complete
    (By Deep Link)
    Order Payment Complete
    • Order ID
    Confirm API
    Start
    • Transaction ID

    View Slide

  70. Your App LINE App Your Server LINE Pay API
    Create Order
    Request API
    Response
    • Transaction ID
    • Payment Token
    • Payment URL
    Response
    • Payment URL
    Open LINE App
    (With Payment URL)
    Complete
    (By Deep Link)
    Order Payment Complete
    • Order ID
    Confirm API
    • Payment Info
    Response
    Start
    • Transaction ID

    View Slide

  71. Confirm API 's response

    View Slide

  72. Confirm API 's response

    View Slide

  73. Confirm API 's response

    View Slide

  74. Confirm API 's response

    View Slide

  75. Your App LINE App Your Server LINE Pay API
    Create Order
    Request API
    Response
    • Transaction ID
    • Payment Token
    • Payment URL
    Response
    • Payment URL
    Open LINE App
    (With Payment URL)
    Complete
    (By Deep Link)
    Order Payment Complete
    • Order ID
    Confirm API
    • Payment Info
    Response
    Start
    • Transaction ID

    View Slide

  76. Your App LINE App Your Server LINE Pay API
    Create Order
    Request API
    Response
    • Transaction ID
    • Payment Token
    • Payment URL
    Response
    • Payment URL
    Open LINE App
    (With Payment URL)
    Complete
    (By Deep Link)
    Order Payment Complete
    • Order ID
    Confirm API
    • Payment Info
    Response
    Start
    End
    Response
    • Transaction ID

    View Slide

  77. Your App LINE App Your Server LINE Pay API
    Create Order
    Request API
    Response
    • Transaction ID
    Response
    • Payment URL
    Open LINE App
    (With Payment URL)
    Complete
    • Transaction ID
    Order Payment Complete
    • Order ID
    Confirm API
    • Payment Info
    Response
    Start
    End
    Response
    • Transaction ID

    View Slide

  78. Your App LINE App Your Server LINE Pay API
    Create Order
    Request API
    Response
    • Transaction ID
    Response
    • Payment URL
    Open LINE App
    (With Payment URL)
    Complete
    • Transaction ID
    Order Payment Complete
    • Order ID
    Confirm API
    • Payment Info
    Response
    Start
    End
    Response
    • Transaction ID

    View Slide

  79. Production
    API Endpoint
    https://api-pay.line.me
    Sandbox
    https://sandbox-api-pay.line.me

    View Slide

  80. Production
    API Endpoint
    https://api-pay.line.me
    Sandbox
    https://sandbox-api-pay.line.me

    View Slide

  81. Sandbox
    https://sandbox-web-pay.line.me/web/payment/...
    Web
    linesandbox://pay/payment/...
    App
    Production
    https://web-pay.line.me/web/payment/...
    Web
    line://pay/payment/...
    App

    View Slide

  82. Sandbox
    https://sandbox-web-pay.line.me/web/payment/...
    Web
    linesandbox://pay/payment/...
    App
    Production
    https://web-pay.line.me/web/payment/...
    Web
    line://pay/payment/...
    App

    View Slide

  83. View Slide