Welcome to Monetizr Documentation!

Here you will find a comprehensive technical guide
to help you get started with Monetizr SDKs, Plugins,
API reference guide and Console.

Get Started    API Reference

Setting up Checkout

Collect shipping details.

📘

Steps described on this page assume that you have followed previous steps and created an Offer View.

After presenting an offer to the player the next step is to build a checkout experience. It's a process that starts with gathering shipping details and ends with payment in case of Purchase Orders or free claim in case of Claim Orders.

You also have an option to skip creating a checkout and forward the players to pre-built webview checkout.

Step 6a: Create checkout

To create a checkout experience for the player you need to request Checkout. In response, you will receive details of taxes, available shipping options, and related products that were selected in Offer View. Present this information to the player and collect shipping address details. Your input fields for the player may look something like this:

Checkout fields

Then create a "Submit" or "Next" button. This button will lead the player to the next step of adding billing details. But in the background the button should initiate Update checkout .

{
  "data": {
    "checkoutCreate": {
      "checkoutUserErrors": [
        {
          "code": "BLANK",
          "field": [
            "city"
          ],
          "message": "City cannot be blank"
        }
      ],
      "checkout": {
        "id": "Z2lkOi8vc2hvcGlmeS9DaGVja291dC81ODk1YWQzNzQwMTg5OWMyZDUzZjNlOWQxNzE4Y2UzZD9rZXk9NTc1ZTA4YTc2M2NiZTNiMTEzMmU2ZTlhNjA5ZGVjZjU=",
        "webUrl": "https://instagramprinted.myshopify.com/11335330/checkouts/5895ad37401899c2d53f3e9d1718ce3d?key=575e08a763cbe3b1132e6e9a609decf5",
        "subtotalPriceV2": {
          "amount": 0.01,
          "currencyCode": "USD"
        },
        "taxExempt": false,
        "taxesIncluded": false,
        "totalPriceV2": {
          "amount": 0.01,
          "currencyCode": "USD"
        },
        "totalTaxV2": {
          "amount": 0.01,
          "currencyCode": "USD"
        },
        "requiresShipping": false,
        "availableShippingRates": {
          "ready": true,
          "shippingRates": [
            {
              "handle": "shopify-Worldwide%20express%20shipping-0.01",
              "title": "Worldwide express shipping",
              "priceV2": [
                {
                  "amount": 0.01,
                  "currencyCode": "USD"
                }
              ]
            }
          ]
        },
        "shippingLine": {
          "handle": "shopify-Worldwide%20express%20shipping-0.01",
          "title": "Worldwide express shipping",
          "priceV2": [
            {
              "amount": 0.01,
              "currencyCode": "USD"
            }
          ]
        },
        "lineItems": {
          "edges": {
            "node": {
              "title": "Monetizr sample T-shirt",
              "quantity": 1
            }
          }
        }
      }
    }
  }
}

Step 7: Update checkout

When the player has added all the details and clicks on the "Submit" button you must request Update checkout. That will result in an updated final shipping price and all user input errors with checkoutUserErrors array if there are any. Display these errors to the player to inform her/him about the necessary input updates.

Note that all checkoutUserErrors must be resolved before the checkout process can be completed. You can send multiple checkoutupdate requests until there are no errors left to successfully create a valid order.

Valid order information holds a contact e-mail, first name, last name, address, city, country, and postal code as well as total price, total taxes and total shipping costs. These values are required for making an in-app payment.

{
    "data": {
        "updateShippingAddress": {
            "checkoutUserErrors": []
        },
        "updateShippingLine": {
            "checkoutUserErrors": [],
            "checkout": {
                "id": "Z2lkOi8vc2hvcGlmeS9DaGVja291dC8wODhlMjU3OTRhM2RjMDkyZWZkMmVkZGYzNzM4NmY2Mz9rZXk9YjczMzVmOTdkMjczNzlhNzEwMjAzOTg5OWI0YTIxMzM=",
                "webUrl": "https://shop.themonetizr.com/23565173/checkouts/088e25794a3dc092efd2eddf37386f63?key=b7335f97d27379a7102039899b4a2133",
                "subtotalPriceV2": {
                    "amount": "22.99",
                    "currencyCode": "USD"
                },
                "taxExempt": false,
                "taxesIncluded": false,
                "totalPriceV2": {
                    "amount": "24.66",
                    "currencyCode": "USD"
                },
                "totalTaxV2": {
                    "amount": "1.67",
                    "currencyCode": "USD"
                },
                "requiresShipping": true,
                "availableShippingRates": {
                    "ready": true,
                    "shippingRates": [
                        {
                            "handle": "shopify-Standard%20shipping-0.00",
                            "title": "Standard shipping",
                            "priceV2": {
                                "amount": "0.0",
                                "currencyCode": "USD"
                            }
                        },
                        {
                            "handle": "shopify-Express%20shipping-14.99",
                            "title": "Express shipping",
                            "priceV2": {
                                "amount": "14.99",
                                "currencyCode": "USD"
                            }
                        }
                    ]
                },
                "shippingLine": {
                    "handle": "shopify-Standard%20shipping-0.00",
                    "title": "Standard shipping",
                    "priceV2": {
                        "amount": "0.0",
                        "currencyCode": "USD"
                    }
                },
                "lineItems": {
                    "edges": [
                        {
                            "node": {
                                "title": "The T-shirt",
                                "quantity": 1
                            }
                        }
                    ]
                }
            }
        }
    }
}

When the player submits all necessary details correctly move to the next screen and create an order.

Updated 7 months ago



Setting up Checkout


Collect shipping details.

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.