Payment

WIP: A summary needs to be written for Payment


DELETE/v3/integration/payment/manual/:id

Delete Payment

Delete manual payment

URL parameters

  • Name
    id
    Type
    string Required
    Description
    the id for the object

200 Response

  • Name
    data
    Type
    object
    Description
  • Name
    success
    Type
    boolean Required
    Description

Properties for data object

  • Name
    id
    Type
    string Required
    Description
    the id for the object

4xx Response

  • Name
    code
    Type
    string
    Description
    The error code
  • Name
    documentation_url
    Type
    string
    Description
    An optional link to the documentation for the error
  • Name
    message
    Type
    string
    Description
    The error message
  • Name
    success
    Type
    boolean Required
    Description
    Returns false to indicate the request failed

5xx Response

  • Name
    code
    Type
    string
    Description
    The error code
  • Name
    documentation_url
    Type
    string
    Description
    An optional link to the documentation for the error
  • Name
    message
    Type
    string
    Description
    The error message
  • Name
    success
    Type
    boolean Required
    Description
    Returns false to indicate the request failed

Example Request
application/json

DELETE
/v3/integration/payment/manual/:id
curl https://api.shopmonkey.cloud/v3/integration/payment/manual/ID \ 
  -H "Authorization: Bearer ${SM_TOKEN}" \ 
  -X DELETE -H 'Content-Type: application/json' \ 
  --data '{}'

Example Response
application/json

{
  "success": true
}

GET/v3/integration/payment/:id/pdf

Download PDF

Get an payment as PDF document

URL parameters

  • Name
    id
    Type
    string Required
    Description
    the id for the object

Example Request

GET
/v3/integration/payment/:id/pdf
curl https://api.shopmonkey.cloud/v3/integration/payment/ID/pdf \ 
  -H "Authorization: Bearer ${SM_TOKEN}"

POST/v3/integration/payment/:id/email

Send Payment Receipt

Send a payment receipt to customers

URL parameters

  • Name
    id
    Type
    string Required
    Description
    the id for the object

Body parameters

  • Name
    emailIds
    Type
    array Required
    Description
    An array of ids of customers emails

Example Request
application/json

POST
/v3/integration/payment/:id/email
curl https://api.shopmonkey.cloud/v3/integration/payment/ID/email \ 
  -H "Authorization: Bearer ${SM_TOKEN}" \ 
  -X POST -H 'Content-Type: application/json' \ 
  --data '{ "emailIds" : [] }'

POST/v3/integration/payment/manual/charge

Record Payment

Records a payment manually

Body parameters


200 Response

  • Name
    code
    Type
    string
    Description
    The error code
  • Name
    documentation_url
    Type
    string
    Description
    An optional link to the documentation for the error
  • Name
    success
    Type
    boolean Required
    Description
    if successful, will be true. if not successful, will be false and message will contain a human readable error message
  • Name
    data
    Type
    object Required
    Description
    Payment schema

