⚙️
mtnAPI Docs 👨🏻‍🔬
  • mtnAPI Overview
    • Introduction
    • Terminology
  • Getting Started
  • How It Works
  • FAQ
  • Reference
    • API Reference
      • Pay
        • Token Discount Payments
        • Token Gated Payments
        • Token Swapped Payments
        • SOL & SPL Payments
      • Mint
        • Candy Machine
        • Metadata
        • Upload
      • Intent Key
      • Reference Key
      • Status
      • Validate
  • Supported Tokens
  • Testing
Powered by GitBook
On this page
  • Example
  • Returns the status of a transaction
  1. Reference
  2. API Reference

Status

The status endpoint is used to verify your transaction has been completed. You will pass in your refrence and intent keys. Your refrence key is used to find the transaction on chain and your intent key is used to verify it was authentic.

If you receive a message in the body of the response, the transaction is complete. If the request is successful and the body is null, the transaction did not complete.

Example

import requests

ref_url = 'http://api.mtnapi.com/ref'
ref_req = requests.get(url = ref_url)
ref = ref_req.json()['ref']

wallet='Ar7XrWtrGsB2xCnrTFLs9HyJ1bA62gXCAUZa8Fa7VMc5' #receiver
payerToken = 'usdc'
size = 0.1

intent_url = 'http://api.mtnapi.com/intent'
params = {'wallet': wallet, 'size' : size, 'payerToken' : payerToken}
intent_req = requests.get(url = intent_url, params=params)
intent = intent_req.json()['intent']

status_url = 'http://api.mtnapi.com/status'
params = {'ref': ref, 'intent': intent} 
status_req = requests.post(url = status_url, params=params)

tx = status_req.json()['tx']
safe = status_req.json()['safe']
status_intent = status_req.json()['intent']

print(tx)
print(safe)
print(status_intent == intent)

Returns the status of a transaction

POST https://api.mtnapi.com/status

Query Parameters

Name
Type
Description

ref

String

Pass a reference key associated with your desired transaction.

{
    // Response
}
PreviousReference KeyNextValidate

Last updated 2 years ago