Skip to content
ShaBaas Pay / Docs
Checkout

Get External Checkout URL

Generate an external checkout URL using amount, notes, and checkout parameters.

Error Codes

CodeStatusReasonWhat to do
GN-0000401Unauthorized Access to an operationSend valid API key in Authorization header
GN-0000422Invalid amount (amount <= 0)Provide a positive amount.
PA-0008422Amount exceeds allowed thresholdReduce amount and retry.
GN-0000422Checkout is not supported for merchantEnable standalone checkout for merchant.
post/api/get_external_url

post

Generate an external checkout URL using amount, notes, and checkout parameters.

Error Codes

CodeStatusReasonWhat to do
GN-0000401Unauthorized Access to an operationSend valid API key in Authorization header
GN-0000422Invalid amount (amount <= 0)Provide a positive amount.
PA-0008422Amount exceeds allowed thresholdReduce amount and retry.
GN-0000422Checkout is not supported for merchantEnable standalone checkout for merchant.

Servers

Staging: https://dev-api.shabaas.com

Production: https://api.shabaas.com

Authentication

ApiKeyAuthheader: Authorization

Merchant API key in Authorization header.

Request Body

Required
application/json
object

Properties

amountRequired

External checkout amount.

oneOf

string
number
Example
"50"
notesOptionalstring

Optional checkout notes.

string
Example
"testing"
checkoutRequiredobject

External checkout parameter object.

object
Example
{
  "first_and_last_name": "Jon Doe",
  "company_name": "Test Corp",
  "business_abn": "111111111",
  "email": "customer@example.com",
  "phone_number": "6141012233"
}

Additional properties are supported; see the endpoint definition for their schema.

basic
{
  "amount": "50",
  "notes": "testing",
  "checkout": {
    "first_and_last_name": "Jon Doe",
    "company_name": "Test Corp",
    "business_abn": "111111111",
    "email": "customer@example.com",
    "phone_number": "6141012233"
  }
}

Responses

200External checkout URL generated.
application/json
object

Properties

messageOptionalstring
string
Example
"Success"
dataOptionalobject
object

Properties

checkout_urlOptionalstring
string
Example
"https://checkout.shabaas.com/au/staging-demo-merchant?token=eyJhbGci..."
generated
{
  "message": "Success",
  "data": {
    "checkout_url": "https://checkout.shabaas.com/au/staging-demo-merchant?token=eyJhbGci..."
  }
}
401Unauthorized merchant context.
application/json
object

Properties

messageRequiredstring
string
Example
"Payee account cannot receive NPP Payments"
error_codeRequiredstring
string
Example
"MOV_NPP_PAYMENT_NOT_SUPPORTED"
dataRequiredobject
object
Example
{
  "response_time": "2026-04-08T12:28:26.759Z"
}

Additional properties are supported; see the endpoint definition for their schema.

422Validation or business-rule error while generating external checkout URL.
application/json
object

Properties

messageRequiredstring
string
Example
"Payee account cannot receive NPP Payments"
error_codeRequiredstring
string
Example
"MOV_NPP_PAYMENT_NOT_SUPPORTED"
dataRequiredobject
object
Example
{
  "response_time": "2026-04-08T12:28:26.759Z"
}

Additional properties are supported; see the endpoint definition for their schema.

Full endpoint OpenAPI definition
{
  "openapi": "3.0.3",
  "info": {
    "title": "ShaBaasPay Public API",
    "version": "1.0.0",
    "description": "Describes public REST endpoints for authorization, payment agreements, payment initiations,\nrefunds, webhooks, and PayID collection APIs.\n"
  },
  "servers": [
    {
      "url": "https://dev-api.shabaas.com",
      "description": "Staging"
    },
    {
      "url": "https://api.shabaas.com",
      "description": "Production"
    }
  ],
  "tags": [
    {
      "name": "Checkout",
      "x-displayName": "Checkout",
      "description": "Generate checkout and pay links for web checkout flows."
    }
  ],
  "x-tagGroups": [
    {
      "name": "SHABAASPAY PUBLIC API",
      "tags": [
        "API Keys",
        "Payment Agreement",
        "Payment Initiation",
        "Checkout",
        "B2B Collections",
        "Webhooks"
      ]
    },
    {
      "name": "Internal",
      "tags": [
        "Clients"
      ]
    }
  ],
  "security": [
    {
      "BearerAuth": []
    }
  ],
  "paths": {
    "/api/get_external_url": {
      "post": {
        "tags": [
          "Checkout"
        ],
        "summary": "post",
        "description": "Generate an external checkout URL using amount, notes, and checkout parameters.\n\n### Error Codes\n| Code | Status | Reason | What to do |\n| ---- | ------ | ------ | ---------- |\n| GN-0000 | 401 | Unauthorized Access to an operation | Send valid API key in `Authorization` header |\n| GN-0000 | 422 | Invalid amount (amount <= 0) | Provide a positive amount. |\n| PA-0008 | 422 | Amount exceeds allowed threshold | Reduce amount and retry. |\n| GN-0000 | 422 | Checkout is not supported for merchant | Enable standalone checkout for merchant. |\n",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExternalCheckoutRequest"
              },
              "examples": {
                "basic": {
                  "value": {
                    "amount": "50",
                    "notes": "testing",
                    "checkout": {
                      "first_and_last_name": "Jon Doe",
                      "company_name": "Test Corp",
                      "business_abn": "111111111",
                      "email": "customer@example.com",
                      "phone_number": "6141012233"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "External checkout URL generated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CheckoutLinkResponse"
                },
                "examples": {
                  "generated": {
                    "value": {
                      "message": "Success",
                      "data": {
                        "checkout_url": "https://checkout.shabaas.com/au/staging-demo-merchant?token=eyJhbGci..."
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized merchant context.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation or business-rule error while generating external checkout URL.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "ExternalCheckoutRequest": {
        "type": "object",
        "required": [
          "amount",
          "checkout"
        ],
        "properties": {
          "amount": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "number"
              }
            ],
            "description": "External checkout amount.",
            "example": "50"
          },
          "notes": {
            "type": "string",
            "description": "Optional checkout notes.",
            "example": "testing"
          },
          "checkout": {
            "type": "object",
            "description": "External checkout parameter object.",
            "additionalProperties": true,
            "example": {
              "first_and_last_name": "Jon Doe",
              "company_name": "Test Corp",
              "business_abn": "111111111",
              "email": "customer@example.com",
              "phone_number": "6141012233"
            }
          }
        }
      },
      "CheckoutLinkResponse": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "example": "Success"
          },
          "data": {
            "type": "object",
            "properties": {
              "checkout_url": {
                "type": "string",
                "example": "https://checkout.shabaas.com/au/staging-demo-merchant?token=eyJhbGci..."
              }
            }
          }
        }
      },
      "ErrorResponse": {
        "type": "object",
        "required": [
          "message",
          "error_code",
          "data"
        ],
        "properties": {
          "message": {
            "type": "string",
            "example": "Payee account cannot receive NPP Payments"
          },
          "error_code": {
            "type": "string",
            "example": "MOV_NPP_PAYMENT_NOT_SUPPORTED"
          },
          "data": {
            "type": "object",
            "additionalProperties": true,
            "example": {
              "response_time": "2026-04-08T12:28:26.759Z"
            }
          }
        }
      }
    },
    "securitySchemes": {
      "BearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "description": "Bearer token returned by `/api/public/authorization`."
      },
      "ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "Authorization",
        "description": "Merchant API key in `Authorization` header."
      }
    }
  }
}
Download endpoint OpenAPI JSON →
← Back to API Reference