Skip to main content
POST
/
wallets
/
{wallet_id}
/
wallet-transactions
Create Wallet transaction
curl --request POST \
  --url https://api-m.paypal.com/v1/commerce/billing/wallets/{wallet_id}/wallet-transactions \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "type": "TOPUP"
}'
{
  "wallet_transactions": [
    {
      "wallet_transaction_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
      "wallet_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
      "payment_status": "SETTLED",
      "source": "MANUAL",
      "transaction_status": "PURCHASED",
      "transaction_type": "INBOUND",
      "amount": {
        "value": 120.35,
        "currency_code": "USD"
      },
      "credits": "100.0",
      "settled_at": "2022-04-29T08:59:51Z",
      "failed_at": "2022-04-29T08:59:51Z",
      "created_at": "2022-04-29T08:59:51Z",
      "metadata": [
        {
          "key": "reason",
          "value": "balance depleted"
        }
      ]
    }
  ],
  "meta": {
    "total_count": 123,
    "total_pages": 123,
    "current_page": 123,
    "next_page": 3,
    "prev_page": 1
  }
}

Authorizations

Authorization
string
header
required

Use the /v1/oauth2/token endpoint to obtain an access token and pass it as a Bearer token in the Authorization header.

Path Parameters

wallet_id
string
required

Wallet ID

Body

application/json

Defines the request object to create a wallet transaction.

type
enum<string>
required

Type of the wallet transaction applied on the wallet. Supported types are TOPUP, VOID.

Available options:
TOPUP,
VOID
Example:

"TOPUP"

paid_credits
string

Number of paid credits to be added. Applicable only to TOPUP type of transaction

Example:

"20.0"

credits_to_void
string

Number of credits and Only for type VOID, this field need to be passed in request.

Example:

"20.0"

granted_credits
string

Number of granted credits to be added. Applicable only to TOPUP type of transaction

Example:

"10.0"

metadata
object[]

List of key-value pair contains the metadata about the wallet transaction.

Response

Wallet transactions created successfully

The get wallet transactions response contains list of wallet transactions for the specified wallet id.

wallet_transactions
object[]

The list of wallet transactions for the specified wallet id

meta
object
I