-
Notifications
You must be signed in to change notification settings - Fork 0
Payment
A payment is a charge processed through Whop — a transaction recording money collected from a customer for a product, plan, or invoice. This resource is one of the few in the SDK that returns typed DTOs rather than plain arrays for several of its methods.
$client->payments // Matchable\Whop\Resource\PaymentResource| HTTP | POST payments |
| Does | Creates a new payment. |
| Parameters |
$data — payment attributes (e.g. amount, currency, customer, payment method). |
| Returns | array |
| HTTP | GET payments/{id} |
| Does | Retrieves a single payment by ID. |
| Parameters |
$id — the payment ID. |
| Returns |
Matchable\Whop\Dto\Payment\Payment — a typed DTO. If a required field is missing from the response, a MissingArgumentsException is thrown. |
| HTTP | GET payments |
| Does | Lists payments. |
| Parameters |
$query — optional filters / pagination. |
| Returns | array |
| HTTP | POST payments/{id}/refund |
| Does | Refunds a payment, fully or partially. |
| Parameters |
$id — the payment ID; $amount — optional partial refund amount (sent as partial_amount); omit for a full refund. |
| Returns |
Matchable\Whop\Dto\Payment\RefundResponse — a typed DTO. A missing required field raises a MissingArgumentsException. |
| HTTP | POST payments/{id}/void |
| Does | Voids a payment before it settles. |
| Parameters |
$id — the payment ID. |
| Returns |
Matchable\Whop\Dto\Payment\VoidResponse — a typed DTO. A missing required field raises a MissingArgumentsException. |
| HTTP | GET payments/{id}/fees |
| Does | Retrieves the fee breakdown for a payment. |
| Parameters |
$id — the payment ID. |
| Returns | array |
| HTTP | POST payments/{id}/retry |
| Does | Retries a failed payment. |
| Parameters |
$id — the payment ID. |
| Returns | array |
Note:
get,refund, andvoidreturn typed DTOs (Payment,RefundResponse,VoidResponse) — not arrays. The remaining methods (create,list,getFees,retry) return plainarrays.
$payment = $client->payments->get('pay_...');
// Partial refund of 500 (minor units).
$refund = $client->payments->refund('pay_...', 500);
$fees = $client->payments->getFees('pay_...');Official Whop documentation: https://docs.whop.com
Core Company · AccountLink · File · AccessToken · AuthorizedUser · User · Member · Webhook
Payments & Billing Payment · Checkout · Plan · Product · Membership · Refund · Invoice · PromoCode · PaymentMethod · SetupIntent
Platform & Finance Transfer · FeeMarkup · Topup · Withdrawal · LedgerAccount · PayoutAccount · PayoutMethod
Disputes Dispute · DisputeAlert · ResolutionCenter
Commerce Shipment · Lead · Entry · Review · Affiliate · Stats
Experiences & Courses Experience · Course · CourseChapter · CourseLesson · CourseLessonInteraction · CourseStudent
Communication ChatChannel · DmChannel · DmMember · Message · Reaction · Forum · ForumPost · SupportChannel · Notification
Advertising AdCampaign · AdGroup · Ad
Apps & AI App · AppBuild · AiChat · CompanyTokenTransaction
Verifications Verification