WebAPI/WebPayment: Difference between revisions

Jump to navigation Jump to search
Line 81: Line 81:
     "aud" : "tu.com",
     "aud" : "tu.com",
     "typ" : "tu.com/payments/inapp/v1",
     "typ" : "tu.com/payments/inapp/v1",
     "exp" : int(time.time() + 3600),
     "exp" : 1337357297,
     "iat" : int(time.time()),
     "iat" : 1337360897,
     "request" : {
     "request" : {
       "name" : "Piece of Cake",
       "name" : "Piece of Cake",
       "description" : "Virtual chocolate cake to fill your virtual tummy",
       "description" : "Virtual chocolate cake to fill your virtual tummy",
       "price" : "10.50",
       "price" : [
       "currencyCode" : "USD",
      {
        "country": "US",
        "currency": "USD",
        "amount": 5.50
      },
      {
        "country": "BR",
        "currency": "BRL",
        "amount": "8.50"
      }],
       "defaultPrice": "US",
       "productData" : "my_product_id=1234&my_session_id=XYZ",
       "productData" : "my_product_id=1234&my_session_id=XYZ",
       "postbackURL" : "http://developersserver.com/postback",
       "postbackURL" : "http://developersserver.com/postback",
Line 101: Line 111:
**'''exp''': Expiration. A UTC Unix timestamp of when the JWT should expire.
**'''exp''': Expiration. A UTC Unix timestamp of when the JWT should expire.
**'''request''': Request object.
**'''request''': Request object.
*** '''price''': This is the price of the purchased product.
*** '''price''': List of prices per country.
*** '''currency''': This is the currency code for the price.
**** '''country''': Country code expressed following the recommendations from [ISO 3166 http://www.iso.org/iso/country_codes/iso_3166_code_lists/country_names_and_code_elements.htm].
**** '''currency''': Currency code expressed following the recommendations from [ISO 4217 http://www.xe.com/iso4217.php/].
**** '''amount''': Value withouth taxes of the digital good being sold.
*** '''defaultPrice''': (optional if only one value in the former collection) default price to be considered as payment price when there is not matching between the customer currency and the currency prices located in the price collection. This value is expressed following [ISO 3166 http://www.iso.org/iso/country_codes/iso_3166_code_lists/country_names_and_code_elements.htm] and must match with one of the countries in the price list.  
*** '''name''': A short description of the product.
*** '''name''': A short description of the product.
*** '''description''': A long description of the product.
*** '''description''': A long description of the product.
Line 132: Line 145:
     aud : sellerIdentifier,
     aud : sellerIdentifier,
     typ : "tu.com/payments/inapp/v1",
     typ : "tu.com/payments/inapp/v1",
     exp : int(time.time() + 3600),
     exp : 1337370900,
     iat : int(time.time()),
     iat : 1337360900,
     request : {
     request : {
       name : "Piece of Cake",
       name : "Piece of Cake",
       description : "Virtual chocolate cake to fill your virtual tummy",
       description : "Virtual chocolate cake to fill your virtual tummy",
       price : "10.50",
       "price" : [
       currencyCode : "USD",
      {
       productData : "my_product_id=123"
        "country": "BR",
       postbackURL : "http://developerserver.com/postback",
        "currency": "BRL",
       chargebackURL : "http://developerserver.com/chargeback"
        "amount": "8.50"
      }],
       "defaultPrice": "US",
       "productData" : "my_product_id=1234&my_session_id=XYZ",
       "postbackURL" : "http://developersserver.com/postback",
       "chargebackURL" : "http://developerserver.com/chargeback"
     },
     },
     response: {
     response: {
Confirmed users
483

edits

Navigation menu