Billing

Make Payment

Make a payment for an invoice

post/api/users/@me/invoices/{id}/pay

Request

  • Base URL: https://nodesty.com
  • URL: https://nodesty.com/api/users/@me/invoices/{id}/pay
  • Auth: API key in header Authorization

Path parameters

idstring required
Example:1

Invoice ID

Request body

cardIdstring

Card ID to use for payment. Only available when paymentMethod is CARD or FIRST_AVAILABLE and system balance is insufficient

paymentMethod'FIRST_AVAILABLE' | 'CARD' | 'BALANCE'

Example request

{
  "cardId": "pm_1234567890"
}

Response

Payment methods for the user

paymentMethodUsed'CARD' | 'BALANCE'

Payment method used

successboolean

Whether the payment was successful

Example response

{
  "cardDetails": {
    "brand": "visa",
    "id": "pm_1234567890",
    "last4": "4242"
  },
  "paymentMethodUsed": "CARD",
  "success": true
}

Changes

No recorded changes to this operation across all 3 revisions of this API.