Checkout

On this page, we'll dive into the different checkout endpoints you can use to manage checkout transactions programmatically. You can create checkout links for your customers to pay for their orders. please contact our support [admin@mayaramp.com](mailto:admin@mayaramp.com) to integrate checkout.

Example Screenshot

Checkout Flow Example

The Checkout Model

The checkout model is the data structure that represents a checkout transaction in MayaRamp. The following attributes are associated with the checkout model:

Properties

  • Name
    balanceType
    Type
    string
    Description

    Type of balance (fiat or crypto).

  • Name
    inputCurrency
    Type
    string
    Description

    The currency used for the input asset (e.g., IDR).

  • Name
    outputCurrency
    Type
    string
    Description

    The currency used for the output asset (e.g., usdt-tron).

  • Name
    inputAmount
    Type
    float
    Description

    The amount of the checkout in the input currency.

  • Name
    outputAmount
    Type
    float
    Description

    The amount of the checkout in the output currency.

  • Name
    url
    Type
    string
    Description

    The URL of the checkout transaction.

  • Name
    expiredAt
    Type
    string
    Description

    Timestamp when the checkout will expire.

  • Name
    updatedAt
    Type
    string
    Description

    Timestamp when the checkout was last updated.

  • Name
    createdAt
    Type
    string
    Description

    Timestamp when the checkout was created.


POST/v1/checkout

Create Checkout

This endpoint is used to create checkout url for the user to pay for their order.

Required attributes

  • Name
    inputCurrency
    Type
    string
    Description

    The crypto currency input of the checkout (e.g., IDR).

  • Name
    outputCurrency
    Type
    string
    Description

    The fiat currency output of the checkout(e.g., usdt-tron).

  • Name
    inputAmount
    Type
    float
    Description

    The amount of the checkout in the input currency. This is required if outputAmount is not provided.

  • Name
    outputAmount
    Type
    float
    Description

    The amount of the checkout in the output currency. This is required if inputAmount is not provided.

Request

POST
/v1/checkout
curl --location \
https://staging.mayaramp.com/v1/checkout \
--header 'Content-Type: application/json' \
--header 'Authorization: ••••••' \
--data '{
    "inputCurrency" : "IDR",
    "outputCurrency" : "usdt-tron",
    "outputAmount": 1
}'

Response

{
  "data": {
    "id": "684d148592e3a1c07243b013",
    "url": "https://asep-pay.com/checkout/684d148592e3a1c07243b013"
  },
  "message": "Successfully created checkout",
  "statusCode": 200
}

GET/v1/checkout/status/:checkoutId

Get Checkout Status

This endpoint is used to get the status of the checkout transaction by its id.

Request

GET
/v1/checkout/status/:checkoutId
curl --location --request GET 'https://staging.mayaramp.com/v1/checkout/status/684d21420da7c04c04982662' \
--header 'x-checkout-key: ••••••' \
--header 'Authorization: ••••••'

Response

    {
      "data": {
        "depositId": "917eb178-f00a-4b66-be5a-1f783b004532",
        "depositType": "fiat",
        "userId": "64b514f4358de",
        "inputCurrency": "IDR",
        "inputAmount": 16578,
        "outputCurrency": "usdt-tron",
        "outputAmount": 16413,
        "fee": {
          "amount": 165,
          "percentage": 1,
          "currency": "usdt-tron"
        },
        "paymentFiat": {
          "bankCode": "qris",
          "bankName": "qris",
          "qrData": "xxx"
        },
        "paymentCrypto": {},
        "status": "pending",
        "activityHistory": [
          {
          "activity": "Paid by Payee",
          "description": "Waiting for payment",
          "status": "pending",
          "updatedAt": "2025-06-14T07:20:35.467Z"
          }
        ],
        "reference": "684d22bd3d5f8ac41c9b1a7a",
        "exchangeInfo": {
          "exchangeRate": 16412.65060240964,
          "outputCurrency": "usdt-tron",
          "outputAmount": 16413
        },
        "createdAt": "2025-06-14T07:20:35.467Z",
        "updatedAt": "2025-06-14T07:20:35.467Z",
        "expiredAt": "2025-06-14T07:35:34.63Z"
      },
      "message": "Successfully retrieved deposit status",
      "statusCode": 200
    }
PATCH/v1/checkout/:checkoutId

[DEV] Update Checkout Status

This endpoint is used to update the status of a checkout transaction. Work only on sandbox environment.

Required attributes

  • Name
    status
    Type
    string
    Description

    The status of the checkout.

Request

PATCH
/v1/checkout/:checkoutId
curl --location --request PATCH 'https://staging.mayaramp.com/v1/checkout/684d22bd3d5f8ac41c9b1a7a' \
--header 'Content-Type: application/json' \
--header 'Authorization: ••••••' \
--data '{
    "status" : "completed"
}'

Response

  {
    "data": {
      "depositId": "917eb178-f00a-4b66-be5a-1f783b004532",
      "depositType": "fiat",
      "userId": "64b514f4358de",
      "inputCurrency": "IDR",
      "inputAmount": 16578,
      "outputCurrency": "usdt-tron",
      "outputAmount": 16413,
      "fee": {
        "amount": 165,
        "percentage": 1,
        "currency": "usdt-tron"
      },
      "paymentFiat": {
        "bankCode": "qris",
        "bankName": "qris",
        "qrData": "xxx"
      },
      "paymentCrypto": {},
      "status": "completed",
      "activityHistory": [
        {
        "activity": "Paid by Payee",
        "description": "Waiting for payment",
        "status": "pending",
        "updatedAt": "2025-06-14T07:20:35.467Z"
        }
      ],
      "reference": "684d22bd3d5f8ac41c9b1a7a",
      "exchangeInfo": {
        "exchangeRate": 16412.65060240964,
        "outputCurrency": "usdt-tron",
        "outputAmount": 16413
      },
      "createdAt": "2025-06-14T07:20:35.467Z",
      "updatedAt": "2025-06-14T07:20:35.467Z",
      "expiredAt": "2025-06-14T07:35:34.63Z"
    },
    "message": "Successfully retrieved deposit status",
    "statusCode": 200
  }

Was this page helpful?