Properties for data object

  • Name
    id
    Type
    string Required
    Description
  • Name
    createdDate
    Type
    string Required
    Description
  • Name
    updatedDate
    Type
    string Required
    Description
  • Name
    companyId
    Type
    string Required
    Description
  • Name
    locationId
    Type
    string Required
    Description
  • Name
    orderId
    Type
    string Required
    Description
  • Name
    payerId
    Type
    string Required
    Description
  • Name
    statementId
    Type
    string Required
    Description
  • Name
    recordedDate
    Type
    string Required
    Description
    the date that the payment was recorded
  • Name
    note
    Type
    string Required
    Description
  • Name
    userData
    Type
    object
    Description
  • Name
    status
    Type
    string Required
    Description
  • Name
    paymentType
    Type
    string Required
    Description
  • Name
    paymentMode
    Type
    string Required
    Description
  • Name
    transactionType
    Type
    string Required
    Description
  • Name
    amountCents
    Type
    integer Required
    Description
    amount charged or refuned
  • Name
    refundedAmountCents
    Type
    integer Required
    Description
    amount refunded for charge transactions
  • Name
    refunded
    Type
    boolean Required
    Description
  • Name
    refundReason
    Type
    string Required
    Description
  • Name
    chargeId
    Type
    string Required
    Description
    reference for original payment if transaction type is different from charge
  • Name
    deposit
    Type
    boolean Required
    Description
  • Name
    checkNumber
    Type
    string Required
    Description
  • Name
    cardType
    Type
    string Required
    Description
  • Name
    cardDigits
    Type
    string Required
    Description
  • Name
    cardName
    Type
    string Required
    Description
  • Name
    cardConfirmation
    Type
    string Required
    Description
  • Name
    debitCard
    Type
    boolean Required
    Description
  • Name
    chargeFromPublicPage
    Type
    boolean Required
    Description
  • Name
    payoutId
    Type
    string Required
    Description
  • Name
    provider
    Type
    string Required
    Description
  • Name
    providerData
    Type
    object
    Description
  • Name
    receiptNumber
    Type
    integer Required
    Description
  • Name
    providerFee
    Type
    integer Required
    Description
    SM payments fee amount in cents on top of Stripe fee
  • Name
    transactionalFeeAmountCents
    Type
    integer Required
    Description
    amount charged as SM transactional fee (service fee)
  • Name
    disputedPaymentId
    Type
    string Required
    Description
    if a payment is a deduction/correction of a disputed payment, here we store link to that original disputed payment
  • Name
    disputedStatus
    Type
    string Required
    Description
  • Name
    disputedReason
    Type
    string Required
    Description
  • Name
    disputedType
    Type
    string Required
    Description
  • Name
    bulkPaymentId
    Type
    string Required
    Description

4xx Response

  • Name
    code
    Type
    string
    Description
    The error code
  • Name
    documentation_url
    Type
    string
    Description
    An optional link to the documentation for the error
  • Name
    message
    Type
    string
    Description
    the error message if not successful
  • Name
    success
    Type
    boolean Required
    Description
    if successful, will be true. if not successful, will be false and message will contain a human readable error message

5xx Response

  • Name
    code
    Type
    string
    Description
    The error code
  • Name
    documentation_url
    Type
    string
    Description
    An optional link to the documentation for the error
  • Name
    message
    Type
    string
    Description
    the error message if not successful
  • Name
    success
    Type
    boolean Required
    Description
    if successful, will be true. if not successful, will be false and message will contain a human readable error message

Example Request
application/json

POST
/v3/integration/payment/manual/charge
curl https://api.shopmonkey.cloud/v3/integration/payment/manual/charge \ 
  -H "Authorization: Bearer ${SM_TOKEN}" \ 
  -X POST -H 'Content-Type: application/json' \ 
  --data '{}'

Example Response
application/json

{
  "success": true,
  "data": {
    "id": "id",
    "createdDate": "createdDate",
    "updatedDate": null,
    "companyId": "companyId",
    "locationId": "locationId",
    "orderId": "orderId",
    "payerId": null,
    "statementId": null,
    "recordedDate": null,
    "note": "note",
    "status": "status",
    "paymentType": "paymentType",
    "paymentMode": "paymentMode",
    "transactionType": "transactionType",
    "amountCents": 1,
    "refundedAmountCents": null,
    "refunded": true,
    "refundReason": null,
    "chargeId": null,
    "deposit": true,
    "checkNumber": null,
    "cardType": null,
    "cardDigits": null,
    "cardName": null,
    "cardConfirmation": null,
    "debitCard": true,
    "chargeFromPublicPage": true,
    "provider": null,
    "receiptNumber": 1,
    "providerFee": null,
    "transactionalFeeAmountCents": null,
    "disputedPaymentId": null,
    "disputedStatus": null,
    "disputedReason": null,
    "disputedType": null,
    "bulkPaymentId": null
  }
}

POST/v3/integration/payment/manual/charge/bulk

Record Bulk Payment

Records a bulk payment manually

Body parameters


200 Response

  • Name
    code
    Type
    string
    Description
    The error code
  • Name
    documentation_url
    Type
    string
    Description
    An optional link to the documentation for the error
  • Name
    success
    Type
    boolean Required
    Description
    if successful, will be true. if not successful, will be false and message will contain a human readable error message
  • Name
    data
    Type
    array Required
    Description

