Skip to content

Disbursement error in the format submitted to the server #175

@Peepersoak

Description

@Peepersoak

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions