Testing
Use the following credentials and values to test your integration with WePay's API prior to launch. Test in our staging environment:https://stage.wepay.com/
. Staging is an exact copy of our production environment, except that credit cards and bank accounts are not actually charged.Payment Method Test Credentials Overview
Credit card and bank account payment method test credentials allow you to safely test WePay's API in our stage environment without sending real credit card numbers, bank account numbers, or funds with your calls. The API will treat your stage calls with these credentials just as valid calls in production.
The payment method test credentials can be used as the value in:
- POST /payment_methods calls on the
credit_card.card_number
orpayment_bank_us.account_number
parameters, as appropriate. - POST /payments calls on the
payment_method.credit_card.card_number
orpayment_method.payment_bank_us.account_number
parameters as appropriate. - POST /payout_methods on the
payout_bank_ca.account_number
orpayout_bank_us.account_number
parameters as appropriate.
They can also be used in the appropriate parameters with the WePay Helper library.
Notes:
- Payments require the unique-id header
- Payments require an existing legal entity, account, and fulfilled capabilities and verifications
- Payout methods require an existing legal entity
- After payout methods have been created, payouts require fulfilled capabilities and verifications
Payment Method Test Credentials
Use any CVV/CVV2 number with these credit card numbers:
- Visa
- 4003830171874018
- 4111111111111111
- Mastercard
- 5496198584584769
- 2223000048400011
- 2223520043560014
- AmEx (A 4-digit CVV is required)
- 378282246310005
- 371449635398431
- Discover
- 6011111111111117
- 6011000990139424
- JCB
- 3530111333300000
- 3566002020360505
- Diners Club
- 30569309025904
- 38520000023237
- Credit funding source
- 4242424242424242
- Debit funding source
- 4000056655665556
- 6011981111111113 - prepaid
- 3566002020360505 - prepaid
Use any 3-17 digit bank account number with these Canadian Transit and Institution numbers:
- 00257, 596
- 00202, 899
- 00212, 369
Use any 3-17 digit bank account number with these US routing numbers:
- 021000021
- 011401533
- 091000019
Card Present Test Credentials
For non-mock, end-to-end testing of keyed entry flows, use the following cards and authorization values.
Use any future expiration date with these testing cards.
full numbers (16 digits) | brand | notes |
---|---|---|
4788 2500 0002 8291 | Visa | 5 0 digits |
4055 0111 1111 1111 | MasterCard | 11 1 digits |
6011 0009 9550 0000 | Discover | |
3714 4963 5398 431 | AmericanExpress | 15 digits expected |
Use these authorization amount values with the testing card values above:
Behavior | Parameters/Headers | Value | |
---|---|---|---|
Full approval | Amount | 203 | |
Partial approval (for 257 ) | Amount | 278 | |
Decline ("do not honor") | Amount | 966 |
KYC Test Credentials
In order to fully test a WePay integration end-to-end in the stage environment, you'll need to submit test KYC credentials. We've provided some pre-set test values for certain sensitive details:
US Test SSN:
- 555667777
Canadian Test SIN:
- 123–456–782
Test EIN:
- Any 9-digit number except 123456789
Test ITIN:
- 999-99-9990
Note, providing full social security number (ssn9) is required, even when the last four digits (ssn4) are provided.
Magic Parameter Values Overview
Magic parameter values are used in the body of API calls and will trigger simulated behavior in the API response for testing purposes. For instance, to test out a payment flow where a payment synchronously fails, use1020
as the value for the amount
parameter in the body of the POST /payments call, and the response will have the status
parameter with a value of failed
:Argument
POST /payments
-H "App-Id: 121212" \
-H "App-Token: prod_MTAwXzk5OWIwZT666LWYwNWItNDU4MS1iZjBiL" \
-H "Api-Version: 3.0" \
-H "Content-Type: application/json" \
-d '{
"account_id": "e7e06537-0193-4933-949f-7de3e924f4ef",
"amount": 10661,
"currency": "USD",
"payment_method": {
"type": "token",
"token": {
"id": "5eb21dff-b917-4bdc-924c-fec4c1b5790f"
}
}
}'
Magic parameter values are outlined in the Magic Values section.
Magic Header Values Overview
On the other hand, magic header values trigger a given behavior by including a magic value for theWePay-Magic-Behavior
key in the call header. These calls will return static responses, regardless of the API request body that you send, and are intended to provide the full structure of a response under certain circumstances for you to model additional testing and development against. For instance, test the flow for looking up an adjustment by calling GET /adjustment/{id} using get_adjustment_type_credit
as the header value without actually having an adjustment ID in the request:Argument
curl -X (Method) \
(Path) \
-H "App-Id: 121212" \
-H "App-Token: prod_MTAwXzk5OWIwZT666LWYwNWItNDU4MS1iZjBiL" \
-H "Api-Version: 3.0" \
-H "Content-Type: application/json" \
-H "WePay-Magic-Behavior: "get_adjustment_type_credit" \
API calls in WePay's stage environment with magic key-value headers return static responses. If you include data in the body of your API requests, the data will be ignored and your API call will still return a static response.
Magic header values are also outlined in the Magic Values section.
Magic Values
Find the magic values to use in parameters and headers to trigger the behavior you'd like to test according to the resource:
- Accounts
- Verifications
- Capabilities
- Payments
- Payment Methods
- Refunds
- Payouts
- Payout Methods
- Adjustments
- Disputes
- Recoveries
- Tokens
- Transaction Records
- Notifications
- Merchant Interchange
- Underwriting
Accounts
Behavior | Headers | Value | Calls |
---|---|---|---|
See the API response structure to a GET /accounts call that allows your platform to create a new account owned by a legal entity. | Header: WePay-Magic-Behavior | get_account_fees | GET /accounts |
See the API response structure to a POST /accounts call that allows your platform to update a new account owned by a legal entity. | Header: WePay-Magic-Behavior | post_account_fees | POST /accounts |
See the API response structure to a GET /accounts/{id} call that returns a single account's pricing strategy. | Header: WePay-Magic-Behavior | get_accounts_id_fees | GET /accounts/{id} |
See the API response structure to a POST /accounts/{id} call that updates a single account's pricing strategy. | Header: WePay-Magic-Behavior | post_accounts_id_fees | POST /accounts/{id} |
Verifications
Behavior | Parameters/Headers | Value | Calls |
---|---|---|---|
Raise the additional_documents_required issue flag for the controller or additional_beneficial_owner sub-objects on a GET /legal_entities/{id}/verifications call. | Parameters: controller.name.last & additional_representatives.additional_representative_#.name.last | MagicNameDocsRequired | POST /legal_entities & POST /legal_entities/{id} |
Get a documents verified response on GET /legal_entities/{id}/verifications | Document Name: MagicDocNameDocVerify.png | 1. Follow the steps above to get the additional_documents_required issue flag. 2. Submit your app ID and a legal entity ID in our mock UI to upload a file called MagicDocNameDocVerify.png | |
Get a documents rejected response on GET /legal_entities/{id}/verifications | Document Name: MagicDocNameDocReject.png | 1. Follow the steps above to get the additional_documents_required issue flag. 2. Submit your app ID and a legal entity ID in our mock UI to upload a file called MagicDocNameDocReject.png | |
Raise the in_review issue flag for the controller or additional_beneficial_owner sub-objects on a GET /legal_entities/{id}/verifications call. | Parameters: controller.name.last & additional_representatives.additional_representative_#.name.last | MagicNameInReview | POST /legal_entities & POST /legal_entities/{id} |
Raise the additional_documents_required issue flag for the entity on a GET /legal_entities/{id}/verifications call. | Parameter: entity_name | MagicNameDocsRequired | POST /legal_entities & POST /legal_entities/{id} |
Raise the in_review issue flag for the entity on a GET /legal_entities/{id}/verifications call. | Parameter: entity_name | MagicNameInReview | POST /legal_entities & POST /legal_entities/{id} |
Capabilities
Behavior | Parameters/Headers | Value | Calls |
---|---|---|---|
Raise the in_review issue flag for the account's payment capability on a GET /accounts/{id}/capabilities call. | Parameter: name | MagicNamePaymentCapabilityInReview | POST /accounts & POST /accounts/{id} |
Raise the in_review issue flag for the account's payout capability on a GET /accounts/{id}/capabilities call. | Parameter: name | MagicNamePayoutCapabilityInReview | POST /accounts & POST /accounts/{id} |
See the API response structure to a lookup of a platforms capabilities that are not enabled. | Header: WePay-Magic-Behavior | account_blocked | GET /accounts/{id}/capabilities |
Payments
Behavior | Parameters/Headers | Value | Calls |
---|---|---|---|
Cause a payment to authorize but then be denied for fraud. | Parameter: amount | 361 & 10361 | POST /payments |
Cause a payment to be synchronously denied during authorization. | Parameter: amount | 661 & 10661 & any value between 100000 & 102000 | POST /payments |
Cause a payment to complete but then be reversed due to NSF/chargeback (within 5 minutes). | Parameter: amount | 961 & 10961 | POST /payments |
Cause an un-captured payment to cancel within 120 seconds (only for payments in which the auto_capture flag is set to false ). This behavior mimics the situation in which an authorization on a credit card expires because the funds have not been captured via a POST /payments/{id}/capture call within 7 days. | Parameter: amount | 76361 & 176361 | POST /payments |
See end results of the delayed capture feature without first creating a payment requiring capture. | Header: WePay-Magic-Behavior | post_payments_id_capture | POST /payments/{id}/capture |
See the API response structure of a payment lookup without first creating a payment. | Header: WePay-Magic-Behavior | get_payments | GET /payments |
See the API response structure to a POST /payments call with a credit card payment method submitted manually. | Header: WePay-Magic-Behavior | post_payments_credit_card_manual | POST /payments |
See the API response structure to a POST /payments call with a bank account payment method. | Header: WePay-Magic-Behavior | post_payments_payment_bank_us | POST /payments |
See the API response structure to a lookup of a payment with a credit card payment method submitted manually. | Header: WePay-Magic-Behavior | get_payments_id_credit_card_manual | GET /payments/{id} |
See the API response structure to a lookup of a payment with a bank account payment method. | Header: WePay-Magic-Behavior | get_payments_id_payment_bank_us | GET /payments/{id} |
See the API response structure to an update of a payment with custom data. | Header: WePay-Magic-Behavior | post_payments_id | POST /payments/{id} |
See the API response structure to a cancelation of a payment created with the auto_capture parameter set to false . | Header: WePay-Magic-Behavior | post_payments_id_cancel | POST /payments/{id}/cancel |
See the API response structure to a failed cancelation of a payment created with the auto_capture parameter set to false . | Header: WePay-Magic-Behavior | error_could_not_cancel | POST /payments/{id}/cancel |
See the API response structure to a capture of a payment created with the auto_capture parameter set to false . | Header: WePay-Magic-Behavior | post_payments_id_capture | POST /payments/{id}/capture |
See the API response for successfully creating a Deferred Payment with a valid future capture time. | Header: WePay-Magic-Behavior | post_payments_deferred_capture_valid | POST /payments |
See the API response for unsuccessfully creating a Deferred Payment due to an invalid capture time. | Header: WePay-Magic-Behavior | post_payments_deferred_capture_invalid_time | POST /payments |
See a successful manual capture of a Deferred Payment earlier than the indicated capture_time . | Header: WePay-Magic-Behavior | post_payments_deferred_capture_manual_valid | POST /payments/{id}/capture Note: No JSON request body required. |
See a look-up API response for a pending Deferred Payment. | Header: WePay-Magic-Behavior | get_payments_deferred_capture | GET /payments/{id} |
See the API response for unsuccessfully creating a Payment due to an invalid card number. | Header: WePay-Magic-Behavior | post_payments_invalid_card_number | POST /payments/{id} |
See the API response for unsuccessfully creating a Payment due to an incorrect CID number. | Header: WePay-Magic-Behavior | post_payments_incorrect_cid | POST /payments/{id} |
See the API response for unsuccessfully creating a Payment due to the card declining because it is reported stolen. | Header: WePay-Magic-Behavior | post_payments_decline_card_stolen | POST /payments/{id} |
See the API response for unsuccessfully creating a Payment due to the card declining for unknown reasons. | Header: WePay-Magic-Behavior | post_payments_decline_general | POST /payments/{id} |
See the API response for unsuccessfully creating a Payment due to the card expiring. | Header: WePay-Magic-Behavior | post_payments_card_expired | POST /payments/{id} |
See the API response for unsuccessfully creating a Payment due to the card being declined by processor for unknown reasons. | Header: WePay-Magic-Behavior | post_payments_processor_decline_general | POST /payments/{id} |
See the API response for unsuccessfully creating a Payment due to the transaction being declined for suspected fraud. | Header: WePay-Magic-Behavior | post_payments_testing | POST /payments/{id} |
See the API response for unsuccessfully creating a Deferred Payment due to an invalid amount. | Header: WePay-Magic-Behavior | post_payments_deferred_capture_invalid_amount | POST /payments/{id} |
For the next xxx seconds, all requests will return simulated 500 errors. Subsequent requests that are expected to return a 500 need to have the same unique key as the initial request. After xxx seconds have passed, requests will execute as normal. Define xxx with the amount of seconds of your choosing. Example: idempotency_downtime_60 | Header: WePay-Magic-Behavior | idempotency_downtime_xxx | POST /payments |
For the next xxx requests, all requests will return simulated 500 errors. Subsequent requests that are expected to return a 500 need to have the same unique key as the initial request. After xxx requests have executed, requests will execute as normal. Define xxx with the amount of requests of your choosing. Example: idempotency_retry_15 | Header: WePay-Magic-Behavior | idempotency_retry_xxx | POST /payments |
Payment Methods
Behavior | Header | Value | Calls |
---|---|---|---|
See results of a payment method credit card look up without first creating a credit card. | WePay-Magic-Behavior | credit_card_results | GET /payment_methods |
See results of a payment method bank account look up without first creating a payment bank. | WePay-Magic-Behavior | payment_bank_us_results | GET /payment_methods |
See results of a payment method lookup with no results. Note: API request body must be empty. | WePay-Magic-Behavior | empty_results | GET /payment_methods |
See results of a payment method lookup with multiple results. | WePay-Magic-Behavior | multiple_results | GET /payment_methods |
See results of a payment method credit card look up where the credit card status is unverified without first creating a credit card. Note: API request body must be empty. | WePay-Magic-Behavior | credit_card_unverified | GET /payment_methods/{id} |
See results of a payment method credit card look up where the credit card status is verified without first creating a credit card. Note: API request body must be empty. | WePay-Magic-Behavior | credit_card_verification_successful | GET /payment_methods/{id} |
See results of a payment method credit card look up where the credit card status is verification_failed without first creating a credit card. Note: API request body must be empty. | WePay-Magic-Behavior | credit_card_verification_failed | GET /payment_methods/{id} |
See results of a payment method credit card look up where the status is deleted without first creating a credit card. Note: API request body must be empty. | WePay-Magic-Behavior | credit_card_deleted | GET /payment_methods/{id} |
See results of a payment method bank account look up where the status is unverified without first creating a payment bank. Note: API request body must be empty. | WePay-Magic-Behavior | payment_bank_us_unverified | GET /payment_methods/{id} |
See results of a payment method bank account look up where the status is verified without first creating a payment bank. Note: API request body must be empty. | WePay-Magic-Behavior | payment_bank_us_verification_successful | GET /payment_methods/{id} |
See results of a payment method bank account look up where the status is failed without first creating a payment bank. Note: API request body must be empty. | WePay-Magic-Behavior | payment_bank_us_verification_failed | GET /payment_methods/{id} |
See results of a payment method bank account look up where the status is deleted without first creating a payment bank. Note: API request body must be empty. | WePay-Magic-Behavior | payment_bank_us_deleted | GET /payment_methods/{id} |
See results of creating a credit card payment method without sending a valid API request. Note: API request body must be present. | WePay-Magic-Behavior | credit_card | POST /payment_methods/{id} |
See results of creating a bank account payment method without sending a valid API request. Note: API request body must be present. | WePay-Magic-Behavior | payment_bank_us | POST /payment_methods/{id} |
See results of deleting a credit card payment method without first creating an object. Note: API request body must be empty. | WePay-Magic-Behavior | credit_card_deleted | DELETE /payment_methods/{id} |
See results of deleting a bank account payment method without first creating an object. Note: API request body must be empty. | WePay-Magic-Behavior | payment_bank_us_deleted | DELETE /payment_methods/{id} |
See results of a payment method lookup with mixed results. | WePay-Magic-Behavior | mixed_results | GET /payment_methods |
Refunds
Behavior | Header | Value | Calls |
---|---|---|---|
See API response structure of a refunds collection look up with status as completed . | WePay-Magic-Behavior | find_refunds_by_status_completed | GET /refunds |
See API response structure of a refunds collection look up with status as pending . | WePay-Magic-Behavior | find_refunds_by_status_pending | GET /refunds |
See API response structure of a refunds collection look up with status as failed . | WePay-Magic-Behavior | find_refunds_by_status_failed | GET /refunds |
See API response structure of a USD refund without first creating a payment to refund. | WePay-Magic-Behavior | create_refund_usd_currency | POST /refunds |
See API response structure of a CAD refund without first creating a payment to refund. | WePay-Magic-Behavior | create_refund_cad_currency | POST /refunds |
See API response structure of a refund to a credit card without first creating a payment to refund. | WePay-Magic-Behavior | create_refund_credit_card | POST /refunds |
See API response structure of a refund to a payment bank without first creating a payment to refund. | WePay-Magic-Behavior | create_refund_payment_bank_us | POST /refunds |
See API response structure of a completed refund without first creating a payment to refund. | WePay-Magic-Behavior | create_refund_status_completed | POST /refunds |
See API response structure of a pending refund without first creating a payment to refund. | WePay-Magic-Behavior | create_refund_status_pending | POST /refunds |
See API response structure of a failed refund without first creating a payment to refund. | WePay-Magic-Behavior | create_refund_status_failed | POST /refunds |
See API response structure of a USD refund lookup without first creating a refund. | WePay-Magic-Behavior | get_refund_usd_currency | GET /refunds/{id} |
See API response structure of a CAD refund lookup without first creating a refund. | WePay-Magic-Behavior | get_refund_cad_currency | GET /refunds/{id} |
See API response structure of a lookup of a refund to a credit card without first creating a refund. | WePay-Magic-Behavior | get_refund_credit_card | GET /refunds/{id} |
See API response structure of a lookup of a refund to a payment bank without first creating a refund. | WePay-Magic-Behavior | get_refund_payment_bank_us | GET /refunds/{id} |
See API response structure of a completed refund without first creating a refund. | WePay-Magic-Behavior | get_refund_status_completed | GET /refunds/{id} |
See API response structure of a pending refund without first creating a refund. | WePay-Magic-Behavior | get_refund_status_pending | GET /refunds/{id} |
See API response structure of a failed refund without first creating a refund. | WePay-Magic-Behavior | get_refund_status_failed | GET /refunds/{id} |
See API response structure of an update refund request with custom_data. | WePay-Magic-Behavior | modify_refund_with_custom_data | GET /refunds/{id} |
See API error when a refund fails due to time limit. | WePay-Magic-Behavior | error_payment_too_old | POST /refunds |
Payouts
Behavior | Header | Value | Calls |
---|---|---|---|
See API response structure of a payout collection lookup without first creating a collection of payouts. | WePay-Magic-Behavior | get_payouts | GET /payouts |
See API response structure of a payout lookup without first creating a payout. | WePay-Magic-Behavior | post_payouts_id | GET /payouts/{id} |
See API response structure of a single payout lookup. | WePay-Magic-Behavior | get_payouts_id | GET /payouts/{id} |
Payout Methods
Behavior | Header | Value | Calls |
---|---|---|---|
See API response structure of a payout method collection lookup without first creating a collection of payout methods. | WePay-Magic-Behavior | get_payout_methods | GET /payout_methods |
See API response structure to a request creating an ACH payout method without having to create a payout method. | WePay-Magic-Behavior | create_payout_methods_bank | POST /payout_methods |
See the currency mismatch API error response to a request creating a payout method without having to create a payout method. | WePay-Magic-Behavior | error_currency_mismatch | POST /payout_methods |
See API response structure to an ACH payment method lookup request. | WePay-Magic-Behavior | get_payout_methods_id_bank | GET /payout_methods/{id} |
See API response structure to a request updating a payout method. | WePay-Magic-Behavior | post_payout_methods_id | POST /payout_methods/{id} |
Adjustments
Behavior | Header | Value | Calls |
---|---|---|---|
See API response structure of a credit adjustment lookup request without having an adjustment ID to look up. | WePay-Magic-Behavior | get_adjustment_type_credit | GET /adjustments/{id} |
See API response structure of a debit adjustment lookup request without having an adjustment ID to look up. | WePay-Magic-Behavior | get_adjustment_type_debit | GET /adjustments/{id} |
Disputes
Behavior | Header | Value | Calls |
---|---|---|---|
See API response structure of a dispute collection lookup request with type set to chargeback . | WePay-Magic-Behavior | find_disputes_by_type_chargeback | GET /disputes |
See API response structure of a dispute collection lookup request with type set to inquiry . | WePay-Magic-Behavior | find_disputes_by_type_inquiry | GET /disputes |
See API response structure of a dispute collection lookup request with status set to resolved . | WePay-Magic-Behavior | find_disputes_by_status_resolved | GET /disputes |
See API response structure of a dispute collection lookup request with status set to pending_wepay_review . | WePay-Magic-Behavior | find_disputes_by_status_pending_wepay_review | GET /disputes |
See API response structure of a dispute collection lookup request with status set to awaiting_merchant_response . | WePay-Magic-Behavior | find_disputes_by_status_awaiting_merchant_response | GET /disputes |
See API response structure of a dispute collection lookup request with status set to awaiting_chargeback_decision . | WePay-Magic-Behavior | find_disputes_by_status_awaiting_chargeback_decision | GET /disputes |
See API response structure of a dispute lookup request with dispute's type set to chargeback . | WePay-Magic-Behavior | get_dispute_type_chargeback | GET /disputes/{id} |
See API response structure of a dispute lookup request with dispute's type set to inquiry . | WePay-Magic-Behavior | get_dispute_type_inquiry | GET /disputes/{id} |
See API response structure of a dispute lookup request with dispute's status set to awaiting_merchant_response . | WePay-Magic-Behavior | get_dispute_status_awaiting_merchant_response | GET /disputes/{id} |
See API response structure of a dispute lookup request with dispute's status set to pending_wepay_review . | WePay-Magic-Behavior | get_dispute_status_pending_wepay_review | GET /disputes/{id} |
See API response structure of a dispute lookup request with dispute's status set to resolved_won . | WePay-Magic-Behavior | get_dispute_status_resolved_won | GET /disputes/{id} |
See API response structure of a dispute lookup request with dispute's status set to resolved_lost . | WePay-Magic-Behavior | get_dispute_status_resolved_lost | GET /disputes/{id} |
See API response structure of a concede dispute request without having a dispute ID. | WePay-Magic-Behavior | dispute_concede_resolved_lost | POST /disputes/{id}/concede |
Recoveries
Behavior | Header | Value | Calls |
---|---|---|---|
See API response structure of a recovery collection lookup request with status set to completed . | WePay-Magic-Behavior | find_recoveries_by_status_completed | GET /recoveries |
See API response structure of a recovery collection lookup request with status set to pending . | WePay-Magic-Behavior | find_recoveries_by_status_pending | GET /recoveries |
See API response structure of a recovery collection lookup request with status set to failed . | WePay-Magic-Behavior | find_recoveries_by_status_failed | GET /recoveries |
See API response structure of a recovery lookup request with currency set to USD . | WePay-Magic-Behavior | get_recovery_usd_currency | GET /recoveries/{id} |
See API response structure of a recovery lookup request with currency set to CAD . | WePay-Magic-Behavior | get_recovery_cad_currency | GET /recoveries/{id} |
See API response structure of a recovery lookup request with status set to completed . | WePay-Magic-Behavior | get_recovery_status_completed | GET /recoveries/{id} |
See API response structure of a recovery lookup request with status set to pending . | WePay-Magic-Behavior | get_recovery_status_pending | GET /recoveries/{id} |
See API response structure of a recovery lookup request with status set to failed . | WePay-Magic-Behavior | get_recovery_status_failed | GET /recoveries/{id} |
See API response structure of an update recovery request with custom_data . | WePay-Magic-Behavior | modify_recovery_with_custom_data | POST /recoveries/{id} |
Tokens
Behavior | Header | Value | Calls |
---|---|---|---|
See structure of the API response to a request to create a payment method token. | WePay-Magic-Behavior | create_payment_methods_token | POST /tokens |
See structure of the API response to a request to create a payout method token. | WePay-Magic-Behavior | create_payout_methods_token | POST /tokens |
See structure of the API response to a request to create a legal entity token. | WePay-Magic-Behavior | create_legal_entities_token | POST /tokens |
See structure of the API response to a request that generates a session token which associates a mobile card reader with a merchant account. | WePay-Magic-Behavior | create_session_token | POST /session_tokens |
Transaction Records
Behavior | Header | Value | Calls |
---|---|---|---|
See API response structure to a transaction records collection lookup request. | WePay-Magic-Behavior | get_transaction_records | GET /transaction_records |
See API response structure to a transaction record lookup request. | WePay-Magic-Behavior | get_transaction_records_id | GET /transaction_records |
Notifications
Your stage WePay application must be subscribed to notification event topics in order to test notifications. Send aPOST /notification_preferences
request with a publicly accessible URL as the callback_uri
for each notification event topic.Notification Event Topic | Trigger |
---|---|
adjustments.created | Send 12262 in the amount parameter of a POST /payments request to trigger an adjustments.created notification with type=credit , create_time of when the magic value was sent, amount of 500, and with a payload message (detail_code, detail_message, reason_code, reason_message) related to revenue share disbursement. |
refunds.failed | 1. Create a Payment with amount greater than 100. 2. Send a POST /refunds request for that Payment with an amount value of 101 to trigger a refunds.failed notification. |
payment_methods.microdeposit_sent | 1. Send a POST /payment_methods request with type set to payment_bank_us and payment_bank_us.account_number set to 55555555 . 2. Fetch the microdeposit amounts from the Notification and use in a POST /payment_methods/{id}/verify_bank_deposits request. |
payouts.in_review | 1. Create an account with a minimum balance of 1. 2. Call POST /payout_methods with payout_bank_us.account_number as 44444444 and account_type as checking . 3. Attach the Payout Method to the Account with a POST /accounts/{id} request and the payout.currencies.US.period parameter set to daily . |
payouts.failed | 1. Create an account with a minimum balance of $3.61. 2. Call POST /payout_methods with payout_bank_us.account_number as 44444444 and type set to savings . 3. Attach the Payout Method with payout.currencies.US.period set to either weekly or monthly . |
disputes.created | Send a POST /payments request with amount as 109 and type as credit_card . This magic value does not support ACH payments. |
disputes.resolved | 1. Create a dispute using the magic parameter listed above. 2. Send a POST /disputes/{id}/concede request with that Dispute ID to resolve the Dispute for the payer. Alternative: Send a POST /disputes/{id} request with the WePay-Magic-Behavior header set to explanation to resolve the dispute for the merchant. |
recoveries.created | Send a POST /payments request with amount set to 161 . |
recoveries.failed | Send a POST /payments request with amount set to 369 . |
recoveries.completed | Send a POST /payments request with amount set to 261 . |
accounts.capabilities.updated | 1. Send a POST /accounts/{id}/capabilities request. Note: This notification will also send on a POST /accounts request since it activates the account's capabilities. |
accounts.created | 1. Send a POST /accounts request. |
accounts.negative_balance | 1. Create at least one payment for an account. 2. Set up payouts for the account with a daily payout period 3. After the payout is complete , create a refund for at least one of the payments. |
accounts.updated | 1. Create an account. 2. Send a POST /accounts/{id} request. |
disputes.funds_withdrawn | 1. Reach out to your WePay integration team or API Support api@wepay.com in order to test this notification. |
disputes.funds_reinstated | 1. Reach out to your WePay integration team or API Support api@wepay.com in order to test this notification. |
disputes.updated | 1. Reach out to your WePay integration team or API Support api@wepay.com in order to test this notification. |
legal_entities.created | 1. Send a POST /legal_entities request. |
legal_entities.updated | 1. Send a POST /legal_entities/{id} request. |
legal_entities.verifications.updated | 1. Send a POST /legal_entities request with "controller.name.last": "MagicNameDocsRequired" Note: This notification will also trigger on a POST /legal_entities request since it activates the legal entity's verifications. |
payment_methods.created | 1. Send a POST /payment_methods request. |
payment_methods.deleted | 1. Create a payment method. 2. Send a DELETE /payment_methods/{id} request. |
payment_methods.updated | 1. Create a payment method. 2. Send a POST /payment_methods/{id} request. |
payment_methods.verified | 1. Send a POST /payment_methods request with the credit_card type and "trigger_verification": true |
payments.created | 1. Send a POST /payments request. |
payments.completed | 1. Send a POST /payments request without any magic parameters or headers. |
payments.failed | 1. Send a POST /payments request with "amount": 361 |
payments.in_review | 1. Send a POST /payments request with "amount": 361 |
payments.canceled | 1. Create a payment with "auto_capture": false and "amount": 76361 |
payouts.created | 1. Send a POST /payout_methods request. 2. Send a POST /accounts/{id} request with payout.currencies.currency.payout_method_id and a period of daily. |
payouts.completed | 1. Send a POST /payout_methods request. 2. Send a POST /accounts/{id} request with payout.currencies.currency.payout_method_id and a period of daily. Note: The notification will send out when the Payout automatically gets triggered. |
payout_methods.created | 1. Send a POST /payout_methods request |
refunds.created | 1. Create a payment. 2. Send a POST /refunds request. |
refunds.completed | 1. Create a payment. 2. Send a POST /refunds request. |
Merchant Interchange
Behavior | Header | Value | Calls |
---|---|---|---|
Get a sample response for a Billing Statements look up. | WePay-Magic-Behavior | get_billing_statements_id | GET /billing_statements/{id} Note: Use any number in the ID parameter for the billing statement. |
Get a sample response for a fetching a collection of Billing Statements related to a specific Account. | WePay-Magic-Behavior | get_billing_statements | GET /billing_statements?account_id=account_id |
Get a sample response for a Transaction Summary look up related to a specific Billing Statement. | WePay-Magic-Behavior | get_billing_statements_id_transactions_summary | GET /billing_statements/{id}/transactions_summary Note: Use any number in the ID parameter for the billing statement. |
Get a sample response for a Fee Summary look up related to a specific Billing Statement. | WePay-Magic-Behavior | get_billing_statements_id_fees_summary | GET /billing_statements/{id}/fees_summary Note: Use any number in the ID parameter for the billing statement. |
Underwriting
Behavior | Parameter | Value | Calls |
---|---|---|---|
Automatically sets underwriting_result.status to complete and underwriting_result.method to automatic for this legal entity. | entity_name | MagicNameUnderwritingAutomaticComplete | POST /legal_entities & POST /legal_entities/{id} |
Automatically sets underwriting_result.status to in_progress and underwriting_result.method to automatic for this legal entity. | entity_name | MagicNameUnderwritingAutomaticInProgress | POST /legal_entities & POST /legal_entities/{id} |
Automatically sets underwriting_result.status to rejected and underwriting_result.method to automatic for this legal entity. | entity_name | MagicNameUnderwritingAutomaticRejected | POST /legal_entities & POST /legal_entities/{id} |
Automatically sets underwriting_result.status to complete and underwriting_result.method to manual for this legal entity. | entity_name | MagicNameUnderwritingManualComplete | POST /legal_entities & POST /legal_entities/{id} |
Automatically sets underwriting_result.status to in_progress and underwriting_result.method to manual for this legal entity. | entity_name | MagicNameUnderwritingManualInProgress | POST /legal_entities & POST /legal_entities/{id} |
Automatically sets underwriting_result.status to rejected and underwriting_result.method to manual for this legal entity. | entity_name | MagicNameUnderwritingManualRejected | POST /legal_entities & POST /legal_entities/{id} |