Payments

Creates a payment for the specified order.

post
Body
Responses
200Success
application/json
post
POST /v1/om/payments HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 206

{
  "params": {
    "orderId": "text",
    "type": 1,
    "custom": true,
    "amount": 1,
    "methodId": "text",
    "customerUid": "text",
    "status": 1,
    "sourcePaymentId": "text",
    "transactionRef": "text",
    "attrs": {},
    "invoiceId": "text",
    "note": "text"
  }
}
200Success
{
  "app": "text",
  "service": "text",
  "warnings": [
    {}
  ],
  "instanceId": "text",
  "requestId": "text",
  "data": {
    "id": "text"
  }
}

Deletes a payment.

delete
Path parameters
idstringRequired
Responses
200Success
application/json
delete
DELETE /v1/om/payments/{id} HTTP/1.1
Host: 
Accept: */*
200Success
{
  "app": "text",
  "service": "text",
  "warnings": [
    {}
  ],
  "instanceId": "text",
  "requestId": "text",
  "data": {
    "items": [
      {
        "type": 1,
        "status": 1,
        "completedAt": "text",
        "reversedAt": "text",
        "custom": true,
        "amount": 1,
        "sourcePaymentId": "text",
        "transactionRef": "text",
        "attrs": {},
        "invoiceId": "text",
        "note": "text",
        "createdAt": "text",
        "createdVia": "text",
        "createdBy": "text",
        "updatedAt": "text",
        "updatedVia": "text",
        "updatedBy": "text",
        "id": "text",
        "can": [
          "confirm"
        ],
        "methodUid": "text"
      }
    ],
    "paymentMethods": [
      {
        "locales": {
          "ar": {
            "name": "text",
            "description": "text"
          },
          "en": {
            "name": "text",
            "description": "text"
          }
        },
        "visible": true,
        "createdAt": "text",
        "createdVia": "text",
        "createdBy": "text",
        "updatedAt": "text",
        "updatedVia": "text",
        "updatedBy": "text",
        "id": "text"
      }
    ]
  }
}

Updates a payament.

patch
Path parameters
idstringRequired
Body
Responses
200Success
application/json
patch
PATCH /v1/om/payments/{id} HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 208

{
  "params": {
    "id": "text",
    "orderId": "text",
    "amount": 1,
    "methodId": "text",
    "custom": true,
    "correction": true,
    "customerUid": "text",
    "status": 1,
    "sourcePaymentId": "text",
    "transactionRef": "text",
    "attrs": {},
    "note": "text"
  }
}
200Success
{
  "app": "text",
  "service": "text",
  "warnings": [
    {}
  ],
  "instanceId": "text",
  "requestId": "text",
  "data": {
    "success": true
  }
}

Marks a payment as completed.

patch
Path parameters
idstringRequired
Body
Responses
200Success
application/json
patch
PATCH /v1/om/payments/{id}/confirm HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 97

{
  "params": {
    "id": "text",
    "orderId": "text",
    "customerUid": "text",
    "transactionRef": "text",
    "attrs": {}
  }
}
200Success
{
  "app": "text",
  "service": "text",
  "warnings": [
    {}
  ],
  "instanceId": "text",
  "requestId": "text",
  "data": {
    "items": [
      {
        "type": 1,
        "status": 1,
        "completedAt": "text",
        "reversedAt": "text",
        "custom": true,
        "amount": 1,
        "sourcePaymentId": "text",
        "transactionRef": "text",
        "attrs": {},
        "invoiceId": "text",
        "note": "text",
        "createdAt": "text",
        "createdVia": "text",
        "createdBy": "text",
        "updatedAt": "text",
        "updatedVia": "text",
        "updatedBy": "text",
        "id": "text",
        "can": [
          "confirm"
        ],
        "methodUid": "text"
      }
    ],
    "paymentMethods": [
      {
        "locales": {
          "ar": {
            "name": "text",
            "description": "text"
          },
          "en": {
            "name": "text",
            "description": "text"
          }
        },
        "visible": true,
        "createdAt": "text",
        "createdVia": "text",
        "createdBy": "text",
        "updatedAt": "text",
        "updatedVia": "text",
        "updatedBy": "text",
        "id": "text"
      }
    ]
  }
}

Was this helpful?