Direct Merchants To Self-Serve

BETA

The Link offering is currently in BETA.

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

Operational tasks like issuing refunds, responding to disputes, and looking up transactional details can all be accomplished from the WePay Merchant Center. Find out more in our Merchant Center Feature Guide.

Keep in mind that platform's support team needs to be ready to respond if your users need assistance. Your support team can leverage the WePay Partner Center for most support-related activities like financial reporting, merchant reports, and viewing api logs. See our Partner Center Feature Guide for an in-depth view of these offerings.


Here, you'll see how to accomplish these kinds of self-serve tasks on behalf of your merchants via the API.

Issue Refunds

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

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

  • Have a status of completed
  • 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)

Additionally, the refund amount must be 100 or greater.

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 (must be greater than $1.00), 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.

Create a refund by sending a POST /refunds request, with a Unique-Key, similar to the one below:

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

Send a request 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:

Copy
Copied
{
  "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 to update the payment. For this request you will need:

  1. The payment ID
  2. The cancellation reason

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

Copy
Copied
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".

Note

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:

Copy
Copied
{
  "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/22Event(s) on 10/22New BalanceRecovery on Tuesday, 10/23
$0.00Refund for $25.00-$25.00$25.00
-$25.00Payment for $100.00$75.00N/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.