Look Up Checkout Payment

Use our API to get information about a Checkout payment.

Follow this guide to query the status of transactions associated with a specified Hosted Checkout link. The response provides information about each transaction. See Look Up Checkout Payment in API Reference for field definitions.


Prerequisites

  1. See Create a Sandbox Account to sign up and log in to the Maast Manager portal.

  2. Follow the steps in Get Your API Credentials to save a sandbox ID and API key.

  3. See Authentication to format the credentials and generate your API token. (Alternatively, use the credentials as-is to test this endpoint with our 'Try It!' feature.)

  4. See Create a Dynamic Checkout Profile to create a checkout profile and save its unique checkout profile ID (checkout_profile_id).

  5. Follow the steps in the Create a Checkout Link guide and save the checkout ID (found in checkout_id in the request response). You will use this value in the checkoutId field in the 'Look Up Checkout Payment' request.


Implement

Write a GET request. For the request endpoint, include the checkout ID by appending it to the end of /platform/checkout/. The resulting endpoint reads /platform/checkout/checkoutId, where the ID value replaces checkoutId.

Your request will resemble the sample code below:

curl --request GET \
     --url https://api-test.maast.com/platform/checkout/a393941797c811e6825102a019999999 \
     --header 'accept: application/json'
     --header 'authorization: Basic OjllZGVjMjFhMzFjMHh5ejc4OWUzMGEzNDE2YWJjMTIz'

Integrate

Send your request. You will receive a response like this from the Maast server:

