This repository has been archived by the owner on Oct 15, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Refunds
Matheus B. Nakaya edited this page Jul 5, 2018
·
7 revisions
That is the scariest topic for the seller. 😨
But relax... It will not hurt, I promise!
We know, when its happening is very bad. But don't worry, we have a excellent risk analysis team, and we work hard to give you all security that you need to be happy and worry only about your business. 🤑🎉
Index
Authorization | able |
---|---|
Basic Auth | ✅ |
OAuth | ✅ |
Map<String, Object> newRefund = refund.refundPayment("payment_id", setup);
Map<String, Object> taxDocument = new HashMap<>();
taxDocument.put("type", "CPF");
taxDocument.put("number", "57390209674");
Map<String, Object> holder = new HashMap<>();
holder.put("fullname", "Jose Silva");
holder.put("taxDocument", taxDocument);
Map<String, Object> bankAccount = new HashMap<>();
bankAccount.put("type", "CHECKING");
bankAccount.put("bankNumber", "001");
bankAccount.put("agencyNumber", 4444444);
bankAccount.put("agencyCheckNumber", 2);
bankAccount.put("accountNumber", 1234);
bankAccount.put("accountCheckNumber", 1);
bankAccount.put("holder", holder);
Map<String, Object> refundingInstrument = new HashMap<>();
refundingInstrument.put("method", "BANK_ACCOUNT");
refundingInstrument.put("bankAccount", bankAccount);
Map<String, Object> refundBankAccount = new HashMap<>();
refundBankAccount.put("refundingInstrument", refundingInstrument);
Map<String, Object> newRefund = refund.refundPayment(refundBankAccount, "payment_id", setup);
Map<String, Object> moipAccount = new HashMap<>();
moipAccount.put("id", "moip_account_id");
Map<String, Object> refundingInstrument = new HashMap<>();
refundingInstrument.put("method", "MOIP_ACCOUNT");
refundingInstrument.put("moipAccount", moipAccount);
Map<String, Object> refundMoipAccount = new HashMap<>();
refundMoipAccount.put("amount", "500");
refundMoipAccount.put("refundingInstrument", refundingInstrument);
Map<String, Object> newRefund = refund.refundPayment(refundMoipAccount, "payment_id", setup);
Authorization | able |
---|---|
Basic Auth | ✅ |
OAuth | ✅ |
Map<String, Object> newRefund = refund.refundOrder("order_id", setup);
Map<String, Object> taxDocument = new HashMap<>();
taxDocument.put("type", "CPF");
taxDocument.put("number", "57390209674");
Map<String, Object> holder = new HashMap<>();
holder.put("fullname", "Jose Silva");
holder.put("taxDocument", taxDocument);
Map<String, Object> bankAccount = new HashMap<>();
bankAccount.put("type", "CHECKING");
bankAccount.put("bankNumber", "001");
bankAccount.put("agencyNumber", 4444444);
bankAccount.put("agencyCheckNumber", 2);
bankAccount.put("accountNumber", 1234);
bankAccount.put("accountCheckNumber", 1);
bankAccount.put("holder", holder);
Map<String, Object> refundingInstrument = new HashMap<>();
refundingInstrument.put("method", "BANK_ACCOUNT");
refundingInstrument.put("bankAccount", bankAccount);
Map<String, Object> refundBankAccount = new HashMap<>();
refundBankAccount.put("refundingInstrument", refundingInstrument);
Map<String, Object> newRefund = refund.refundOrder(refundBankAccount, "order_id", setup);
Map<String, Object> moipAccount = new HashMap<>();
moipAccount.put("id", "moip_account_id");
Map<String, Object> refundingInstrument = new HashMap<>();
refundingInstrument.put("method", "MOIP_ACCOUNT");
refundingInstrument.put("moipAccount", moipAccount);
Map<String, Object> refundMoipAccount = new HashMap<>();
refundMoipAccount.put("amount", "500");
refundMoipAccount.put("refundingInstrument", refundingInstrument);
Map<String, Object> newRefund = refund.refundOrder(refundMoipAccount, "order_id", setup);
Authorization | able |
---|---|
Basic Auth | ✅ |
OAuth | ✅ |
Map<String, Object> getResponse = refund.get("refund_id", setup);
Authorization | able |
---|---|
Basic Auth | ✅ |
OAuth | ✅ |
Map<String, Object> listPaymentRefundResponse = refund.listPaymentRefunds("payment_id", setup);
Authorization | able |
---|---|
Basic Auth | ✅ |
OAuth | ✅ |
Map<String, Object> listOrderRefundsResponse = refund.listOrderRefunds("order_id", setup);