Skip to main content

Update a billing statement

Updates a billing statement resource.


Endpoint

PUT /billing_statements/:id

Sample code

const client = require('payrex-node')('insert your PayRex Secret API key.');

const billingStatement = await client.billingStatements.update(
'<ID of a billing statement resource>',
{
customer_id: '<ID of a customer resource>',
}
);

Parameters

customer_id optional

The ID of a customer resource. To learn more about the customer resource, you can refer here.


description optional

An arbitrary string attached to the billing statement and copied over to its payment intent. This is a useful reference when viewing the payment resources associated with the billing statement from the PayRex Dashboard.

If the description is not modified, the default value is "Payment for Billing Statement <billing statement number>"


payment_settings REQUIRED

Set of key-value pairs that can modify the behavior of the payment processing for the billing statement.

Show child attributes

payment_methods array

The list of payment methods allowed to be processed by the payment intent of the billing statement. Possible values are card and gcash.


metadata optional

A set of key-value pairs you can attach to the resource. This can be useful for storing additional information about the billing statement in a hash format.

Once the billing statement is finalized, the latest value of its metadata will be copied to its payment intent.

Returns

Returns a Billing Statement resource.