{
  "code": 0,
  "message": "Success",
  "data": {
    "checkout_id": "a393941797c811e6825102a019999999",
    "checkout_link": "https://app.qualpay.com/checkout/a393941797c811e6825102a019999999",
    "db_timestamp": "2025-02-21T12:57:47.000-0700",
    "merchant_id": 212000000001,
    "expiry_time": "2025-02-21T13:07:47.000-0700",
    "amt_tran": 4.56,
    "amt_balance": 1.1,
    "tran_currency": "840",
    "purchase_id": "PID#2345",
    "profile_id": "21200000000100000840",
    "merch_ref_num": "REF#1234",
    "customer_first_name": "John",
    "customer_last_name": "Doe",
    "customer_email": "[email protected]",
    "customer_phone": 447999999999,
    "billing_addr1": "123 Main Street",
    "billing_state": "CA",
    "billing_city": "San Mateo",
    "billing_zip": "94538",
    "customer_id": "JOHNDOE",
    "preferences": {
      "success_url": "https:/yourcompany.com/payment/success",
      "failure_url": "https://yourcompany.com.com/payment/fail",
      "allow_partial_payments": false,
      "allow_save_card": false,
      "allow_ach_payment": true,
      "email_receipt": false,
      "request_type": "sale",
      "expire_in_secs": 6000
    },
    "transactions": [
      {
        "pg_id": "c0a3bead4a5911e6807e0a728c0d49c0",
        "rcode": "000",
        "rmsg": "Success",
        "status": "Approved",
        "auth_code": "T12345",
        "card_id": "string",
        "card_number": "488888xxxxxx8887",
        "tran_time": "2025-07-01T00:00:03.000Z",
        "amt_tran": 10.99,
        "amt_tran_fee": 1.99,
        "purchase_id": "XYZ12345",
        "cvv2_result": "M",
        "avs_result": "Y",
        "duration": 10,
        "http_status": 200,
        "merchant_id": 212000000001,
        "profile_id": "21200000000100000840",
        "merch_ref_num": "REF#1234",
        "tran_currency": "840",
        "dba_name": "TEST DBA",
        "customer_id": "JOHNDOE",
        "customer": {
          "customer_first_name": "John",
          "customer_last_name": "Doe",
          "customer_email": "[email protected]",
          "billing_addr1": "123 Main Avenue",
          "billing_addr2": "Apt 404",
          "billing_city": "San Mateo",
          "billing_state": "CA",
          "billing_country": "840",
          "billing_zip": "99099",
          "customer_phone": 447999999999,
          "customer_firm_name": "ABC Inc"
        },
        "option_info": {
          "label": "Option Information Label",
          "desc": "Option Information Description",
          "value": "[\"value 1\",\"value 2\"]"
        },
        "recurring": false
      }
    ],
    "subscription": {
      "subscription_id": 1111,
      "merchant_id": 212000000001,
      "customer_id": "JOHNDOE",
      "card_id": "86e1b00d9b0811e68df3069d8f743581",
      "status": "A",
      "profile_id": "21200000000100840",
      "subscription_on_plan": true,
      "plan_id": 1345,
      "plan_name": "Your Plan",
      "plan_code": "SKU1234",
      "plan_desc": "ABC Monthly Billing Plan",
      "plan_frequency": 0,
      "plan_duration": 10,
      "interval": 3,
      "customer_first_name": "John",
      "customer_last_name": "Doe",
      "date_start": "2025-07-14T00:00:00.000Z",
      "date_next": "2025-07-21T00:00:00.000Z",
      "date_end": "2025-09-21T00:00:00.000Z",
      "amt_setup": 50,
      "prorate_date_start": "2025-07-14T00:00:00.000Z",
      "prorate_amt": 11.13,
      "trial_date_start": "2025-07-20T00:00:00.000Z",
      "trial_date_end": "2025-07-20T00:00:00.000Z",
      "trial_amt": 10.45,
      "recur_date_start": "2025-07-30T00:00:00.000Z",
      "recur_date_end": "2025-12-30T00:00:00.000Z",
      "recur_amt": 25.99,
      "customer": {
        "customer_id": "JOHNDOE",
        "rec_id": 0,
        "node_id": 210000000289,
        "customer_first_name": "JOHN",
        "customer_last_name": "Doe",
        "customer_firm_name": "CompanyXYZ",
        "customer_phone": "999-999-9999",
        "customer_email": "[email protected]",
        "reference_id": "678909",
        "comments": "Test comment",
        "developer_id": "CompanyV2.0",
        "primary_card_number": "411111xxxxxx1111",
        "shipping_addresses": [
          {
            "shipping_id": 12345,
            "shipping_first_name": "John",
            "shipping_last_name": "John",
            "shipping_firm_name": "CompanyXYZ",
            "shipping_addr1": "123 Main Street",
            "shipping_addr2": "#1234",
            "shipping_city": "San Mateo",
            "shipping_state": "CA",
            "shipping_zip": "94402",
            "shipping_zip4": "1234",
            "shipping_country": "United States",
            "shipping_country_code": "840",
            "primary": true
          }
        ],
        "billing_cards": [
          {
            "card_number": "411111xxxxxx1111",
            "exp_date": "0420",
            "card_id": "86e1b00d9b0811e68df3069d8f743581",
            "billing_first_name": "John",
            "billing_last_name": "Doe",
            "billing_firm_name": "CompanyXYZ",
            "billing_email": [
              "[email protected]",
              "[email protected]"
            ],
            "billing_addr1": "123 Main Avenue",
            "billing_addr2": "#1234",
            "billing_city": "San Mateo",
            "billing_state": "CA",
            "billing_zip": "94402",
            "billing_zip4": "1234",
            "billing_country": "United States",
            "billing_country_code": "840",
            "primary": true,
            "card_type": "VS",
            "verified_date": "20160530000000"
          }
        ]
      },
      "tran_currency": "840",
      "option_info": {
        "label": "Option Information Label",
        "desc": "Option Information Description",
        "value": "[\"value 1\",\"value 2\"]"
      },
      "recurring": true
    }
  }
}

Check the code field in the request response: 0 confirms success: the API is returning data from this checkout. If the value is something other than 0, check Platform API Response Codes in Reference.

data shows information about this checkout link, including the URL and information about the hosted checkout page, prefilled transaction information, and associated subscriptions. The transactions array shows transactions made through this checkout link.

Check the rcode field in each element in the transactions array. 000 confirms a successful transaction. If rcode is a value other than 000, check Payment Gateway API Response Codes in Reference.

See Look Up Checkout Payment in our API Reference for response field definitions.


Test and Go Live

See our Test and Go Live guide to test your dynamic link integration and to start transacting with an active production account.

📘

Change all endpoints and credentials

To start using your production account, you must:

  • Go through your integration and change all your credentials to use your production API token.
  • Go through your integration and change all endpoints from the test base path (https://api-test.maast.com) to the production base path: https://api.maast.com.