4xx Response

  • Name
    code
    Type
    string
    Description
    The error code
  • Name
    documentation_url
    Type
    string
    Description
    An optional link to the documentation for the error
  • Name
    message
    Type
    string
    Description
    the error message if not successful
  • Name
    success
    Type
    boolean Required
    Description
    if successful, will be true. if not successful, will be false and message will contain a human readable error message

5xx Response

  • Name
    code
    Type
    string
    Description
    The error code
  • Name
    documentation_url
    Type
    string
    Description
    An optional link to the documentation for the error
  • Name
    message
    Type
    string
    Description
    the error message if not successful
  • Name
    success
    Type
    boolean Required
    Description
    if successful, will be true. if not successful, will be false and message will contain a human readable error message

Example Request
application/json

POST
/v3/integration/payment/manual/charge/bulk
curl https://api.shopmonkey.cloud/v3/integration/payment/manual/charge/bulk \ 
  -H "Authorization: Bearer ${SM_TOKEN}" \ 
  -X POST -H 'Content-Type: application/json' \ 
  --data '{}'

Example Response
application/json

{
  "success": true,
  "data": [
    {
      "id": "id",
      "createdDate": "createdDate",
      "updatedDate": null,
      "companyId": "companyId",
      "locationId": "locationId",
      "orderId": "orderId",
      "payerId": null,
      "statementId": null,
      "recordedDate": null,
      "note": "note",
      "status": "status",
      "paymentType": "paymentType",
      "paymentMode": "paymentMode",
      "transactionType": "transactionType",
      "amountCents": 1,
      "refundedAmountCents": null,
      "refunded": true,
      "refundReason": null,
      "chargeId": null,
      "deposit": true,
      "checkNumber": null,
      "cardType": null,
      "cardDigits": null,
      "cardName": null,
      "cardConfirmation": null,
      "debitCard": true,
      "chargeFromPublicPage": true,
      "payoutId": null,
      "provider": null,
      "receiptNumber": 1,
      "providerFee": null,
      "transactionalFeeAmountCents": null,
      "disputedPaymentId": null,
      "disputedStatus": null,
      "disputedReason": null,
      "disputedType": null,
      "bulkPaymentId": null
    }
  ]
}

PUT/v3/integration/payment/manual/charge/bulk/:id

Update Bulk Payment

Update a bulk payment manually

URL parameters

  • Name
    id
    Type
    string Required
    Description
    the id for the object

Body parameters

  • Name
    locationId
    Type
    string
    Description
  • Name
    payerId
    Type
    string
    Description
  • Name
    statementId
    Type
    string
    Description
  • Name
    recordedDate
    Type
    string
    Description
    the date that the payment was recorded
  • Name
    note
    Type
    string
    Description
  • Name
    userData
    Type
    object
    Description
  • Name
    status
    Type
    string
    Description
  • Name
    paymentType
    Type
    string
    Description
  • Name
    paymentMode
    Type
    string
    Description
  • Name
    transactionType
    Type
    string
    Description
  • Name
    refundedAmountCents
    Type
    integer
    Description
    amount refunded for charge transactions
  • Name
    refundReason
    Type
    string
    Description
  • Name
    chargeId
    Type
    string
    Description
    reference for original payment if transaction type is different from charge
  • Name
    deposit
    Type
    boolean
    Description
  • Name
    checkNumber
    Type
    string
    Description
  • Name
    cardType
    Type
    string
    Description
  • Name
    cardDigits
    Type
    string
    Description
  • Name
    cardName
    Type
    string
    Description
  • Name
    cardConfirmation
    Type
    string
    Description
  • Name
    debitCard
    Type
    boolean
    Description
  • Name
    chargeFromPublicPage
    Type
    boolean
    Description
  • Name
    payoutId
    Type
    string
    Description
  • Name
    provider
    Type
    string
    Description
  • Name
    providerData
    Type
    object
    Description
  • Name
    receiptNumber
    Type
    integer
    Description
  • Name
    providerFee
    Type
    integer
    Description
    SM payments fee amount in cents on top of Stripe fee
  • Name
    transactionalFeeAmountCents
    Type
    integer
    Description
    amount charged as SM transactional fee (service fee)
  • Name
    disputedPaymentId
    Type
    string
    Description
    if a payment is a deduction/correction of a disputed payment, here we store link to that original disputed payment
  • Name
    disputedStatus
    Type
    string
    Description
  • Name
    disputedReason
    Type
    string
    Description
  • Name
    disputedType
    Type
    string
    Description
  • Name
    bulkPaymentId
    Type
    string
    Description
  • Name
    orders
    Type
    array
    Description

200 Response

  • Name
    code
    Type
    string
    Description
    The error code
  • Name
    documentation_url
    Type
    string
    Description
    An optional link to the documentation for the error
  • Name
    success
    Type
    boolean Required
    Description
    if successful, will be true. if not successful, will be false and message will contain a human readable error message
  • Name
    data
    Type
    array Required
    Description

4xx Response

  • Name
    code
    Type
    string
    Description
    The error code
  • Name
    documentation_url
    Type
    string
    Description
    An optional link to the documentation for the error
  • Name
    message
    Type
    string
    Description
    the error message if not successful
  • Name
    success
    Type
    boolean Required
    Description
    if successful, will be true. if not successful, will be false and message will contain a human readable error message

5xx Response

  • Name
    code
    Type
    string
    Description
    The error code
  • Name
    documentation_url
    Type
    string
    Description
    An optional link to the documentation for the error
  • Name
    message
    Type
    string
    Description
    the error message if not successful
  • Name
    success
    Type
    boolean Required
    Description
    if successful, will be true. if not successful, will be false and message will contain a human readable error message

Example Request
application/json

PUT
/v3/integration/payment/manual/charge/bulk/:id
curl https://api.shopmonkey.cloud/v3/integration/payment/manual/charge/bulk/ID \ 
  -H "Authorization: Bearer ${SM_TOKEN}" \ 
  -X PUT -H 'Content-Type: application/json' \ 
  --data '{}'

Example Response
application/json

{
  "success": true,
  "data": [
    {
      "id": "id",
      "createdDate": "createdDate",
      "updatedDate": null,
      "companyId": "companyId",
      "locationId": "locationId",
      "orderId": "orderId",
      "payerId": null,
      "statementId": null,
      "recordedDate": null,
      "note": "note",
      "status": "status",
      "paymentType": "paymentType",
      "paymentMode": "paymentMode",
      "transactionType": "transactionType",
      "amountCents": 1,
      "refundedAmountCents": null,
      "refunded": true,
      "refundReason": null,
      "chargeId": null,
      "deposit": true,
      "checkNumber": null,
      "cardType": null,
      "cardDigits": null,
      "cardName": null,
      "cardConfirmation": null,
      "debitCard": true,
      "chargeFromPublicPage": true,
      "payoutId": null,
      "provider": null,
      "receiptNumber": 1,
      "providerFee": null,
      "transactionalFeeAmountCents": null,
      "disputedPaymentId": null,
      "disputedStatus": null,
      "disputedReason": null,
      "disputedType": null,
      "bulkPaymentId": null
    }
  ]
}

DELETE/v3/integration/payment/manual/charge/bulk/:id

Delete Bulk Payment

Delete a bulk payment manually

URL parameters

  • Name
    id
    Type
    string Required
    Description
    the id for the object

200 Response

  • Name
    data
    Type
    object Required
    Description
  • Name
    success
    Type
    boolean Required
    Description

Properties for data object

  • Name
    bulkPaymentId
    Type
    string
    Description

4xx Response

  • Name
    code
    Type
    string
    Description
    The error code
  • Name
    documentation_url
    Type
    string
    Description
    An optional link to the documentation for the error
  • Name
    message
    Type
    string
    Description
    The error message
  • Name
    success
    Type
    boolean Required
    Description
    Returns false to indicate the request failed

5xx Response

  • Name
    code
    Type
    string
    Description
    The error code
  • Name
    documentation_url
    Type
    string
    Description
    An optional link to the documentation for the error
  • Name
    message
    Type
    string
    Description
    The error message
  • Name
    success
    Type
    boolean Required
    Description
    Returns false to indicate the request failed

Example Request
application/json

DELETE
/v3/integration/payment/manual/charge/bulk/:id
curl https://api.shopmonkey.cloud/v3/integration/payment/manual/charge/bulk/ID \ 
  -H "Authorization: Bearer ${SM_TOKEN}" \ 
  -X DELETE -H 'Content-Type: application/json' \ 
  --data '{}'

Example Response
application/json

