API
Log In Support
  • Clear

    • Get Started

      • Overview

      • Platform Sign Up

      • API Basics

    • Integration

      • Setup Platform

      • Onboard Merchants

      • Enable Merchants

      • Process Payments

      • Payout Merchants

      • Manage Payment Operations

      • Test and Launch

  • Link

    • Get Started

      • Overview

      • Platform Sign Up

      • API Basics

    • Integration

      • Setup Platform

      • Onboard Merchants

      • Process Payments

      • Manage Payment Operations

      • Test and Launch

    • CARD PRESENT SOLUTIONS

      • Get Started

        • Overview

      • Terminals

        • Acquire Terminals

        • Onboard Terminals

        • Authorize Cards

        • Process Payments

        • Test and Launch

      • Mobile Card Readers

        • Build Mobile App Prerequisites

        • Acquire Mobile Card Readers

        • Pair A Device

        • Authorize Cards

        • Process Payments

        • Test and Launch

      • Card Present Resources

        • Provide Receipts

    • API Reference

    • Resources

      • Payment Life Cycles

      • Server to Server Integration

      • Platform Legal Certification

      • Security Certification

      • Risk Certification

      • CIP and KYC Certification

      • Card Network Rules

      • Disputes Deep Dive

    • Cookbooks

      • Build Payment Support Tools

      • Reporting

      • Implement Merchant IC+ Pricing Model

      • Recurring Billing

      • Level 2 & Level 3 Processing

      • Style Credit Card iFrames

      • Support Merchants Outside the United States

      • Support Multilocation Merchants

      • Connect Merchants With SSO

      • Design A Retry Strategy

    • Release Notes

Home / Link Overview / Manage Payment Operations

 

Manage Payment Operations

 

Now that you’ve onboarded merchants and begun processing Chase Integrated Payments, you’re ready to implement some basic payment operations tools.

In This Section
  • Issue Refunds
  • Cancel Authorized Payments
  • Reflect Adjustments
  • Fetch Recoveries
  • Handle Disputes

Issue Refunds

 

Merchants can issue refunds from their Chase Integrated Payments dashboard, or your platform can assist in this function using the POST /refunds API.

In order to issue a refund against a Payment, the Payment must:

  • Not already be fully refunded or disputed
  • Be less than 60 days old (unless your platform has a custom refund limit; in that case, use that number in this statement)

With the refunds endpoint, it’s possible to perform partial refunds or full refunds. Please note that WePay and platform fees are refunded only in full refunds; if a partial refund is issued and your platform has not explicitly opted to refund platform fees, then the amount sent in the refund request will come from the merchant.

If you’ve subscribed to refund notifications, WePay will send a notification to your platform when a refund occurs.

To issue a refund, you’ll need to make sure you have a few things handy:

  • Payment ID
  • Refund Reason
  • Amount (could be a partial of the whole transaction, up to the whole transaction value itself)
  • Fee amount to return
  • Currency

Note

When a Payment using a card from a different currency from the merchant’s currency (i.e. a card in the UK paying a merchant in the United States) is refunded, exchange rates will come in to play. At the time of initial payment, the exchange rate at that time is applied. When a Refund is issued, the exchange rate might be different and that exchange rate will be applied to the Refund. As such, the refunded amount that the payer receives back may be greater or less than the initial amount paid.

Send a POST, with a Unique-Key, similar to the one below:

{
  "payment_id": "00000000-0000-0000-0000-000006fcd875",
  "refund_reason": "delayed shipping",
  "amounts": {
	"total_amount": 100,
	"currency": "USD",
	"fee_refund_amount": 0
  }
}

Send a POST like this (including a Unique-Key) to issue a partial refund of the net and to include all or some of the platform fees in that refund:

{
  "payment_id": "00000000-0000-0000-0000-000006fcd875",
  "refund_reason": "delayed shipping",
  "amounts": {
	"total_amount": 100,
	"currency": "USD",
	"fee_refund_amount": 50
  }
}

As a note, if your Merchant’s account is below $0, WePay will attempt to execute a recovery to bring the account back up to $0. We’ll send a notification to your platform if we execute a Recovery.

Note

It is the merchant’s responsibility to post their refund policy. WePay recommends that your platform provides a method for merchants to post their refund policy through your UI.


Cancel Authorized Payments

 

In the Process Chase Integrated Payments article, we discussed how to capture an authorized payment. There may be instances where a payment has been authorized but needs to be canceled, as opposed to captured. In these instances, use the POST /payments/{id}/cancel API request. For this request you will need:

  1. The payment ID
  2. The cancellation reason

Once you have those details, send a request like so:

curl -X POST \
 /payments/21763483-12be-4d07-afe3-ab81a962f3e5/cancel \ // Use the payment ID in the endpoint
 -H "App-Id: 121212" \
 -H "App-Token: prod_MTAwXzk5OWIwZT666LWYwNWItNDU4MS1iZjBiL" \
 -H "Api-Version: 3.0" \
 -H "Content-Type: application/json" \
 -H "WePay-Risk-Token: 123e4567-e89b-12d3-a456-426655440000" \  // Insert the token returned by the WePay JS
 -H "Client-IP: 100.166.99.123" \  // Insert the IP returned by the WePay JS
 -d '{
 	"cancel_reason": "Payer decided to cancel prior to shipment"
 }'

The request response will include "status": "canceled".

Warning

Payments processed through our Card Present Solutions can only be canceled within 90 minutes of the authorization.


Reflect Adjustments

 

On occasion, WePay will need to make an Adjustment to a merchant’s Account. Common scenarios which call for Adjustments include:

  • Received payment from merchant to resolve a negative balance
  • Resolve miscalculation of fees
  • Resolve appeasements

We’ve listed Adjustment API reason codes to clearly identify each individual Adjustment.

Tracking Adjustments is important to keep your platform’s account history consistent with WePay records. Since Adjustments originate on WePay’s end, your platform needs to subscribe to the adjustments.created Notification topic. An adjustments.created Notification will look something like this:

{
  "id": "8aaba37b-8f27-4899-9ffa-40e94b36da91",
  "resource": "notifications",
  "path": "/notifications/8aaba37b-8f27-4899-9ffa-40e94b36da91",
  "owner": {
    "id": "121212",
    "resource": "applications",
    "path": null
  },
  "topic": "adjustments.created",
  "event_time": 1568920734,
  "payload": {
    "amount": 1000,
    "create_time": 1520471380,
    "currency": "USD",
    "custom_data": null,
    "id": "9fed5d2f-3957-412c-9f30-efabcc2b5405",
    "owner": {
      "id": "46f481b3-a267-48e5-b6b6-e7685d3031f8",
      "path": "/accounts/46f481b3-a267-48e5-b6b6-e7685d3031f8",
      "resource": "accounts"
    },
    "path": "/adjustments/9fed5d2f-3957-412c-9f30-efabcc2b5405",
    "reason": {
      "reason_code": "REIMBURSEMENTS_AND_CORRECTIONS",
      "reason_message": "Adjustment for reimbursement or corrections.",
      "details": [{
        "detail_code": "bank_overdraft_fee",
        "detail_message": "Reimbursement of Bank Overdraft Fee."
      }]
    },
    "resource": "adjustments",
    "txnr_adjustment": {
      "id": "80027dfa-39a2-4d6e-ac7a-024c61340bc2",
      "path": "/transaction_records/80027dfa-39a2-4d6e-ac7a-024c61340bc2",
      "resource": "transaction_records"
    },
    "type": "credit",
    "api_version": "3.0"
  }
}

Fetch Recoveries

 

Recoveries are the mechanism by which merchants’ WePay Account balances are kept whole.

When a negative balance occurs (due to a refund, for example) and any incoming payments do not bring the balance to a minimum of $0.00, a Recovery will pull the amount needed to reach $0.00 from the merchant’s active Payout Method.

Recoveries begin on the business day following the negative balance. This gives time for incoming payments to resolve the negative balance. For example, if a refund is issued on Monday, 10/22 and brings the balance negative, and if the balance is still negative on Tuesday, 10/23, then a Recovery will begin on 10/23.

Below are a few scenarios dealing with Recoveries:

Balance on Monday, 10/22 Event(s) on 10/22 New Balance Recovery on Tuesday, 10/23
$0.00 Refund for $25.00 -$25.00 $25.00
-$25.00 Payment for $100.00 $75.00 N/A
$25.00
  • Dispute for $100.00
  • Payment for $25.00
-$25.00 $25.00

You must subscribe to the recoveries.created Notification event topic in order to be notified when a Recovery occurs.


Handle Disputes

 

Disputes are a normal part of credit card processing. With a Link integration, WePay will notify merchants when a Dispute occurs, and they can respond through their merchant center. Your platform should subscribe to the following Notifications in order to keep your platform functions coordinated with WePay data:

  • disputes.created
  • disputes.resolved
  • disputes.updated

Note

When a Payment using a card from a different currency from the merchant’s currency (i.e. a card in the UK paying a merchant in the United States) receives a Dispute, exchange rates will come in to play. At the time of initial payment, the exchange rate at that time is applied. When a Dispute occurs, the exchange rate might be different and that exchange rate will be applied to the Dispute. As such, the disputed amount may be greater or less than the initial amount paid.


Next Up: Test and Launch

Review your integration and go through a thorough round of testing.

  • Use WePay’s magic API behavior
  • Review test items
  • Review requirements for launch

 

Test and Launch

 


Questions? Need help? Visit our support page!

Company

  • About
  • Careers
  • Blog
  • News & Events

Resources

  • Knowledge Center
  • Terms of Service
  • Privacy Policy
  • Security
  • Support

Developers

  • Documentation
  • Engineering Blog

Customers

  • Case Studies

Product

  • Link
  • Clear
  • Core
  • Contact Sales
© 2020 WePay Inc.