AR.IO LogoAR.IO Documentation
TurboPayment Service

Payments

Payment processing and top-up operations

Get Top Up Quote for Credits

Get a top up quote and payment session for a given method (payment-intent or checkout-session), destination address, currency type, and payment amount

GET
/top-up/{method}/{address}/{currency}/{amount}

Path Parameters

methodstring
addressstring

Destination wallet address

currencystring

Currency type for a given payment amount

amountinteger

Payment amount in a given currency's smallest unit value. For example, $10 USD is 1000. 1 AR is 1000000000000

Query Parameters

promoCode?string

Comma-separated list of promo codes

uiMode?string

Which UI Mode to create the checkout session in

Default"hosted"
returnUrl?string

The URL to return to after a successful payment

Default"https://app.ardrive.io"
successUrl?string

The URL to return to after a successful payment

Default"https://app.ardrive.io"
cancelUrl?string

The URL to return to after a canceled payment

Default"https://app.ardrive.io"

Header Parameters

x-signature?string

The signature value derived from signing the request's data concatenated with the provided nonce using the private key from the provided public key

x-nonce?string

The nonce value concatenated with the request's data when deriving the provided the signature

x-public-key?string

The "modulus" of the JWK used to create the signature header

Response Body

curl -X GET "https://loading/v1/top-up/checkout-session/string/usd/1000?promoCode=string&uiMode=embedded&returnUrl=https%3A%2F%2Fapp.ardrive.io&successUrl=https%3A%2F%2Fapp.ardrive.io&cancelUrl=https%3A%2F%2Fapp.ardrive.io" \  -H "x-signature: string" \  -H "x-nonce: string" \  -H "x-public-key: string"
{
  "paymentSession": {
    "id": "cs_test_a1lFM2vIpifSqH8VtIjnbSGnr0RAQtEx6R2OMbhvbeK7fradNG7357Roxy",
    "client_secret": "cs_test_a1lFM2vIpifSqH8VtIjnbSGnr0RAQtEx6R2OMbhvbeK7fradNG7357Roxy#fidkdWxOYHwnPyd1blpxYHZxWjA0T1BEcXJGPWR1VUpSbkFJbTdDVV9uVG5sTl9AblFqM3J0YklGcVRqRmlJM1YxaTdvaWdnZjBIYkphckpQYVA8UWs8NktLc3REQmdwNDQwaW5PRm1IbG5CNTVdUGNRaGo3fycpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBabHFgaCcpJ2BrZGdpYFVpZGZgbWppYWB3dic%2FcXdwYHgl",
    "url": "https://checkout.stripe.com/c/pay/cs_test_a1lFM2vIpifSqH8VtIjnbSGnr0RAQtEx6R2OMbhvbeK7fradNG7357Roxy#fidkdWxOYHwnPyd1blpxYHZxWjA0T1BEcXJGPWR1VUpSbkFJbTdDVV9uVG5sTl9AblFqM3J0YklGcVRqRmlJM1YxaTdvaWdnZjBIYkphckpQYVA8UWs8NktLc3REQmdwNDQwaW5PRm1IbG5CNTVdUGNRaGo3fycpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBabHFgaCcpJ2BrZGdpYFVpZGZgbWppYWB3dic%2FcXdwYHgl"
  },
  "topUpQuote": {
    "topUpQuoteId": "caa8b54a-eb5e-4134-8ae2-a3946a428ec7",
    "destinationAddress": "abcdefghijklmnopqrxtuvwxyz123456789ABCDEFGH",
    "destinationAddressType": "arweave",
    "paymentAmount": 800,
    "quotedPaymentAmount": 1000,
    "currencyType": "usd",
    "winstonCreditAmount": "332824926",
    "quoteExpirationDate": "2023-05-17T21:46:38.404Z",
    "paymentProvider": "stripe"
  },
  "adjustments": [
    {
      "name": "Adjustment",
      "description": "Some great subsidy",
      "operatorMagnitude": "0.6",
      "operator": "multiply",
      "adjustmentAmount": "-12300",
      "promoCode": "SOME-GREAT-CODE"
    }
  ],
  "fees": [
    {
      "name": "Adjustment",
      "description": "Some great subsidy",
      "operatorMagnitude": "0.6",
      "operator": "multiply",
      "adjustmentAmount": "-12300",
      "promoCode": "SOME-GREAT-CODE"
    }
  ]
}
"Payment Amount is Invalid!"
"Destination address is not a valid Arweave native address!"
"Fiat Oracle Unavailable"

Post a pending payment transaction

Post a transaction ID that has been sent to the payment service's wallet

POST
/account/balance/{token}

Path Parameters

tokenstring

Token type for a given transaction

JSON with tx_id key of the pending payment transaction

tx_id?string

The transaction ID of the pending payment transaction

Response Body

curl -X POST "https://loading/v1/account/balance/arweave" \  -H "Content-Type: application/json" \  -d '{}'
{
  "message": "Transaction credited",
  "creditedTransaction": {
    "allOf": {
      "transactionId": "string",
      "transactionQuantity": 0,
      "createdAt": "string",
      "tokenType": "arweave",
      "destinationAddress": "abcdefghijklmnopqrxtuvwxyz123456789ABCDEFGH",
      "destinationAddressType": "arweave",
      "winstonCreditAmount": "332824926",
      "adjustments": [
        {
          "name": "Adjustment",
          "description": "Some great subsidy",
          "operatorMagnitude": "0.6",
          "operator": "multiply",
          "adjustmentAmount": "-12300",
          "promoCode": "SOME-GREAT-CODE"
        }
      ]
    },
    "blockHeight": 0,
    "creditedAt": "string"
  }
}
{
  "message": "Transaction pending",
  "pendingTransaction": {
    "transactionId": "string",
    "transactionQuantity": 0,
    "createdAt": "string",
    "tokenType": "arweave",
    "destinationAddress": "abcdefghijklmnopqrxtuvwxyz123456789ABCDEFGH",
    "destinationAddressType": "arweave",
    "winstonCreditAmount": "332824926",
    "adjustments": [
      {
        "name": "Adjustment",
        "description": "Some great subsidy",
        "operatorMagnitude": "0.6",
        "operator": "multiply",
        "adjustmentAmount": "-12300",
        "promoCode": "SOME-GREAT-CODE"
      }
    ]
  }
}
{
  "message": "Transaction has already failed!",
  "failedTransaction": {
    "allOf": {
      "transactionId": "string",
      "transactionQuantity": 0,
      "createdAt": "string",
      "tokenType": "arweave",
      "destinationAddress": "abcdefghijklmnopqrxtuvwxyz123456789ABCDEFGH",
      "destinationAddressType": "arweave",
      "winstonCreditAmount": "332824926",
      "adjustments": [
        {
          "name": "Adjustment",
          "description": "Some great subsidy",
          "operatorMagnitude": "0.6",
          "operator": "multiply",
          "adjustmentAmount": "-12300",
          "promoCode": "SOME-GREAT-CODE"
        }
      ]
    },
    "failedAt": "string",
    "failureReason": "string"
  }
}
"Transaction ID not found!"
"Error while processing transaction!"

How is this guide?