# Create an OutboundPayment

Creates an OutboundPayment.

## Prerequisites

Before you can run the following code snippet, you need to call these APIs with the provided parameters to set up the prerequisite API object(s).

1. createCustomer
POST /v1/customers {"name":"Jenny Rosen","email":"jennyrosen@example.com"}
2. createPaymentMethod
POST /v1/payment_methods {"type":"us_bank_account","us_bank_account":{"account_holder_type":"individual","account_number":"000123456789","routing_number":"110000000"},"billing_details":{"name":"John Doe"}}

## Request

```curl
curl https://api.stripe.com/v1/treasury/outbound_payments \
  -u "<<YOUR_SECRET_KEY>>" \
  -d financial_account={{FINANCIAL_ACCOUNT_ID}} \
  -d amount=10000 \
  -d currency=usd \
  -d customer={{CUSTOMER_ID}} \
  -d destination_payment_method={{PAYMENT_METHOD_ID}} \
  -d "description=OutboundPayment to a 3rd party"
```

### Response

```json
{
  "id": "obp_1MtaD72eZvKYlo2Cu5d5S1kX",
  "object": "treasury.outbound_payment",
  "amount": 10000,
  "cancelable": false,
  "created": 1680716009,
  "currency": "usd",
  "customer": "cus_4QFOF3xrvBT2nU",
  "description": "OutboundPayment to a 3rd party",
  "destination_payment_method": "pm_1MtaD82eZvKYlo2CtGr4OxTt",
  "destination_payment_method_details": {
    "type": "us_bank_account",
    "destination": "ba_1MtaD62eZvKYlo2C8vwjm7bc"
  },
  "end_user_details": {
    "ip_address": null,
    "present": false
  },
  "expected_arrival_date": 1680716009,
  "financial_account": "fa_1MtaD72eZvKYlo2CYKM3DnUI",
  "hosted_regulatory_receipt_url": "https://payments.stripe.com/regulatory-receipt/CBQaFwoVYWNjdF8xMDMyRDgyZVp2S1lsbzJDKOrhtqEGMgYgdA-GrKk6NZNsf-FXPEqqbHm44fwJ57pNybbkweviYUDJGYFOw4f9cAqpfvPKQZ6y0S2C5DYyRwmDs_36",
  "livemode": false,
  "metadata": {},
  "returned_details": null,
  "statement_descriptor": "payment",
  "status": "processing",
  "status_transitions": {
    "canceled_at": null,
    "failed_at": null,
    "posted_at": null,
    "returned_at": null
  },
  "transaction": "trxn_1MtaD72eZvKYlo2CmUu4Vs5c"
}
```

## Returns

Returns an OutboundPayment object if there were no issues with OutboundPayment creation.

## Parameters

- `amount` (integer, required)
  Amount (in cents) to be transferred.

- `currency` (enum, required)
  Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://docs.stripe.com/currencies.md).

- `financial_account` (string, required)
  The FinancialAccount to pull funds from.

- `customer` (string, optional)
  ID of the customer to whom the OutboundPayment is sent. Must match the Customer attached to the `destination_payment_method` passed in.

- `description` (string, optional)
  An arbitrary string attached to the object. Often useful for displaying to users.

- `destination_payment_method` (string, optional)
  The PaymentMethod to use as the payment instrument for the OutboundPayment. Exclusive with `destination_payment_method_data`.

- [`destination_payment_method_data`](https://docs.stripe.com/api/treasury/outbound_payments/create.md?query=destination_payment_method_data) (object, optional)
  Hash used to generate the PaymentMethod to be used for this OutboundPayment. Exclusive with `destination_payment_method`.

- [`destination_payment_method_options`](https://docs.stripe.com/api/treasury/outbound_payments/create.md?query=destination_payment_method_options) (object, optional)
  Payment method-specific configuration for this OutboundPayment.

- [`end_user_details`](https://docs.stripe.com/api/treasury/outbound_payments/create.md?query=end_user_details) (object, optional)
  End user details.

- `metadata` (map, optional)
  Set of [key-value pairs](https://docs.stripe.com/api/metadata.md) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.

- `purpose` (enum, optional)
  The purpose of the OutboundPayment, if applicable. This list is not exhaustive, do not specify this parameter if your purpose does not match any that are provided.
Possible enum values:
  - `payroll`

- `statement_descriptor` (string, optional)
  The description that appears on the receiving end for this OutboundPayment (for example, bank statement for external bank transfer). Maximum 10 characters for `ach` payments, 140 characters for `us_domestic_wire` payments, or 500 characters for `stripe` network transfers. Can only include -#.$&*, spaces, and alphanumeric characters. The default value is “payment”.
