RX Scripts Logo
Billing

Exports

All client- & serversided exports included within this script. Exports provide callable functions that allow other resources to interact with this script's functionality.
If additional exports are required for your implementation, please submit a formal request through our ticketing system on the official Discord server.

Server Exports

GetInvoiceById

Returns an invoice by its ID.

exports['RxBilling']:GetInvoiceById(invoiceId)
invoiceId
number required

ID of the invoice to retrieve.

GetPlayerInvoices

Returns all invoices for a player, optionally filtered by type and job name.

exports['RxBilling']:GetPlayerInvoices(identifier, invoiceType, jobName)
identifier
string required

Identifier of the player to retrieve invoices for.

invoiceType
'incoming' | 'outgoing' | 'jobSent' | 'jobIncoming' required

Type of the invoice to retrieve.

jobName
string

Name of the job to filter invoices by.

PayInvoice

Pays an invoice for a player, optionally updating the amount.

exports['RxBilling']:PayInvoice(playerId, invoiceId, newAmount)
playerId
number required

ID of the player to pay the invoice for.

invoiceId
number required

ID of the invoice to pay.

newAmount
number

New amount to pay.

SendInvoice

Sends an invoice from one player to another, optionally specifying a reason and whether it's a job invoice.

exports['RxBilling']:SendInvoice(fromPlayerId, sendTo, amount, reason, isJobInvoice)
fromPlayerId
number required

ID of the player sending the invoice.

sendTo
number required

ID of the player OR job name to send the invoice to.

amount
number required

Amount of the invoice.

reason
string

Reason for the invoice.

isJobInvoice
boolean

Whether the invoice is sent by job from the player.

Client Exports

PayInvoice

Pays an invoice for a player, optionally updating the amount.

exports['RxBilling']:PayInvoice(invoiceId, newAmount)
invoiceId
number required

ID of the invoice to pay.

newAmount
number

New amount to pay.

SendInvoice

Sends an invoice to the player or a job, optionally specifying a reason and whether it's a job invoice.

exports['RxBilling']:SendInvoice(sendTo, amount, reason, isJobInvoice)
sendTo
number required

ID of the player OR job name to send the invoice to.

amount
number required

Amount of the invoice.

reason
string

Reason for the invoice.

isJobInvoice
boolean

Whether the invoice is sent by job from the player.