Create Payout Method
This method creates a payout transaction to card, SBP phone, or bank transfer.
RPC: payment.v1.PubPaymentService/CreatePayout
TIP
Field external_id is not required.
To fetch bank_id and payment_method_id fields look at FetchPayoutMethods method.
Request Example
shell
curl 'https://api.ibuy.exchange/payment.v1.PubPaymentService/CreatePayout' --header 'Authorization: Bearer <token>' --header 'Content-Type: application/json' --data '{
"external_id": "ext_12345",
"bank_id": "tinkoff",
"payment_method_id": "pm_123",
"amount": "100.00",
"card": {
"holder_name": "IVAN IVANOV",
"card": "4111111111111111"
},
"hook_url": "https://example.com/hooks/payouts"
}'typescript
const paymentService = createClient(ibuy.paymentv1.PubPaymentService, transport);
const response = await paymentService.createPayout({
externalId: "ext_12345",
bankId: "tinkoff",
paymentMethodId: "pm_123",
amount: "100.00",
card: {
holderName: "IVAN IVANOV",
card: "4111111111111111"
},
hookUrl: "https://example.com/hooks/payouts"
});
console.log(response.id);Response Example
json
{
"id": "uuid v4"
}