sendmock_payment_create
Create a payment and pay it with a test card, as an app's server does without a checkout page.
Toolset payments.
| Input | Type | Description |
|---|---|---|
| providerrequired | string | The gateway key, e.g. stripe or sslcommerz.Example: stripe |
| amount_minorrequired | number | The amount in the currency's minor unit (cents, paisa; JPY has none); 1999 is 19.99.Example: 1999 |
| currency | string | Three letters, stored in capitals; Settings > Payments' default currency when left out.Example: USD |
| card_numberrequired | string | A test card of the card method; its outcome in the test card table decides the payment. A number the table does not list is refused and kept nowhere.Example: 4242424242424242 |
| customer_email | string | The customer's email.Example: [email protected] |
| line_items | object[] | What is being bought.Example: [{"name":"T-shirt","quantity":1,"unit_amount_minor":1999}] |
| capture_method | string | manual authorizes the payment and waits for a capture or void; automatic when left out.One of: automatic, manualExample: automatic |
Example call
{
"name": "sendmock_payment_create",
"arguments": {
"provider": "stripe",
"amount_minor": 1999,
"card_number": "4242424242424242",
"currency": "USD",
"customer_email": "[email protected]"
}
}Result: PaymentDetail
- API
- POST
/api/v1/payments - CLI
sendmock payments create- In the app
- Payments > New payment