v8
OpenAPI 3.1.02026-08-033623795.0 MBPayments
Create payment
Charge an existing member off-session using one of their stored payment methods. You can provide an existing plan, or create a new one in-line. This endpoint will respond with a payment object immediately, but the payment is processed asynchronously in the background. Use webhooks to be notified when the payment succeeds or fails.
Required permissions:
- payment:charge
- plan:create
- access_pass:create
- access_pass:update
- plan:basic:read
- access_pass:basic:read
- member:email:read
- member:basic:read
- member:phone:read
- promo_code:basic:read
- payment:dispute:read
- payment:resolution_center_case:read
post/payments
Request body
Example request
{
"company_id": "biz_xxxxxxxxxxxxxx",
"member_id": "mber_xxxxxxxxxxxxx",
"payment_method_id": "pmt_xxxxxxxxxxxxxx",
"plan": {
"application_fee_amount": 6.9,
"billing_period": 42,
"expiration_days": 42,
"initial_price": 6.9,
"product": {
"global_affiliate_percentage": 6.9,
"product_tax_code_id": "ptc_xxxxxxxxxxxxxx"
},
"product_id": "prod_xxxxxxxxxxxxx",
"renewal_price": 6.9,
"trial_period_days": 42
},
"promo_code_id": "promo_xxxxxxxxxxxx"
}Response
A successful response
Example response
{
"amount_after_fees": 6.9,
"application_fee": {
"amount": 6.9,
"amount_captured": 6.9,
"amount_refunded": 6.9,
"created_at": "2023-12-01T05:00:00.401Z",
"id": "apfee_xxxxxxxxxxxx"
},
"card_last4": "4242",
"company": {
"id": "biz_xxxxxxxxxxxxxx"
},
"created_at": "2023-12-01T05:00:00.401Z",
"dispute_alerted_at": "2023-12-01T05:00:00.401Z",
"disputes": [
{
"amount": 6.9,
"id": "dspt_xxxxxxxxxxxxx",
"needs_response_by": "2023-12-01T05:00:00.401Z",
"notes": "Customer used the product for 3 months before disputing.",
"reason": "Product Not Received"
}
],
"financing_installments_count": 42,
"financing_transactions": [
{
"amount": 6.9,
"created_at": "2023-12-01T05:00:00.401Z",
"id": "ptx_xxxxxxxxxxxxxx"
}
],
"id": "pay_xxxxxxxxxxxxxx",
"last_payment_attempt": "2023-12-01T05:00:00.401Z",
"membership": {
"id": "mem_xxxxxxxxxxxxxx"
},
"next_payment_attempt": "2023-12-01T05:00:00.401Z",
"paid_at": "2023-12-01T05:00:00.401Z",
"payment_method": {
"card": {
"exp_month": 42,
"exp_year": 42,
"last4": "4242"
},
"created_at": "2023-12-01T05:00:00.401Z",
"id": "payt_xxxxxxxxxxxxx"
},
"payments_failed": 42,
"plan": {
"id": "plan_xxxxxxxxxxxxx"
},
"product": {
"id": "prod_xxxxxxxxxxxxx",
"route": "pickaxe-analytics",
"title": "Pickaxe Analytics"
},
"promo_code": {
"amount_off": 6.9,
"id": "promo_xxxxxxxxxxxx",
"number_of_intervals": 42
},
"refunded_amount": 6.9,
"refunded_at": "2023-12-01T05:00:00.401Z",
"refunds": [
{
"amount": 6.9,
"created_at": "2023-12-01T05:00:00.401Z",
"id": "rf_xxxxxxxxxxxxxxx"
}
],
"resolutions": [
{
"due_date": "2023-12-01T05:00:00.401Z",
"id": "reso_xxxxxxxxxxxxx"
}
],
"risk_score": 42,
"settlement_amount": 6.9,
"settlement_exchange_rate": 6.9,
"settlement_time_at": "2023-12-01T05:00:00.401Z",
"subtotal": 6.9,
"tax_amount": 6.9,
"tax_refunded_amount": 6.9,
"total": 6.9,
"updated_at": "2023-12-01T05:00:00.401Z",
"usd_total": 6.9,
"user": {
"email": "john.doe@example.com",
"id": "user_xxxxxxxxxxxxx",
"name": "John Doe",
"username": "johndoe42"
}
}