using Gr4vy;
using Gr4vy.Models.Components;
var sdk = new Gr4vySDK(
id: "example",
server: SDKConfig.Server.Sandbox,
bearerAuthSource: Auth.WithToken(privateKey),
merchantAccountId: "default"
);
var res = await sdk.Payouts.CreateAsync(payoutCreate: new PayoutCreate() {
Amount = 1299,
Currency = "EUR",
PaymentServiceId = "ed8bd87d-85ad-40cf-8e8f-007e21e55aad",
PaymentMethod = PayoutCreatePaymentMethod.CreatePaymentMethodStoredCard(
new PaymentMethodStoredCard() {
Id = "852b951c-d7ea-4c98-b09e-4a1c9e97c077",
}
),
});
// handle response{
"amount": 123,
"created_at": "2023-11-07T05:31:56Z",
"currency": "<string>",
"payment_method": {
"method": "abitab",
"type": "payment-method",
"approval_url": "https://gr4vy.app/redirect/12345",
"country": "US",
"currency": "USD",
"details": {
"bin": "<string>",
"card_type": "credit",
"card_issuer_name": "<string>"
},
"expiration_date": "12/30",
"fingerprint": "20eb353620155d2b5fc864cc46a73ea77cb92c725238650839da1813fa987a17",
"label": "1234",
"last_replaced_at": "2013-07-16T19:23:00.000+00:00",
"mode": "card",
"scheme": "visa",
"id": "852b951c-d7ea-4c98-b09e-4a1c9e97c077",
"approval_target": "any",
"external_identifier": "card-12345",
"payment_account_reference": "V0010014629724763377327521982"
},
"payment_service": {
"payment_service_definition_id": "<string>",
"type": "payment-service",
"id": "b6c9eb12-2b62-4103-99b9-e3efc94e396d",
"method": "card",
"display_name": "Nuvei"
},
"status": "declined",
"updated_at": "2023-11-07T05:31:56Z",
"type": "payout",
"id": "6f96a57e-a35b-4f98-b192-d298995f811a",
"buyer": {
"type": "buyer",
"id": "fe26475d-ec3e-4884-9553-f7356683f7f9",
"display_name": "John Doe",
"external_identifier": "buyer-12345",
"billing_details": {
"first_name": "John",
"last_name": "Doe",
"email_address": "[email protected]",
"phone_number": "+1234567890",
"address": {
"city": "San Jose",
"country": "US",
"postal_code": "94560",
"state": "California",
"state_code": "US-CA",
"house_number_or_name": "10",
"line1": "Stafford Appartments",
"line2": "29th Street",
"organization": "Gr4vy"
},
"tax_id": {
"value": "<string>",
"kind": "ae.trn"
}
},
"account_number": "<string>"
},
"category": "online_gambling",
"external_identifier": "payout-12345",
"merchant": {
"name": "<string>",
"identification_number": "<string>",
"phone_number": "<string>",
"url": "<string>",
"merchant_category_code": "<string>",
"type": "merchant",
"statement_descriptor": "Winnings",
"address": {
"city": "San Jose",
"country": "US",
"postal_code": "94560",
"state": "California",
"state_code": "US-CA",
"house_number_or_name": "10",
"line1": "Stafford Appartments",
"line2": "29th Street",
"organization": "Gr4vy"
}
},
"merchant_account_id": "default",
"payment_service_payout_id": "pout-12345"
}Creates a new payout.
using Gr4vy;
using Gr4vy.Models.Components;
var sdk = new Gr4vySDK(
id: "example",
server: SDKConfig.Server.Sandbox,
bearerAuthSource: Auth.WithToken(privateKey),
merchantAccountId: "default"
);
var res = await sdk.Payouts.CreateAsync(payoutCreate: new PayoutCreate() {
Amount = 1299,
Currency = "EUR",
PaymentServiceId = "ed8bd87d-85ad-40cf-8e8f-007e21e55aad",
PaymentMethod = PayoutCreatePaymentMethod.CreatePaymentMethodStoredCard(
new PaymentMethodStoredCard() {
Id = "852b951c-d7ea-4c98-b09e-4a1c9e97c077",
}
),
});
// handle response{
"amount": 123,
"created_at": "2023-11-07T05:31:56Z",
"currency": "<string>",
"payment_method": {
"method": "abitab",
"type": "payment-method",
"approval_url": "https://gr4vy.app/redirect/12345",
"country": "US",
"currency": "USD",
"details": {
"bin": "<string>",
"card_type": "credit",
"card_issuer_name": "<string>"
},
"expiration_date": "12/30",
"fingerprint": "20eb353620155d2b5fc864cc46a73ea77cb92c725238650839da1813fa987a17",
"label": "1234",
"last_replaced_at": "2013-07-16T19:23:00.000+00:00",
"mode": "card",
"scheme": "visa",
"id": "852b951c-d7ea-4c98-b09e-4a1c9e97c077",
"approval_target": "any",
"external_identifier": "card-12345",
"payment_account_reference": "V0010014629724763377327521982"
},
"payment_service": {
"payment_service_definition_id": "<string>",
"type": "payment-service",
"id": "b6c9eb12-2b62-4103-99b9-e3efc94e396d",
"method": "card",
"display_name": "Nuvei"
},
"status": "declined",
"updated_at": "2023-11-07T05:31:56Z",
"type": "payout",
"id": "6f96a57e-a35b-4f98-b192-d298995f811a",
"buyer": {
"type": "buyer",
"id": "fe26475d-ec3e-4884-9553-f7356683f7f9",
"display_name": "John Doe",
"external_identifier": "buyer-12345",
"billing_details": {
"first_name": "John",
"last_name": "Doe",
"email_address": "[email protected]",
"phone_number": "+1234567890",
"address": {
"city": "San Jose",
"country": "US",
"postal_code": "94560",
"state": "California",
"state_code": "US-CA",
"house_number_or_name": "10",
"line1": "Stafford Appartments",
"line2": "29th Street",
"organization": "Gr4vy"
},
"tax_id": {
"value": "<string>",
"kind": "ae.trn"
}
},
"account_number": "<string>"
},
"category": "online_gambling",
"external_identifier": "payout-12345",
"merchant": {
"name": "<string>",
"identification_number": "<string>",
"phone_number": "<string>",
"url": "<string>",
"merchant_category_code": "<string>",
"type": "merchant",
"statement_descriptor": "Winnings",
"address": {
"city": "San Jose",
"country": "US",
"postal_code": "94560",
"state": "California",
"state_code": "US-CA",
"house_number_or_name": "10",
"line1": "Stafford Appartments",
"line2": "29th Street",
"organization": "Gr4vy"
}
},
"merchant_account_id": "default",
"payment_service_payout_id": "pout-12345"
}payouts.write scope.Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
The ID of the merchant account to use for this request.
"default"
PayoutCreate
Represents the data required to create a new payout.
The monetary amount for this payout, in the smallest currency unit for the given currency, for example 1299 cents to create an authorization for $12.99.
0 <= x <= 99999999The ISO-4217 currency code for this payout.
The ID of the payment service to use for the payout.
The type of payment method to send funds too.
Show child attributes
The 13-19 digit number for this card as it can be found on the front of the card.
13 - 19The expiration date of the card, formatted MM/YY.
5Set to card to use a new card.
"card"The optional card's network scheme.
accel, amex, bancontact, carte-bancaire, cirrus, culiance, dankort, diners-club, discover, eftpos-australia, elo, hipercard, jcb, maestro, mastercard, mir, nyce, other, pulse, rupay, star, uatp, unionpay, visa "visa"
The merchant identifier for this card.
1 - 200"card-12345"
The type of payout to process.
online_gambling "online_gambling"
A value that can be used to match the payout against your own records.
1 - 200"payout-12345"
The id of a stored buyer to use for this payout Use this instead of the buyer or buyer_external_identifier.
"fe26475d-ec3e-4884-9553-f7356683f7f9"
Inline buyer details for the payout. Use this instead of the buyer_id or buyer_external_identifier.
Show child attributes
The display name for the buyer.
1 - 200"John Doe"
The merchant identifier for this buyer.
1 - 200"buyer-12345"
The billing name, address, email, and other fields for this buyer.
Show child attributes
The first name(s) or given name for the buyer.
1 - 255"John"
The last name, or family name, of the buyer.
1 - 255"Doe"
The phone number for the buyer which should be formatted according to the E164 number standard.
"+1234567890"
The billing address for the buyer.
Show child attributes
The city for the address.
1 - 100"San Jose"
The country for the address in ISO 3166 format.
"US"
The postal code or zip code for the address.
1 - 50"94560"
The state, county, or province for the address.
1 - 255"California"
The code of state, county, or province for the address in ISO 3166-2 format.
"US-CA"
The house number or name for the address. Not all payment services use this field but some do.
1 - 255"10"
The first line of the address.
1 - 255"Stafford Appartments"
The second line of the address.
1 - 255"29th Street"
The optional name of the company or organisation to add to the address.
1 - 255"Gr4vy"
The tax ID information associated with the billing details.
Show child attributes
The tax ID for the buyer.
1 - 50The kind of tax ID
ae.trn, au.abn, ar.dni, ar.cuil, ar.cuit, br.cnpj, br.cpf, ca.bn, ca.gst_hst, ca.pst_bc, ca.pst_mb, ca.pst_sk, ca.qst, ch.vat, cl.tin, co.itin, co.nit, es.cif, eu.vat, gb.vat, hk.br, id.nik, id.npwp, in.gst, in.pan, jp.cn, jp.rn, kr.brn, li.uid, mx.curp, mx.rfc, my.frp, my.itn, my.nric, my.sst, no.vat, nz.gst, pe.ruc, ph.tin, ru.inn, ru.kpp, sa.vat, sg.gst, sg.uen, th.id, th.vat, tw.vat, us.ein, za.vat, bo.ci, uy.rut, uy.ci The buyer account number
1 - 200The optional shipping details for this buyer.
Show child attributes
The first name(s) or given name for the buyer.
1 - 255"John"
The last name, or family name, of the buyer.
1 - 255"Doe"
The phone number for the buyer which should be formatted according to the E164 number standard.
"+1234567890"
The billing address for the buyer.
Show child attributes
The city for the address.
1 - 100"San Jose"
The country for the address in ISO 3166 format.
"US"
The postal code or zip code for the address.
1 - 50"94560"
The state, county, or province for the address.
1 - 255"California"
The code of state, county, or province for the address in ISO 3166-2 format.
"US-CA"
The house number or name for the address. Not all payment services use this field but some do.
1 - 255"10"
The first line of the address.
1 - 255"Stafford Appartments"
The second line of the address.
1 - 255"29th Street"
The optional name of the company or organisation to add to the address.
1 - 255"Gr4vy"
The external_identifier of a stored buyer to use for this payout. Use this instead of the buyer_id or buyer.
1 - 200"buyer-12345"
Merchant information for the source of the payout.
Show child attributes
The name of the merchant.
1 - 255Unique value which identifies a merchant for processing transactions, also known as a MID.
1 - 200The phone number for the merchant which should be formatted according to the E164 number standard.
Merchant website URL.
Value to explain charges or payments on bank statements.
5 - 22Merchant classification for the type of goods or services it provides.
1 - 4The address for the merchant.
Show child attributes
The city for the address.
1 - 100"San Jose"
The country for the address in ISO 3166 format.
"US"
The postal code or zip code for the address.
1 - 50"94560"
The state, county, or province for the address.
1 - 255"California"
The code of state, county, or province for the address in ISO 3166-2 format.
"US-CA"
The house number or name for the address. Not all payment services use this field but some do.
1 - 255"10"
The first line of the address.
1 - 255"Stafford Appartments"
The second line of the address.
1 - 255"29th Street"
The optional name of the company or organisation to add to the address.
1 - 255"Gr4vy"
Optional fields for processing payouts on specific payment services.
Show child attributes
Custom options for checkout-card payment service.
Successful Response
PayoutSummary
Represents a summary of a payout.
The monetary amount for this payout, in the smallest currency unit for the given currency, for example 1299 cents to create an authorization for $12.99.
The date this payout was created at.
A supported ISO-4217 currency code.
The payment method used for this payout.
Show child attributes
The type of this payment method.
abitab, affirm, afterpay, alipay, alipayhk, applepay, arcuspaynetwork, bacs, bancontact, bank, banked, bcp, becs, bitpay, blik, boleto, boost, card, cashapp, chaseorbital, clearpay, click-to-pay, dana, dcb, dlocal, ebanx, efecty, eps, everydaypay, gcash, gem, gemds, gift-card, giropay, givingblock, gocardless, googlepay, googlepay_pan_only, gopay, grabpay, ideal, kakaopay, kcp, khipu, klarna, latitude, latitudeds, laybuy, linepay, linkaja, maybankqrpay, mercadopago, multibanco, multipago, nequi, netbanking, network-token, nupay, oney_10x, oney_12x, oney_3x, oney_4x, oney_6x, ovo, oxxo, p24, pagoefectivo, payid, paymaya, paypal, paypalpaylater, payto, payvalida, picpay, pix, plaid, pse, rabbitlinepay, razorpay, rapipago, redpagos, scalapay, sepa, servipag, shopeepay, singteldash, smartpay, sofort, spei, stitch, stripedd, stripetoken, tapi, tapifintechs, thaiqr, touchngo, truemoney, trustly, trustlyeurope, upi, venmo, vipps, waave, webpay, wechat, yape, zippay Always payment-method.
"payment-method"The optional URL that the buyer needs to be redirected to to further authorize their payment.
"https://gr4vy.app/redirect/12345"
The 2-letter ISO code of the country this payment method can be used for. If this value is null the payment method may be used in multiple countries.
"US"
The ISO-4217 currency code that this payment method can be used for. If this value is null the payment method may be used for multiple currencies.
"USD"
The expiration date for the payment method.
5"12/30"
The unique hash derived from the payment method identifier (e.g. card number).
"20eb353620155d2b5fc864cc46a73ea77cb92c725238650839da1813fa987a17"
A label for the card or the account. For a paypal payment method this is the user's email address. For a card it is the last 4 digits of the card.
320"1234"
The date and time when this card was last replaced by the account updater.
"2013-07-16T19:23:00.000+00:00"
The mode to use with this payment method.
card, redirect, applepay, googlepay, checkout-session, click-to-pay, gift-card, bank "card"
The scheme of the card. Only applies to card payments.
accel, amex, bancontact, carte-bancaire, cirrus, culiance, dankort, diners-club, discover, eftpos-australia, elo, hipercard, jcb, maestro, mastercard, mir, nyce, other, pulse, rupay, star, uatp, unionpay, visa "visa"
The ID of the payment method.
"852b951c-d7ea-4c98-b09e-4a1c9e97c077"
The browser target that an approval URL must be opened in. If any or null, then there is no specific requirement.
new_window, any "any"
An external identifier that can be used to match the payment method against your own records.
1 - 200"card-12345"
The payment account reference (PAR) returned by the card scheme. This is a unique reference to the underlying account that has been used to fund this payment method.
"V0010014629724763377327521982"
The payment service used for this payout.
Show child attributes
The ID of the connection used for this payout.
Always payment-service.
"payment-service"The ID for the payout service.
"b6c9eb12-2b62-4103-99b9-e3efc94e396d"
Always card.
"card"The display name of the connection used for this payout.
"Nuvei"
The status of the payout.
declined, failed, pending, succeeded The date this payout was last updated at.
Always payout.
"payout"The ID for the payout.
"6f96a57e-a35b-4f98-b192-d298995f811a"
The buyer used for this payout.
Show child attributes
Always buyer.
"buyer"The ID for the buyer.
"fe26475d-ec3e-4884-9553-f7356683f7f9"
The display name for the buyer.
1 - 200"John Doe"
The merchant identifier for this buyer.
1 - 200"buyer-12345"
The billing name, address, email, and other fields for this buyer.
Show child attributes
The first name(s) or given name for the buyer.
1 - 255"John"
The last name, or family name, of the buyer.
1 - 255"Doe"
The phone number for the buyer which should be formatted according to the E164 number standard.
"+1234567890"
The billing address for the buyer.
Show child attributes
The city for the address.
1 - 100"San Jose"
The country for the address in ISO 3166 format.
"US"
The postal code or zip code for the address.
1 - 50"94560"
The state, county, or province for the address.
1 - 255"California"
The code of state, county, or province for the address in ISO 3166-2 format.
"US-CA"
The house number or name for the address. Not all payment services use this field but some do.
1 - 255"10"
The first line of the address.
1 - 255"Stafford Appartments"
The second line of the address.
1 - 255"29th Street"
The optional name of the company or organisation to add to the address.
1 - 255"Gr4vy"
The tax ID information associated with the billing details.
Show child attributes
The tax ID for the buyer.
1 - 50The kind of tax ID
ae.trn, au.abn, ar.dni, ar.cuil, ar.cuit, br.cnpj, br.cpf, ca.bn, ca.gst_hst, ca.pst_bc, ca.pst_mb, ca.pst_sk, ca.qst, ch.vat, cl.tin, co.itin, co.nit, es.cif, eu.vat, gb.vat, hk.br, id.nik, id.npwp, in.gst, in.pan, jp.cn, jp.rn, kr.brn, li.uid, mx.curp, mx.rfc, my.frp, my.itn, my.nric, my.sst, no.vat, nz.gst, pe.ruc, ph.tin, ru.inn, ru.kpp, sa.vat, sg.gst, sg.uen, th.id, th.vat, tw.vat, us.ein, za.vat, bo.ci, uy.rut, uy.ci The buyer account number.
1 - 200The type of payout to process.
online_gambling "online_gambling"
The merchant identifier for this payout.
1 - 200"payout-12345"
The merchant details associated to this payout.
Show child attributes
The name of the merchant.
1 - 255Unique value which identifies a merchant for processing transactions, also known as a MID.
1 - 200The phone number for the merchant which should be formatted according to the E164 number standard.
Merchant website URL.
Merchant classification for the type of goods or services it provides.
1 - 4Always merchant.
"merchant"Value to explain charges or payments on bank statements.
5 - 22"Winnings"
The address for the merchant.
Show child attributes
The city for the address.
1 - 100"San Jose"
The country for the address in ISO 3166 format.
"US"
The postal code or zip code for the address.
1 - 50"94560"
The state, county, or province for the address.
1 - 255"California"
The code of state, county, or province for the address in ISO 3166-2 format.
"US-CA"
The house number or name for the address. Not all payment services use this field but some do.
1 - 255"10"
The first line of the address.
1 - 255"Stafford Appartments"
The second line of the address.
1 - 255"29th Street"
The optional name of the company or organisation to add to the address.
1 - 255"Gr4vy"
The ID of the merchant account this payout was created for.
"default"
The ID of the payout in the underlying payment service.
1 - 200"pout-12345"
Was this page helpful?