Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Path Parameters
Customer ID
Body
application/json
Response
The response is of type object
.
import DodoPayments from 'dodopayments';
const client = new DodoPayments({
bearerToken: 'My Bearer Token',
});
const customerWallet = await client.customers.wallets.ledgerEntries.create('customer_id', {
amount: 0,
currency: 'AED',
entry_type: 'credit',
});
console.log(customerWallet.customer_id);
{
"balance": 123,
"created_at": "2023-11-07T05:31:56Z",
"currency": "AED",
"customer_id": "<string>",
"updated_at": "2023-11-07T05:31:56Z"
}
Create a credit or debit ledger entry in a customer’s wallet.
import DodoPayments from 'dodopayments';
const client = new DodoPayments({
bearerToken: 'My Bearer Token',
});
const customerWallet = await client.customers.wallets.ledgerEntries.create('customer_id', {
amount: 0,
currency: 'AED',
entry_type: 'credit',
});
console.log(customerWallet.customer_id);
{
"balance": 123,
"created_at": "2023-11-07T05:31:56Z",
"currency": "AED",
"customer_id": "<string>",
"updated_at": "2023-11-07T05:31:56Z"
}
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Customer ID
The response is of type object
.
Was this page helpful?