{
  "data": {
    "bulkPaymentId": "bulkPaymentId"
  },
  "success": true
}

GET/v3/purchase_order/:id/pdf

Download PDF

Get purchase order as PDF document

URL parameters

  • Name
    id
    Type
    string Required
    Description
    the id for the object

Example Request

GET
/v3/purchase_order/:id/pdf
curl https://api.shopmonkey.cloud/v3/purchase_order/ID/pdf \ 
  -H "Authorization: Bearer ${SM_TOKEN}"

GET/v3/report/payment

Payments report

All Payments report

200 Response

  • Name
    code
    Type
    string
    Description
    The error code
  • Name
    data
    Type
    array Required
    Description
  • Name
    documentation_url
    Type
    string
    Description
    An optional link to the documentation for the error
  • Name
    meta
    Type
    object
    Description
  • Name
    success
    Type
    boolean Required
    Description

Properties for meta object

  • Name
    hasMore
    Type
    boolean Required
    Description
    if there are more records available
  • Name
    sums
    Type
    one of: any, any
    Description
  • Name
    total
    Type
    number Required
    Description
    the total number of records

4xx Response

  • Name
    code
    Type
    string
    Description
    The error code
  • Name
    documentation_url
    Type
    string
    Description
    An optional link to the documentation for the error
  • Name
    message
    Type
    string
    Description
    the error message if not successful
  • Name
    success
    Type
    boolean Required
    Description
    if successful, will be true. if not successful, will be false and message will contain a human readable error message

5xx Response

  • Name
    code
    Type
    string
    Description
    The error code
  • Name
    documentation_url
    Type
    string
    Description
    An optional link to the documentation for the error
  • Name
    message
    Type
    string
    Description
    the error message if not successful
  • Name
    success
    Type
    boolean Required
    Description
    if successful, will be true. if not successful, will be false and message will contain a human readable error message

Example Request

GET
/v3/report/payment
curl https://api.shopmonkey.cloud/v3/report/payment \ 
  -H "Authorization: Bearer ${SM_TOKEN}"

Example Response
application/json

{
  "success": true,
  "data": [
    {
      "id": "id",
      "orderId": "orderId",
      "recordedDate": null,
      "note": "note",
      "paymentType": "paymentType",
      "amountCents": 1,
      "cardType": null,
      "order": {
        "id": "id",
        "number": 1,
        "name": null,
        "generatedVehicleName": null,
        "totalCostCents": 1,
        "paidCostCents": 1,
        "remainingCostCents": null
      },
      "location": {
        "id": "id",
        "name": "name"
      },
      "payer": {
        "firstName": null,
        "lastName": null,
        "companyName": null,
        "normalizedFirstName": null,
        "normalizedLastName": null
      }
    }
  ]
}

GET/v3/report/payment/transaction

Payment Transactions report

Payment transactions report, for operations paid by card (using the payment provider)

200 Response

  • Name
    code
    Type
    string
    Description
    The error code
  • Name
    data
    Type
    array Required
    Description
  • Name
    documentation_url
    Type
    string
    Description
    An optional link to the documentation for the error
  • Name
    meta
    Type
    object
    Description
  • Name
    success
    Type
    boolean Required
    Description

Properties for meta object

  • Name
    hasMore
    Type
    boolean Required
    Description
    if there are more records available
  • Name
    sums
    Type
    object
    Description
  • Name
    total
    Type
    number Required
    Description
    the total number of records
  • Name
    totalAmount
    Type
    number
    Description
  • Name
    totalFee
    Type
    number
    Description
  • Name
    totalNet
    Type
    number
    Description

4xx Response

  • Name
    code
    Type
    string
    Description
    The error code
  • Name
    documentation_url
    Type
    string
    Description
    An optional link to the documentation for the error
  • Name
    message
    Type
    string
    Description
    the error message if not successful
  • Name
    success
    Type
    boolean Required
    Description
    if successful, will be true. if not successful, will be false and message will contain a human readable error message

5xx Response

  • Name
    code
    Type
    string
    Description
    The error code
  • Name
    documentation_url
    Type
    string
    Description
    An optional link to the documentation for the error
  • Name
    message
    Type
    string
    Description
    the error message if not successful
  • Name
    success
    Type
    boolean Required
    Description
    if successful, will be true. if not successful, will be false and message will contain a human readable error message

