KartaPay REST API (1.0.0)

Download OpenAPI specification:Download

The KartaPay REST API provides resource-oriented endpoints to create and capture payments using HTTP standards (status code, authentication, etc.)

Payments

The endpoints for managing payments

Create a payment

Authorizations:
HttpBearer
header Parameters
Accept-Language
string
Request Body schema: application/json

The payment request.

object (Context)

Contextual data.

object (Payer)

The payer's billing data.

required
object (Purchase)

The purchase data.

clientId
string

A unique string to reference the payment. This can be an order ID, or similar, and can be used to reconcile the payment with your internal systems.

clientNote
string

A note to attach to the payment. This can be additional information.

object (Plan)

The payment plan.

cancelUrl
string

The URL to redirect your customers to after the payment is canceled. Required if redirectMode is embedded

successUrl
string

The URL to redirect your customers to after the payment is captured. Required if redirectMode is embedded

Responses

Request samples

Content type
application/json
{
  • "context": {
    },
  • "payer": {
    },
  • "purchase": {
    },
  • "clientId": "string",
  • "clientNote": "string",
  • "plan": {
    },
  • "cancelUrl": "string",
  • "successUrl": "string"
}

Response samples

Content type
application/json
{
  • "next": "string",
  • "data": {
    }
}

Read payments

Authorizations:
HttpBearer
query Parameters
desc
Array of strings

The names of attributes for a descending sort

sort
Array of strings

The names of attributes to perform the sorting.

limit
string

The pagination limit.

offset
string

The pagination offset.

header Parameters
Accept-Language
string

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "total": 0,
  • "offset": 0,
  • "limit": 0,
  • "prev": "string",
  • "next": "string"
}

Read a payment

Authorizations:
HttpBearer
path Parameters
id
required
string

The ID of the payment.

header Parameters
Accept-Language
string

Responses

Response samples

Content type
application/json
{
  • "status": "init",
  • "captured": true,
  • "context": {
    },
  • "payee": {
    },
  • "payer": {
    },
  • "purchase": {
    },
  • "clientId": "string",
  • "clientNote": "string",
  • "plan": {
    },
  • "cancelUrl": "string",
  • "successUrl": "string",
  • "billing": {
    },
  • "createdAt": "string",
  • "canceledAt": "string",
  • "submittedAt": "string",
  • "approvedAt": "string",
  • "capturedAt": "string",
  • "failedAt": "string",
  • "completedAt": "string"
}

Cancel a payment

Authorizations:
HttpBearer
path Parameters
id
required
string

The ID of the payment.

header Parameters
Accept-Language
string

Responses

Response samples

Content type
application/json
{
  • "next": "string",
  • "data": {
    }
}

Submit a payment

Authorizations:
HttpBearer
path Parameters
id
required
string

The ID of the payment.

header Parameters
Accept-Language
string
Request Body schema: application/json

The payment plan.

source
string
Enum: "HOL" "HRM" "MVK" "MVM" "PYP" "STR"

The payer's suited gateway for the payment.

Responses

Request samples

Content type
application/json
{
  • "source": "HOL"
}

Response samples

Content type
application/json
{
  • "next": "string",
  • "data": {
    }
}

Webhooks

The endpoints for handling webhooks