Shell Python Node PHP C# Ruby

Chargebacks and Rejects


Bank Account Rejects

curl "https://api.payload.co/transactions/?status=rejected&rejected_on=>2020-02-01" \
    -u secret_key_3bW9JMZtPVDOfFNzwRdfE:
rejected_payments = pl.Payment.filter_by(
    pl.attr.status=='rejected',
    pl.attr.rejected_on>=datetime.date(2020,1,1)
)

for payment in rejected_payments:
    print(payment.status_code)
rejected_payments = Payload::Payment.select(
    status: 'rejected',
    rejected_on: '>2020-01-01'
)

for payment in rejected_payments
    puts payment.status_code
end
<?php
$rejected_payments = Payload\Transaction::filter_by(
    pl::attr()->status->eq('rejected'),
    pl::attr()->rejected_on->gt('2020-01-01')
);

foreach( $rejected_payments as $payment ) {
    echo $payment->status_code;
}
?>
pl.Payment.select(
    pl.attr.status.eq('rejected'),
    pl.attr.rejected_on.gt(new Date(2020,1,1))
).then(function(rejected_payments){
    for ( var i = 0; i < rejected_payments.length; i++ ) {
        var payment = rejected_payments[i]
        console.log( payment.status_code )
    }
})
var rejected_payments = pl.Payment.filter_by(
    pl.attr.status.eq("rejected"),
    pl.attr.rejected_on.ge(new DateTime(2020,1,1))
);

foreach( var payment in rejected_payments )
    Console.WriteLine( payment.status_code );

Bank account payments can be rejected by the bank for reasons like insufficient funds or incorrect account number a few days after they were originally processed.

Payload provides a few options to mitigate rejects but they can still occur. By default, Payload validates the banking information with various banking networks to confirm the account is open, active, and in good standing. Even if a bank validates the account number, they may still block incoming transactions which would result in a "Non-Transaction Account" rejection.

You can also use our built-in Plaid integration to capture and validate bank account details, and confirm available balance. See our section on integrating with Plaid.


Chargebacks

curl "https://api.payload.co/transactions/?type=chargeback&created_at=>2020-01-01&fields=*,ledger" \
    -u secret_key_3bW9JMZtPVDOfFNzwRdfE:
chargebacks = pl.Chargeback.select(
        pl.attr.ledger,
        *pl.Transaction
    )\
    .filter_by(
        created_at=datetime.date(2020,1,1)
    )


for chargeback in chargebacks:
    print(chargeback.ledger[0].assoc_transaction_id)
    # The id of the associated payment
chargebacks = Payload::Chargeback.select(
    created_at: '>2020-01-01',
    fields: '*,ledger'
)

for chargeback in chargebacks
    puts chargeback.ledger[0].assoc_transaction_id
    # The id of the associated payment
end
<?php
$chargebacks = Payload\Chargeback::select(
        '*', 'ledger'
    )->filter_by(
        pl::attr()->created_at->gt('2020-01-01')
    );

foreach( $chargebacks as $chargeback ) {
    echo $chargeback->ledger[0]->assoc_transaction_id;
    # The id of the associated payment
}
?>
pl.Chargeback.select(
    '*', pl.attr.ledger
).filter_by(
    pl.attr.created_at.gt(new Date(2020,1,1))
).then(function(chargebacks){
    for ( var i = 0; i < chargebacks.length; i++ ) {
        var chargeback = chargebacks[i]
        console.log( chargeback.ledger[0].assoc_transaction_id )
        // The id of the associated payment
    }
})

var chargebacks = pl.Chargeback.select(
        "*", pl.attr.ledger,
    )
    .filter_by(new {
        created_at=new DateTime(2020,01,01)
    });


foreach ( var chargeback in chargebacks ) {
    Console.WriteLine( chargeback.ledger[0].assoc_transaction_id );
    // The id of the associated payment
}

A chargeback can result if a customer disputes a payment. This can happen for reasons like suspected fraud, a claim of services not rendered, or unauthorized payment. Chargebacks will result in the bank reversing the original payment. If a dispute is fought and overturned, the funds will be returned as a chargeback_reversal transaction type.

Chargebacks have a transaction type of chargeback and are associated with the original payment through the ledger.

Your disputes can be managed through the disputes dashboard.