Introduction
WooCommerce Payments REST APIs build upon the WooCommerce REST interface which itself extends the WordPress REST APIs. Consuming, testing and debugging WCPay APIs is exactly the same as Woo APIs.
For requirements, request/response format, and other details refer to the WooCommerce REST API docs.
Authentication
WooCommerce includes two ways to authenticate with the WP REST API. It is also possible to authenticate using any WP REST API authentication plugin or method.
Refer to the WooCommerce REST API docs for more options and possibilities.
Generate API keys
Pre-generated keys can be used to authenticate use of the REST API endpoints. New keys can be generated either through the WordPress admin interface or they can be auto-generated through an endpoint.
To create or manage keys for a specific WordPress user, go to WooCommerce > Settings > Advanced > REST API.
Note: Keys/Apps was found at WooCommerce > Settings > API > Key/Apps prior to WooCommerce 3.4.
Click the "Add Key" button. In the next screen, add a description and select the WordPress user you would like to generate the key for. Use of the REST API with the generated keys will conform to that user's WordPress roles and capabilities.
Choose the level of access for this REST API key, which can be Read access, Write access or Read/Write access. Then click the "Generate API Key" button and WooCommerce will generate REST API keys for the selected user.
Now that keys have been generated, you should see two new keys, a QRCode, and a Revoke API Key button. These two keys are your Consumer Key and Consumer Secret.
If the WordPress user associated with an API key is deleted, the API key will cease to function. API keys are not transferred to other users.
Order
The order API allows you to perform operations such as capture a terminal payment, create an intent, create a customer, etc. for a particular order.
Create a terminal intent
@since v3.5.0
Create a new in-person payment intent for the given order ID without confirming it.
Error codes
-
wcpay_missing_order
- Order not found -
wcpay_server_error
- Unexpected server error -
wcpay_intent_creation_error
- Unknown error
HTTP request
/wp-json/wc/v3/payments/orders/<order_id>/create_terminal_intent
Optional parameters
-
payment_methods
- array with payment methods. Accepted values:card_present
andinterac_present
-
metadata
- metadata that will be attached to the PaymentIntent -
customer_id
- customer that will be attached to the PaymentIntent
curl -X POST https://example.com/wp-json/wc/v3/payments/orders/42/create_terminal_intent \
-u consumer_key:consumer_secret
JSON response example:
{
"id": "pi_ZZZZZZZZZZZZZZZZAAAAAAAA"
}
{
"code": "wcpay_intent_creation_error",
"message": "Intent creation failed with the following message: <reason>",
"data": {
"status": 500
}
}
Capture a terminal payment
@since v2.4.0
Capture the funds of an in-person payment intent. Given an intent ID and an order ID, add the intent ID to the order and capture it.
POST params
- payment_intent_id: string
Error codes
-
wcpay_missing_order
- Order not found -
wcpay_refunded_order_uncapturable
- Payment cannot be captured for partially or fully refunded orders -
wcpay_payment_uncapturable
- The payment cannot be captured if intent status is not one of 'processing', 'requires_capture', or 'succeeded' -
wcpay_capture_error
- Unknown error
HTTP request
/wp-json/wc/v3/payments/orders/<order_id>/capture_terminal_payment
curl -X POST https://example.com/wp-json/wc/v3/payments/orders/42/capture_terminal_payment \
-u consumer_key:consumer_secret \
-H "Content-Type: application/json" \
-d '{
"payment_intent_id": "pi_ZZZZZZZZZZZZZZZZAAAAAAAA"
}'
JSON response example:
{
"status": "succeeded",
"id": "pi_ZZZZZZZZZZZZZZZZAAAAAAAA"
}
{
"code": "wcpay_server_error",
"message": "Unexpected server error",
"data": {
"status": 500
}
}
Capture an authorization
@since v5.1.0
Capture the funds of an existing uncaptured payment intent that was marked to be captured manually later.
POST params
- payment_intent_id: string
- order_id: string
Error codes
-
wcpay_missing_order
- Order not found -
wcpay_refunded_order_uncapturable
- Payment cannot be captured for partially or fully refunded orders -
wcpay_payment_uncapturable
- The payment cannot be captured if intent status is not one of 'processing', 'requires_capture', or 'succeeded' -
wcpay_intent_order_mismatch
- Payment cannot be captured because the order id does not match -
wcpay_capture_error
- Unknown error
HTTP request
/wp-json/wc/v3/payments/orders/<order_id>/capture_authorization
curl -X POST https://example.com/wp-json/wc/v3/payments/orders/42/capture_authorization \
-u consumer_key:consumer_secret \
-H "Content-Type: application/json" \
-d '{
"payment_intent_id": "pi_ZZZZZZZZZZZZZZZZAAAAAAAA"
}'
JSON response example:
{
"status": "succeeded",
"id": "pi_ZZZZZZZZZZZZZZZZAAAAAAAA"
}
{
"code": "wcpay_payment_uncapturable",
"message": "The payment cannot be captured",
"data": {
"status": 409
}
}
Cancel an authorization
@since v5.7.0
Cancel the authorization of an existing uncaptured payment intent.
POST params
- payment_intent_id: string
Error codes
-
wcpay_missing_order
- Order not found -
wcpay_refunded_order_uncapturable
- Payment cannot be canceled -
wcpay_payment_uncapturable
- The payment cannot be canceled if intent status is not one of 'processing', 'requires_capture', or 'succeeded' -
wcpay_intent_order_mismatch
- Payment cannot be canceled because the order id does not match with payment intent id -
wcpay_cancel_error
- Unknown error
HTTP request
/wp-json/wc/v3/payments/orders/<order_id>/cancel_authorization
curl -X POST https://example.com/wp-json/wc/v3/payments/orders/42/cancel_authorization \
-u consumer_key:consumer_secret \
-H "Content-Type: application/json" \
-d '{
"payment_intent_id": "pi_ZZZZZZZZZZZZZZZZAAAAAAAA"
}'
JSON response example:
{
"status": "canceled",
"id": "pi_ZZZZZZZZZZZZZZZZAAAAAAAA"
}
{
"code": "wcpay_missing_order",
"message": "Order not found",
"data": {
"status": 409
}
}
Create customer
@since v2.8.0
Returns customer id from order. Create or update customer if needed.
Error codes
-
wcpay_missing_order
- Order not found -
wcpay_invalid_order_status
- Invalid order status -
wcpay_server_error
- Unexpected server error
HTTP request
/wp-json/wc/v3/payments/orders/<order_id>/create_customer
curl -X POST https://example.com/wp-json/wc/v3/payments/orders/42/create_customer \
-u consumer_key:consumer_secret
JSON response example:
{
"id": "i_am_awesome"
}
{
"code": "wcpay_server_error",
"message": "Unexpected server error",
"data": {
"status": 500
}
}
Authorization
An authorization is an uncaptured transaction marked for manual capture later, or more technically a payment intent with requires_capture
status. An authorization must be captured within 7 days after which it expires and becomes unavailable for capture.
An authorization may be captured from one of these pages - Order details, Uncapture transactions, Payment details.
The authorization API allows you to get data related to authorizations.
Get authorizations
@since v4.9.0
Return all active authorizations.
GET params
- page: int
- pagesize: int
- sort: string
- direction: string
Error codes
-
wcpay_bad_request
- One or more query string params is invalid.
HTTP request
/wp-json/wc/v3/payments/authorizations?page=1&pagesize=10&sort=created&direction=DESC
curl -X GET https://example.com/wp-json/wc/v3/payments/authorizations?page=1&pagesize=10&sort=created&direction=DESC \
-u consumer_key:consumer_secret \
-H "Content-Type: application/json"
JSON response example:
{
"data": [
{
"charge_id": "ch_123",
"transaction_id": null,
"amount": 1800,
"net": 1720,
"amount_captured": 0,
"amount_refunded": 0,
"is_captured": false,
"created": "2022-11-03 08:56:14",
"modified": "2022-11-03 08:56:16",
"channel": "online",
"source": "visa",
"source_identifier": "4242",
"customer_name": "Mr. Albert",
"customer_email": "mr.albert@email.com",
"customer_country": "US",
"fees": 80,
"currency": "usd",
"risk_level": 0,
"payment_intent_id": "pi_123",
"refunded": false,
"order_id": 329,
"outcome_type": "authorized",
"status": "succeeded"
}
]
}
{
"code": "wcpay_bad_request",
"message": "Error: Invalid sorting direction: ",
"data": null
}
Get authorization
@since v4.9.0
Return data for a specific authorization.
HTTP request
/wp-json/wc/v3/payments/authorizations/<payment_intent_id>
curl -X GET https://example.com/wp-json/wc/v3/payments/authorizations/pi_123 \
-u consumer_key:consumer_secret \
-H "Content-Type: application/json"
JSON response example:
{
"wcpay_charges_cache_id": 17,
"stripe_account_id": "acct_123",
"charge_id": "ch_123",
"transaction_id": null,
"amount": 1800,
"net": 1720,
"amount_captured": 0,
"amount_refunded": 0,
"is_captured": false,
"created": "2022-11-03 08:56:14",
"modified": "2022-11-03 08:56:16",
"channel": "online",
"source": "visa",
"source_identifier": "4242",
"customer_name": "Mr. Albert",
"customer_email": "mr.albert@email.com",
"customer_country": "US",
"fees": 80,
"currency": "usd",
"risk_level": 0,
"payment_intent_id": "pi_123",
"refunded": false,
"order_id": 329,
"outcome_type": "authorized",
"status": "succeeded"
}
Get authorization summary
@since v4.9.0
Return a high-level summary for all active authorizations.
HTTP request
/wp-json/wc/v3/payments/authorizations/summary
curl -X GET https://example.com/wp-json/wc/v3/payments/authorizations/summary \
-u consumer_key:consumer_secret \
-H "Content-Type: application/json"
JSON response example:
{
"count": 3,
"currency": "usd",
"total": 5400,
"all_currencies": [ "usd" ]
}
Customer
The Customers API endpoints provide access to customer data. This includes payment methods and other key information useful for your application.
Get customer's payment methods
@since v6.6.0
Return all customer's payment methods.
Error codes
-
rest_forbidden
- indicates that the user or application does not have the necessary permissions to perform the requested action.
HTTP request
/wp-json/wc/v3/payments/customers/<customer_id>/payment_methods
curl -X GET https://example.com/wp-json/wc/v3/payments/customers/cus_123456/payment_methods \
-u consumer_key:consumer_secret \
-H "Content-Type: application/json"
JSON response example:
[
{
"id": "pm_1AxXc2a5dGhIZQYPlaLbKj1Z",
"type": "card",
"billing_details": {
"address": {
"city": "Los Angeles",
"country": "US",
"line1": "123 Anywhere St",
"line2": null,
"postal_code": "90002",
"state": "CA"
},
"email": "john.doe@example.com",
"name": "John Doe",
"phone": null
},
"card": {
"brand": "visa",
"last4": "1122",
"exp_month": 10,
"exp_year": 2028
}
},
{
"id": "pm_2BcYd3e6hKjZLQWQmMnOjK45",
"type": "card",
"billing_details": {
"address": {
"city": "New York",
"country": "US",
"line1": "456 Broadway Ave",
"line2": null,
"postal_code": "10012",
"state": "NY"
},
"email": "jane.smith@example.com",
"name": "Jane Smith",
"phone": null
},
"card": {
"brand": "mastercard",
"last4": "3344",
"exp_month": 12,
"exp_year": 2027
}
}
]
{
"code":"rest_forbidden",
"message":"Sorry, you are not allowed to do that.",
"data":{
"status":401
}
}
Payment intents
The Payment Intents API provides comprehensive functionality for managing payment intents. You can create and manage them seamlessly through its endpoints.
Create payment intent
@since v6.6.0
Create new payment intent.
Error codes
-
rest_forbidden
- indicates that the user or application does not have the necessary permissions to perform the requested action. -
wcpay_server_error
- Indicates that API had error processing the request. Usually occurs when request params are invalid like order is not found, and similar.
HTTP request
/wp-json/wc/v3/payments/payment_intents
curl -X POST https://example.com/wp-json/wc/v3/payments/payment_intents \
-u consumer_key:consumer_secret \
-H "Content-Type: application/json" \
-d '{"payment_method":"<pm_id>","customer":"<customer_id>","order_id":"<order_id>"}'
JSON response example:
{
"id": "pi_4NxlPtR3eYmZSVZP0PPpwee8",
"amount": 1023,
"currency": "USD",
"created": 1696496578,
"customer": "cus_OUQoHGzJLw87Tk",
"payment_method": "pm_2NlT19R3eYmZSVZPRJEvxvwF",
"status": "succeeded",
"charge": {
"id": "ch_4NxlPtR3eYmZSVZP0ZLpKjfI",
"amount": 1023,
"application_fee_amount": 62,
"status": "succeeded",
"billing_details": {
"address": {
"city": "San Francisco",
"country": "US",
"line1": "123 Random St",
"line2": "-",
"postal_code": "94101",
"state": "CA"
},
"email": "random.email@example.com",
"name": "John Doe",
"phone": "5555555555"
},
"payment_method_details": {
"card": {
"amount_authorized": 1023,
"brand": "mastercard",
"capture_before": "",
"country": "US",
"exp_month": 5,
"exp_year": 2030,
"last4": "4321",
"three_d_secure": ""
}
}
}
}
{
"code":"rest_forbidden",
"message":"Sorry, you are not allowed to do that.",
"data":{
"status":401
}
}
Reports
The Reports API allows you to obtain detailed records of transactions and authorizations.
List transactions
@since 6.5.0
Fetch a detailed overview of transactions.
Error codes
-
rest_forbidden
- Unauthenticated -
rest_invalid_param
- Invalid request parameter -
wcpay_server_error
- Unexpected server error
HTTP request
/wp-json/wc/v3/payments/reports/transactions
Optional parameters
date_before
: Filter transactions before this date.date_after
: Filter transactions after this date.date_between
: Filter transactions between these dates.order_id
: Filter transactions based on the associated order ID.deposit_id
: Filter transactions based on the associated deposit ID.customer_email
: Filter transactions based on the customer email.payment_method_type
: Filter transactions based on the payment method used.type
: Filter transactions where type is a specific value.match
: Match filter for the transactions.user_timezone
: Include timezone into date filtering.page
: Page number.per_page
: Page size.sort
: Field on which to sort.direction
: Direction on which to sort.
curl -X POST https://example.com/wp-json/wc/v3/payments/reports/transactions?page=1 \
-u consumer_key:consumer_secret
JSON response example:
[
{
"date":"2023-10-01 15:00:00",
"transaction_id":"txn_1234567890abcdef",
"payment_id":"pi_1234567890abcdef",
"channel":"online",
"payment_method":{
"type":"card",
"id":"pm_1234567890abcdef"
},
"type":"charge",
"transaction_currency":"USD",
"amount":1000,
"exchange_rate":1.00,
"deposit_currency":"USD",
"fees":20,
"customer":{
"name":"John Doe",
"email":"john.doe@example.com",
"country":"US"
},
"net_amount":980,
"order_id":12345,
"risk_level":1,
"deposit_date":"2023-10-02 15:00:00",
"deposit_id":"dp_1234567890abcdef",
"deposit_status":"completed"
}
]
List transaction
@since 6.5.0
Fetch a detailed overview of single transaction.
Error codes
-
rest_forbidden
- Unauthenticated -
wcpay_server_error
- Unexpected server error
HTTP request
/wp-json/wc/v3/payments/reports/transactions/<transaction_id>
curl -X POST https://example.com/wp-json/wc/v3/payments/reports/transactions/txn_1234567890abcdef \
-u consumer_key:consumer_secret
JSON response example:
{
"date": "2023-10-01 15:00:00",
"transaction_id": "txn_1234567890abcdef",
"payment_id": "pi_1234567890abcdef",
"channel": "online",
"payment_method": {
"type": "card",
"id": "pm_1234567890abcdef"
},
"type": "charge",
"transaction_currency": "USD",
"amount": 1000,
"exchange_rate": 1.00,
"deposit_currency": "USD",
"fees": 20,
"customer": {
"name": "John Doe",
"email": "john.doe@example.com",
"country": "US"
},
"net_amount": 980,
"order_id": 12345,
"risk_level": 1,
"deposit_date": "2023-10-02 15:00:00",
"deposit_id": "dp_1234567890abcdef",
"deposit_status": "completed"
}
List authorizations
@since 6.5.0
Fetch a detailed overview of authorizations.
Error codes
-
rest_forbidden
- Unauthenticated -
rest_invalid_param
- Invalid request parameter -
wcpay_server_error
- Unexpected server error
HTTP request
/wp-json/wc/v3/payments/reports/authorizations
Optional parameters
date_before
: Filter authorizations before this date.date_after
: Filter authorizations after this date. If it's not provided the default it will be 7 days before today.date_between
: Filter authorizations between these dates.order_id
: Filter authorizations based on the associated order ID.deposit_id
: Filter authorizations based on the associated deposit ID.customer_email
: Filter authorizations based on the customer email.payment_method_type
: Filter authorizations based on the payment method used.type
: Filter authorizations where type is a specific value.match
: Match filter for the authorizations.user_timezone
: Include timezone into date filtering for authorizations.page
: Page number for listing authorizations.per_page
: Page size for listing authorizations.sort
: Field on which to sort the authorizations.direction
: Direction on which to sort the authorizations.
curl -X POST https://example.com/wp-json/wc/v3/payments/reports/authorizations?page=1 \
-u consumer_key:consumer_secret
JSON response example:
[
{
"authorization_id":"auth_98765",
"date":"2023-09-30 15:05:00",
"payment_id":"pi_12345",
"channel":"online",
"payment_method":{
"type":"card",
"id":"pm_abc12345"
},
"currency":"USD",
"amount":1000,
"amount_captured":0,
"fees":20,
"customer":{
"name":"John Doe",
"email":"john.doe@example.com",
"country":"US"
},
"net_amount":980,
"order_id":45678,
"risk_level":1
}
]
List authorization
@since 6.5.0
Fetch a detailed overview of single authorization.
Error codes
-
rest_forbidden
- Unauthenticated -
wcpay_server_error
- Unexpected server error
HTTP request
/wp-json/wc/v3/payments/reports/authorizations/<authorization_id>
curl -X POST https://example.com/wp-json/wc/v3/payments/reports/authorizations/auth_98765 \
-u consumer_key:consumer_secret
JSON response example:
{
"authorization_id":"auth_98765",
"date":"2023-09-30 15:05:00",
"payment_id":"pi_12345",
"channel":"online",
"payment_method":{
"type":"card",
"id":"pm_abc12345"
},
"currency":"USD",
"amount":1000,
"amount_captured":0,
"fees":20,
"customer":{
"name":"John Doe",
"email":"john.doe@example.com",
"country":"US"
},
"net_amount":980,
"order_id":45678,
"risk_level":1
}
Deposits
The Deposits API endpoints provide access to an account's deposits data, including an overview of account balances, deposit schedule and deposit history.
Deposit object
{
"id": "po_1OJ466CBu6Jj8nBr38JRxdNE",
"date": 1701648000000,
"type": "deposit",
"amount": 802872,
"status": "paid",
"bankAccount": "STRIPE TEST BANK •••• 3000 (EUR)",
"currency": "eur",
"automatic": true,
"fee": 0,
"fee_percentage": 0,
"created": 1701648000
}
Properties
-
id
string - The deposit ID. -
date
int - The arrival date of the deposit in unix timestamp milliseconds. -
type
string - The type of deposit.deposit
withdrawal
-
amount
int - The amount of the deposit. -
status
string - The status of the deposit.paid
pending
in_transit
canceled
failed
-
bankAccount
string - The bank account the deposit was/will be paid to. -
currency
string - The currency of the deposit. E.g.eur
-
automatic
bool - Returnstrue
if the payout is created by an automated schedule andfalse
if it’s requested manually. -
fee
int - The fee amount of the deposit. -
fee_percentage
int - The fee percentage of the deposit. -
created
int - The arrival date of the deposit in unix timestamp seconds.
Get deposits overview for all account deposit currencies
Fetch an overview of account deposits for all deposit currencies. This includes details for the last paid deposit, next scheduled deposit, and last manual deposits.
HTTP request
/wp-json/wc/v3/payments/deposits/overview-all
Returns
-
deposit
object -
balance
object-
pending
array - The pending balance for each deposit currency.-
amount
int - The amount of the balance. -
currency
string - The currency of the balance. E.g.usd
. -
source_types
object | null - The amount of the balance from each source type, e.g.{ "card": 12345 }
-
-
available
array - The available balance for each deposit currency.-
amount
int - The amount of the balance. -
currency
string - The currency of the balance. E.g.usd
. -
source_types
object | null - The amount of the balance from each source type, e.g.{ "card": 12345 }
-
-
instant
array - The instant balance for each deposit currency.-
amount
int - The amount of the balance. -
currency
string - The currency of the balance. E.g.usd
. -
fee
int - The fee amount of the balance. -
fee_percentage
int - The fee percentage of the balance. -
net
int - The net amount of the balance.
-
-
-
account
object-
deposits_enabled
bool - Whether deposits are enabled for the account. -
deposits_blocked
bool - Whether deposits are blocked for the account. -
deposits_schedule
object-
delay_days
int - The number of days after a charge is created that the payment is paid out. -
interval
string - The interval at which payments are paid out.manual
daily
weekly
monthly
-
weekly_anchor
string | undefined - The day of the week that payments are paid out, e.g.monday
. -
monthly_anchor
int | undefined - The day of the month that payments are paid out. Specified as a number between 1–31. 29-31 will instead use the last day of a shorter month.
-
-
default_currency
string - The default currency for the account. -
default_external_accounts
array - The default external payout accounts (deposit destinations) for the account.-
currency
string - The currency of the external account. e.g.eur
,chf
. -
status
string - The status of the external account. e.g.new
,errored
.
-
-
curl -X GET https://example.com/wp-json/wc/v3/payments/deposits/overview-all \
-u consumer_key:consumer_secret
JSON response example:
{
"deposit": {
"last_paid": [
{
"id": "po_1OJ466CBu6Jj8nBr38JRxdNE",
"date": 1701648000000,
"type": "deposit",
"amount": 802872,
"status": "paid",
"bankAccount": "STRIPE TEST BANK •••• 3000 (EUR)",
"currency": "eur",
"automatic": true,
"fee": 0,
"fee_percentage": 0,
"created": 1701648000
},
{
"id": "po_1OHylNCBu6Jj8nBr95tE8scS",
"date": 1701302400000,
"type": "deposit",
"amount": 471784,
"status": "paid",
"bankAccount": "STRIPE TEST BANK •••• 6789 (USD)",
"currency": "usd",
"automatic": true,
"fee": 0,
"fee_percentage": 0,
"created": 1701302400
}
],
"last_manual_deposits": []
},
"balance": {
"pending": [
{
"amount": -114696,
"currency": "eur",
"source_types": {
"card": -114696
}
},
{
"amount": 707676,
"currency": "usd",
"source_types": {
"card": 707676
}
}
],
"available": [
{
"amount": 573480,
"currency": "eur",
"source_types": {
"card": 573480
}
},
{
"amount": 587897,
"currency": "usd",
"source_types": {
"card": 587897
}
}
],
"instant": [
{
"amount": 12345,
"currency": "usd",
"fee": 185,
"fee_percentage": 1.5,
"net": 0
}
]
},
"account": {
"deposits_enabled": true,
"deposits_blocked": false,
"deposits_schedule": {
"delay_days": 7,
"interval": "weekly",
"weekly_anchor": "friday"
},
"default_currency": "eur",
"default_external_accounts": [
{
"currency": "eur",
"status": "new"
},
{
"currency": "usd",
"status": "new"
}
]
}
}
List deposits
Fetch a list of deposits.
HTTP request
/wp-json/wc/v3/payments/deposits
Required parameters
-
sort
string - Field on which to sort, e.g.date
Optional parameters
-
match
string -
store_currency_is
string -
date_before
string -
date_after
string -
date_between
array -
status_is
stringpaid
pending
in_transit
canceled
failed
-
status_is_not
stringpaid
pending
in_transit
canceled
failed
-
direction
string -
page
integer -
pagesize
integer
Returns
-
data
array of Deposit - The list of deposits matching the query. -
total_count
int - The total number of deposits matching the query.
curl -X GET https://example.com/wp-json/wc/v3/payments/deposits?sort=date \
-u consumer_key:consumer_secret
JSON response example:
{
"data": [
{
"id": "po_1OJ466CBu6Jj8nBr38JRxdNE",
"date": 1701648000000,
"type": "deposit",
"amount": 802872,
"status": "paid",
"bankAccount": "STRIPE TEST BANK •••• 3000 (EUR)",
"currency": "eur",
"automatic": true,
"fee": 0,
"fee_percentage": 0,
"created": 1701648000
},
{
"id": "po_1OHylNCBu6Jj8nBr95tE8scS",
"date": 1701302400000,
"type": "deposit",
"amount": 471784,
"status": "paid",
"bankAccount": "STRIPE TEST BANK •••• 6789 (USD)",
"currency": "usd",
"automatic": true,
"fee": 0,
"fee_percentage": 0,
"created": 1701302400
}
],
"total_count": 2
}
Get deposits summary
Fetches a summary of deposits matching the query. This includes the total number of deposits matching the query and a list of deposits.
Useful in combination with the List deposits endpoint to get a summary of deposits matching the query without having to fetch the full list of deposits.
HTTP request
/wp-json/wc/v3/payments/deposits/summary
Optional parameters
-
match
string -
store_currency_is
string -
date_before
string -
date_after
string -
date_between
array -
status_is
string -paid
pending
in_transit
canceled
failed
-
status_is_not
string -paid
pending
in_transit
canceled
failed
Returns
-
count
int - The total number of deposits matching the query. -
store_currencies
array - The currencies of the deposits matching the query. -
total
int - The total amount of the deposits matching the query. -
currency
string - The currency as provided bystore_currency_is
or the default currency of the account.
curl -X GET https://example.com/wp-json/wc/v3/payments/deposits/summary \
-u consumer_key:consumer_secret
JSON response example:
{
"count": 42,
"store_currencies": [ "chf", "eur", "gbp", "nok", "sek", "usd", "dkk" ],
"total": 5744395,
"currency": "eur"
}
Get deposit
Fetches a deposit by ID.
HTTP request
/wp-json/wc/v3/payments/deposits/{deposit_id}
Returns
If a deposit is found for the provided ID, the response will return a Deposit object.
If no deposit is found for the provided ID, the response will return a 500
status code.
curl -X GET https://example.com/wp-json/wc/v3/payments/deposits/po_123abc \
-u consumer_key:consumer_secret
JSON response example:
{
"id": "po_1OGAFOCBu6Jj8nBruJbMbGqD",
"date": 1701043200000,
"type": "deposit",
"amount": 114696,
"status": "paid",
"bankAccount": "STRIPE TEST BANK •••• 3000 (EUR)",
"currency": "eur",
"automatic": true,
"fee": 0,
"fee_percentage": 0,
"created": 1701043200
}
Submit an instant deposit
Submit an instant deposit for a list of transactions. Only for eligible accounts. See Instant Deposits with WooPayments for more information.
HTTP request
/wp-json/wc/v3/payments/deposits
Required body properties
-
type
: string - The type of deposit.instant
-
currency
: string - The currency of the balance to deposit. E.g.usd
curl -X POST 'https://example.com/wp-json/wc/v3/payments/deposits' \
-u consumer_key:consumer_secret
--data '{
"type": "instant",
"currency": "usd"
}'
Request a CSV export of deposits
Request a CSV export of deposits matching the query. A link to the exported CSV will be emailed to the provided email address or the account's primary email address if no email address is provided.
HTTP request
/wp-json/wc/v3/payments/deposits/download
Optional body properties
-
user_email
: string - The email address to send the CSV export link to. If not provided, the account's primary email address will be used.
Optional parameters
-
match
string -
store_currency_is
string -
date_before
string -
date_after
string -
date_between
array -
status_is
string -paid
pending
in_transit
canceled
failed
-
status_is_not
string -paid
pending
in_transit
canceled
failed
Returns
-
exported_deposits
int - The number of deposits exported.
curl -X POST 'https://example.com/wp-json/wc/v3/payments/deposits/download?status_is=paid' \
-u consumer_key:consumer_secret
--data '{
"user_email": "name@example.woocommerce.com"
}'
JSON response example:
{
"exported_deposits": 42
}