Example Request

GET
/v3/report/payment/transaction
curl https://api.shopmonkey.cloud/v3/report/payment/transaction \ 
  -H "Authorization: Bearer ${SM_TOKEN}"

Example Response
application/json

{
  "success": true,
  "data": [
    {
      "id": "id",
      "createdDate": "createdDate",
      "paymentMode": "paymentMode",
      "amountCents": 1,
      "cardType": null,
      "cardDigits": null,
      "provider": null,
      "providerFee": null,
      "net": 1,
      "order": {
        "id": "id",
        "number": 1,
        "name": null
      },
      "location": {
        "id": "id",
        "name": "name"
      },
      "payer": {
        "id": "id",
        "firstName": null,
        "lastName": null,
        "normalizedFirstName": null,
        "normalizedLastName": null
      }
    }
  ]
}

GET/v3/report/payment/payout

Payouts report

Payouts from SM Payments to the Shop report

200 Response

  • Name
    code
    Type
    string
    Description
    The error code
  • Name
    data
    Type
    array Required
    Description
  • Name
    documentation_url
    Type
    string
    Description
    An optional link to the documentation for the error
  • Name
    meta
    Type
    object
    Description
  • Name
    success
    Type
    boolean Required
    Description

Properties for meta object

  • Name
    hasMore
    Type
    boolean Required
    Description
    if there are more records available
  • Name
    sums
    Type
    object
    Description
  • Name
    total
    Type
    number Required
    Description
    the total number of records
  • Name
    availableCents
    Type
    number
    Description
  • Name
    inTransitCents
    Type
    number
    Description
  • Name
    pendingCents
    Type
    number
    Description
  • Name
    totalCents
    Type
    number
    Description

4xx Response

  • Name
    code
    Type
    string
    Description
    The error code
  • Name
    documentation_url
    Type
    string
    Description
    An optional link to the documentation for the error
  • Name
    message
    Type
    string
    Description
    the error message if not successful
  • Name
    success
    Type
    boolean Required
    Description
    if successful, will be true. if not successful, will be false and message will contain a human readable error message

5xx Response

  • Name
    code
    Type
    string
    Description
    The error code
  • Name
    documentation_url
    Type
    string
    Description
    An optional link to the documentation for the error
  • Name
    message
    Type
    string
    Description
    the error message if not successful
  • Name
    success
    Type
    boolean Required
    Description
    if successful, will be true. if not successful, will be false and message will contain a human readable error message

Example Request

GET
/v3/report/payment/payout
curl https://api.shopmonkey.cloud/v3/report/payment/payout \ 
  -H "Authorization: Bearer ${SM_TOKEN}"

Example Response
application/json

{
  "success": true,
  "data": [
    {
      "id": "id",
      "createdDate": "createdDate",
      "updatedDate": "updatedDate",
      "arrivalDate": null,
      "companyId": "companyId",
      "locationId": "locationId",
      "provider": "provider",
      "amountCents": 1,
      "status": "status",
      "description": null,
      "error": null,
      "location": {
        "id": "id",
        "name": "name"
      }
    }
  ]
}

GET/v3/integration/shared_payment/:id/pdf

Download PDF

Get an payment as PDF document

URL parameters

  • Name
    id
    Type
    string Required
    Description
    the id for the object

Example Request

GET
/v3/integration/shared_payment/:id/pdf
curl https://api.shopmonkey.cloud/v3/integration/shared_payment/ID/pdf \ 
  -H "Authorization: Bearer ${SM_TOKEN}"

POST/v3/integration/shared_payment/:id/email

Send Payment Receipt

Send a payment receipt to customers

URL parameters

  • Name
    id
    Type
    string Required
    Description
    the id for the object

Body parameters

  • Name
    emailIds
    Type
    array Required
    Description
    An array of ids of customers emails

Example Request
application/json

POST
/v3/integration/shared_payment/:id/email
curl https://api.shopmonkey.cloud/v3/integration/shared_payment/ID/email \ 
  -H "Authorization: Bearer ${SM_TOKEN}" \ 
  -X POST -H 'Content-Type: application/json' \ 
  --data '{ "emailIds" : [] }'