POST
/
credit-transactions
curl --request POST \
  --url https://eu.sequencehq.com/api/credit-transactions \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --header 'On-Behalf-Of: <on-behalf-of>' \
  --data '{
  "grantId": "746fc7f2-8098-4fe7-953c-7d51c580a126",
  "reason": "Refund",
  "invoiceId": "6cedbb5e-4f77-4217-b8d4-020e7e4d33c9",
  "billingRunId": "cbe82021-90bb-47cc-a665-eda41ec4ee5b",
  "type": "DEBIT",
  "amount": "10"
}'
{
  "id": "4a1da26e-4f4a-4607-9597-9652138afcf1",
  "grantId": "746fc7f2-8098-4fe7-953c-7d51c580a126",
  "reason": "Refund",
  "invoiceId": "6cedbb5e-4f77-4217-b8d4-020e7e4d33c9",
  "billingRunId": "cbe82021-90bb-47cc-a665-eda41ec4ee5b",
  "type": "DEBIT",
  "amount": "10",
  "createdAt": "2022-10-07T14:12:08.826121Z"
}

Headers

Authorization
string
required

Your API credentials. Eg. Basic {credentials}.

On-Behalf-Of
string
required

The Sequence account that this request is made on behalf of.

Sequence-Version
enum<string>

Use this header to select an API version

Available options:
2024-07-30

Body

application/json
grantId
string
required

Credit Grant ID

Example:

"746fc7f2-8098-4fe7-953c-7d51c580a126"

type
string
required

Credit Transaction Type

Example:

"DEBIT"

amount
string
required

Number of units added or consumer

Example:

"10"

reason
string

Transaction Reason

Example:

"Refund"

invoiceId
string

Invoice ID where Credit was consumed

Example:

"6cedbb5e-4f77-4217-b8d4-020e7e4d33c9"

billingRunId
string

Billing Run ID where Credit was consumed

Example:

"cbe82021-90bb-47cc-a665-eda41ec4ee5b"

Response

201
application/json
Created
grantId
string
required

Credit Grant ID

Example:

"5a0faea3-7ad5-4a83-a420-09bb6576f7e6"

type
string
required

Credit Transaction Type

Example:

"CREDIT"

amount
string
required

Number of units added or consumed

Example:

"10"

date
string
required

Date of transaction

Example:

"2024-01-01"

id
string

Credit Transaction ID

Example:

"c770d296-ef09-459b-b8dd-42c334e00dab"

reason
string

Transaction Reason

Example:

"because"

invoiceId
string

Invoice ID where Credit was consumed

Example:

"c6864c69-42a3-4966-8c22-1c56d7375a05"

billingRunId
string

Billing Run ID where Credit was consumed

Example:

"e95256be-08e7-4585-b3c7-fa9928aacd90"