How to Charge Your Balance

Modified on Sat, 1 Feb at 10:21 PM

Our API allows users to purchase shipping credits, which are required for creating shipments using OTO delivery options without a contract. This guide explains how to buy shipping credit using the buyShippingCredit endpoint.


Instructions


Step 1: API Endpoint



Step 2: Authorization

  • A valid Bearer Token must be included in the request headers for authentication



Step 3: Request Body Parameters

  • The request body should be in JSON format and include the following field:



Field NameRequiredTypeDescription
amountYesNumberThe amount of credit to be purchased.



Step 4: Example Request

  • Using cURL:

    curl --location 'https://api.tryoto.com/rest/v2/buyShippingCredit' \

    --data '{

        "amount": 11.50

    }'



Step 5: Example Response

  • A successful response will return a payment URL, allowing the user to complete the transaction:

    {

      "success": true,

      "paymentURL": "https://checkout.payments.tap.company?mode=page&token=60c9c154d2b4650d89xxxx"

    }

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article