-
Notifications
You must be signed in to change notification settings - Fork 67
Open
Description
Getting an error when creating a new Disbursement
import xendit from "xendit-node";
const x = new xendit({
secretKey: DEVELOPMENT_KEY,
});
const { Disbursement } = x;
const disbursementSpecificOptions = {};
const d = new Disbursement(disbursementSpecificOptions);
const disbursementData = {
externalID: `disb-${unique_id}`,
amount: 25,
bankCode: "PH_GCASH",
accountHolderName: "John Doe",
accountNumber: "09971234567",
description: "Sample disbursement",
};
const resp = await d.create(disbursementData);
The error that I get is this, only this.
{ status: 400, code: 'API_VALIDATION_ERROR', message: 'There was an error with the format submitted to the server.' }
I also tried using the default data but still getting the same error
d.create({
externalID: 'your-external-tracking-ID',
bankCode: 'BCA',
accountHolderName: 'Stan',
accountNumber: '1234567890',
description: 'Payment for nasi padang',
amount: 10000,
})
I'm no longer sure which format is wrong, I double check the data and all of them are in the correct format
Metadata
Metadata
Assignees
Labels
No labels