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.PaymentLinks.CreateAsync(paymentLinkCreate: new PaymentLinkCreate() {
Amount = 1299,
Country = "DE",
Currency = "EUR",
Store = true,
});
// handle response{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"url": "<string>",
"amount": 49999999,
"country": "<string>",
"currency": "<string>",
"intent": "authorize",
"cart_items": [
{
"amount": {
"currency": "USD",
"value": 500
},
"name": "Widget",
"quantity": 2
}
],
"payment_source": "ecommerce",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"status": "active",
"type": "payment-link",
"expires_at": "2024-06-01T00:00:00.000Z",
"external_identifier": "external-12345",
"statement_descriptor": {
"name": "ACME",
"description": "ACME San Jose Electronics",
"city": "San Jose",
"country": "US",
"phone_number": "+1234567890",
"url": "www.example.com",
"postal_code": "94560"
},
"locale": "en",
"merchant_name": "ACME Inc.",
"merchant_url": "https://merchant.example.com",
"merchant_banner_url": "https://merchant.example.com/banner.png",
"merchant_color": "#FF5733",
"merchant_message": "Thank you for your purchase!",
"merchant_terms_and_conditions_url": "https://merchant.example.com/terms",
"merchant_favicon_url": "https://merchant.example.com/favicon.ico",
"return_url": "https://merchant.example.com/return",
"metadata": {
"order_id": "ORD-12345"
},
"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>"
},
"shipping_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"
},
"id": "bf8c36ad-02d9-4904-b0f9-a230b149e341",
"buyer_id": "fe26475d-ec3e-4884-9553-f7356683f7f9",
"type": "shipping-details"
},
"connection_options": {},
"store": false,
"buyer_id": "a1b2c3d4-5678-90ab-cdef-1234567890ab"
}Create a new payment link.
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.PaymentLinks.CreateAsync(paymentLinkCreate: new PaymentLinkCreate() {
Amount = 1299,
Country = "DE",
Currency = "EUR",
Store = true,
});
// handle response{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"url": "<string>",
"amount": 49999999,
"country": "<string>",
"currency": "<string>",
"intent": "authorize",
"cart_items": [
{
"amount": {
"currency": "USD",
"value": 500
},
"name": "Widget",
"quantity": 2
}
],
"payment_source": "ecommerce",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"status": "active",
"type": "payment-link",
"expires_at": "2024-06-01T00:00:00.000Z",
"external_identifier": "external-12345",
"statement_descriptor": {
"name": "ACME",
"description": "ACME San Jose Electronics",
"city": "San Jose",
"country": "US",
"phone_number": "+1234567890",
"url": "www.example.com",
"postal_code": "94560"
},
"locale": "en",
"merchant_name": "ACME Inc.",
"merchant_url": "https://merchant.example.com",
"merchant_banner_url": "https://merchant.example.com/banner.png",
"merchant_color": "#FF5733",
"merchant_message": "Thank you for your purchase!",
"merchant_terms_and_conditions_url": "https://merchant.example.com/terms",
"merchant_favicon_url": "https://merchant.example.com/favicon.ico",
"return_url": "https://merchant.example.com/return",
"metadata": {
"order_id": "ORD-12345"
},
"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>"
},
"shipping_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"
},
"id": "bf8c36ad-02d9-4904-b0f9-a230b149e341",
"buyer_id": "fe26475d-ec3e-4884-9553-f7356683f7f9",
"type": "shipping-details"
},
"connection_options": {},
"store": false,
"buyer_id": "a1b2c3d4-5678-90ab-cdef-1234567890ab"
}payment-links.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"
The payment link to create
The amount for the payment link.
0 <= x <= 99999999The country code for the payment link.
The currency code for the payment link.
The guest buyer for the payment link.
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 expiration date and time for the payment link.
"2024-06-01T00:00:00.000Z"
Connection options for the payment link.
Show child attributes
Custom options to be passed to the account-updater connector, allowing for simulating different account updater responses.
Show child attributes
The type of response to simulate.
"updated""updated"
When the response_code is set to updated, the payment method's account number will be updated to this value.
12 - 18"4242424242424242"
When the response_code is set to updated, the payment method's expiration month will be updated to this value.
2"12"
When the response_code is set to updated, the payment method's expiration year will be updated to this value.
4"2030"
The type of error code to simulate.
"error"
Custom options to be passed to the adyen-afterpay connector.
Custom options to be passed to the adyen-alipay connector.
Custom options to be passed to the adyen-card connector.
Show child attributes
Set to true to enable Auto Rescue for a transaction. Use the maxDaysToRescue to specify a rescue window.
true
The rescue window for a transaction, in days, when autoRescue is set to true. You can specify a value between 1 and 48. For cards, the default is one calendar month. For SEPA, the default is 42 days.
20
The rescue scenario to simulate for a transaction, when autoRescue is set to true.
AutoRescueSuccessfulFirst, AutoRescueSuccessfulSecond, AutoRescueFailed, AutoRescueFraud "AutoRescueSuccessfulFirst"
The origin of the window where the payment is initiated, used for 3D Secure authentication.
"https://example.com"
Passes information of splitting payment amounts to the Adyen API.
Show child attributes
Split payment values to pass to the Adyen API on payment authorization. See the Adyen docs for details on the format and contents of the list.
Split payment values to pass to the Adyen API on payment capture. See the Adyen docs for details on the format and contents of the list.
Split payment values to pass to the Adyen API on payment refund. See the Adyen docs for details on the format and contents of the list.
Custom options to be passed to the adyen-cashapp connector.
Custom options to be passed to the adyen-giropay connector.
Custom options to be passed to the adyen-ideal connector.
Custom options to be passed to the adyen-sepa connector.
Show child attributes
Set to true to enable Auto Rescue for a transaction. Use the maxDaysToRescue to specify a rescue window.
true
The rescue window for a transaction, in days, when autoRescue is set to true. You can specify a value between 1 and 48. For cards, the default is one calendar month. For SEPA, the default is 42 days.
20
The rescue scenario to simulate for a transaction, when autoRescue is set to true.
AutoRescueSuccessfulFirst, AutoRescueSuccessfulSecond, AutoRescueFailed "AutoRescueSuccessfulFirst"
The name on the SEPA bank account.
"A. Schneider"
Custom options to be passed to the adyen-sofort connector.
Custom options to be passed to the adyen-vipps connector.
Custom options to be passed to the affirm-affirm connector.
Show child attributes
Passes additional discounts to the Affirm widget.
Show child attributes
{
"PRESDAY10": {
"discount_amount": 1000,
"discount_display_name": "President's Day 10% off"
},
"RETURN5": {
"discount_amount": 500,
"discount_display_name": "Returning customer 5% discount"
}
}Passes itinerary data to the Affirm API.
Show child attributes
The type of itinerary object.
"flight"
The booking/itinerary number (if applicable).
"ABC123"
Readable description of the itinerary item.
"MIA-DCA-2019-12-11T12:07"
The name of the venue where the event is hosted.
"Petco Park"
The address object that can be parsed.
"925 Collins Avenue, Miami Beach, FL, 33140, US"
The start date of this itinerary item.
"2019-12-05"
The corporation.
"Marriott"
Custom options to be passed to the braintree-card connector.
Show child attributes
Passes a discount amount to be applied to the transaction when using Braintree.
1000
Passes customFields to the Braintree API when creating a new payment. Custom fields allow you to customize your checkout experience by collecting specific information about your customers and their purchases.
Show child attributes
{ "checkout": "primary" }Additional dynamic fields to pass to the Braintree API
Show child attributes
Passes the 3DS status to the Braintree API using customFields with the key set to the value of three_ds_auth_status
"threeDStatus"
Passes the transaction.purchaseOrderNumber field when creating a new transaction.
"po-12345"
Passes the vaultPaymentMethodCriteria field when creating a new transaction.
ALWAYS, ON_SUCCESSFUL_TRANSACTION "ON_SUCCESSFUL_TRANSACTION"
Custom options to be passed to the cybersource-anti-fraud connector.
Show child attributes
A list of merchant defined data to be passed to the Cybersource Decision Manager API. Each key needs to be a numeric string.
Show child attributes
5000{ "1": "data" }The merchant ID to use for this transaction. This requires a meta key to be set up for use with Cybersource Decision Manager, and this overrides the connector configuration.
"merchant-1234"
The shipping method for this transaction.
"sameday"
Custom options to be passed to the cybersource-card connector.
Show child attributes
The merchant ID to use for this transaction. This requires a meta key to be set up for use with Cybersource, and this overrides the connector configuration.
"merchant-1234"
A list of merchant defined data to be passed to the Cybersource. Each key needs to be a numeric string.
Show child attributes
{ "1": "data" }The shipping method for this transaction.
"sameday"
Brief description of the order or any comment you wish to add to the order.
"This order is for a new customer"
Custom options to be passed to the cybersource-ideal connector.
Show child attributes
The merchant ID to use for this transaction. This requires a meta key to be set up for use with Cybersource, and this overrides the connector configuration.
"merchant-1234"
A list of merchant defined data to be passed to the Cybersource. Each key needs to be a numeric string.
Show child attributes
{ "1": "data" }The shipping method for this transaction.
"sameday"
Brief description of the order or any comment you wish to add to the order.
"This order is for a new customer"
Custom options to be passed to the cybersource-kcp connector.
Show child attributes
The merchant ID to use for this transaction. This requires a meta key to be set up for use with Cybersource, and this overrides the connector configuration.
"merchant-1234"
A list of merchant defined data to be passed to the Cybersource. Each key needs to be a numeric string.
Show child attributes
{ "1": "data" }The shipping method for this transaction.
"sameday"
Brief description of the order or any comment you wish to add to the order.
"This order is for a new customer"
Custom options to be passed to the dlocal-nequi connector.
Show child attributes
Passes wallet data to the dLocal API for those connectors that need it.
Show child attributes
Passes wallet.name to the dLocal API for those connectors that need it.
"John Doe"
Passes wallet.email to the dLocal API for those connectors that need it.
Passes wallet.token to the dLocal API for those connectors that need it.
"123456"
Passes wallet.username to the dLocal API for those connectors that need it.
"johnd"
Passes wallet.verify to the dLocal API for those connectors that need it.
true
Custom options to be passed to the dlocal-upi connector.
Show child attributes
Passes wallet data to the dLocal API for those connectors that need it.
Show child attributes
Passes wallet.name to the dLocal API for those connectors that need it.
"John Doe"
Passes wallet.email to the dLocal API for those connectors that need it.
Passes wallet.token to the dLocal API for those connectors that need it.
"123456"
Passes wallet.username to the dLocal API for those connectors that need it.
"johnd"
Passes wallet.verify to the dLocal API for those connectors that need it.
true
Passes wallet.recurring_info to the dLocal API for those connectors that need it.
Show child attributes
Indicates the frequency unit for the subscription. Allowed values are: DAY, WEEK, MONTH, BI_MONTHLY, QUARTER, SEMI_ANNUALLY, YEAR, ONDEMAND.
MONTH, WEEK, BI_MONTHLY, ONDEMAND, QUARTER, YEAR, SEMI_ANNUALLY, DAY Indicates the frequency for the subscription.
Indicates the start date for the subscription in format YYYYMMDD.
Indicates the end date for the subscription in format YYYYMMDD.
{
"subscription_end_at": "20241201",
"subscription_frequency": 1,
"subscription_frequency_unit": "MONTH",
"subscription_start_at": "20231201"
}Custom options to be passed to the fiserv-card connector.
Show child attributes
Passes installment data to the Fiserv API. This is now also a dedicated feature on the Gr4vy API.
Show child attributes
Passes the order.installmentOptions.numberOfInstallments field to the Fiserv API.
6
Passes the order.installmentOptions.installmentsInterest field to the Fiserv API.
true
Passes the order.installmentOptions.installmentDelayMonths field to the Fiserv API.
1
Passes the order.installmentOptions.merchantAdviceCodeSupported field to the Fiserv API.
true
Custom options to be passed to the forter-anti-fraud connector.
Show child attributes
The delivery type
DIGITAL, PHYSICAL, HYBRID "DIGITAL"
The delivery method
1 - 50Defines if this payment is made using guest checkout.
true
A list of cart items details to pass to the Forter API.
Show child attributes
Basic information about the cart item.
Show child attributes
Indicates whether the item is a physical good or a service/digital item.
TANGIBLE, NON_TANGIBLE Details about how the item will be delivered.
Show child attributes
The type of delivery for this cart item.
DIGITAL, PHYSICAL, HYBRID The method of delivery for this cart item.
List of beneficiaries who will receive this item.
Show child attributes
Personal details of the beneficiary.
Show child attributes
First name of the beneficiary.
Last name of the beneficiary.
Email address of the beneficiary.
Address information of the beneficiary.
Show child attributes
The country code of the beneficiary's address.
First line of the beneficiary's address.
Second line of the beneficiary's address.
Zip or postal code of the beneficiary's address.
State or region of the beneficiary's address.
Company name associated with the beneficiary's address.
City of the beneficiary's address.
Phone numbers associated with the beneficiary.
Show child attributes
The phone number of the beneficiary.
Comments related to the beneficiary.
Show child attributes
Comments from the user to the merchant.
Message intended for the beneficiary of the item.
Comments from the merchant about this transaction.
Information about the discount applied to this order.
Show child attributes
The coupon code applied to the order.
The type of discount applied to the order.
Monetary details of the discount amount.
Show child attributes
The discount amount in USD.
The discount amount in local currency.
The currency code for the discount amount.
"EUR"
The percentage discount applied via the coupon.
Custom options to be passed to the givingblock-givingblock connector.
Show child attributes
The default cryptocurrency to present at checkout. This can be used to ensure the user is presented with the same currency in both your checkout and the Giving Block checkout.
"BTC"
Custom options to be passed to the latitude-latitude connector.
Show child attributes
The promotionReference field passed to the purchase API.
128"promotion-123"
Custom options to be passed to the latitude-latitudeds connector.
Show child attributes
The promotionReference field passed to the purchase API.
128"promotion-123"
Custom options to be passed to the mattilda-tapi connector.
Show child attributes
Defines the date at which the payment will expire if not completed. Must be provided in ISO 8601 format (YYYY-MM-DD). If not specified, it defaults to 7 days in the future from the current date.
"2030-12-01"
Custom options to be passed to the mattilda-tapifintechs connector.
Show child attributes
Defines the date at which the payment will expire if not completed. Must be provided in ISO 8601 format (YYYY-MM-DD). If not specified, it defaults to 7 days in the future from the current date.
"2030-12-01"
Custom options to be passed to the mock-card connector.
Show child attributes
Allows for mocking the merchant advice code.
When set to true, prevents retries on failed transactions.
Custom options to be passed to the nuvei-card connector.
Show child attributes
General data about the customer provided by the merchant.
255"user=123,trusted=false"
Provides additional airline data for Nuvei payments.
Custom options to be passed to the nuvei-pse connector.
Show child attributes
Customer type ("N" for persona natural, "J" for persona jurídica)
"N"
Customer’s document type
"CC"
Customer’s document number
"CC"
The bank code of the selected bank
"5432"
Custom options to be passed to the oxxo-oxxo connector.
Show child attributes
Defines a custom expiration time (unix time) after which Oxxo payment requests are cancelled
1750074293
Approval URL that will receive a charge payment method reference.
"https://example.com"
Custom options to be passed to the paypal-paypal connector.
Show child attributes
Additional Set Transaction Context Values (STC) to be sent to PayPal as part of the transaction.
Show child attributes
{ "sender_account_id": "customer-1234" }Shipping information to be passed to the PayPal API.
Show child attributes
Shipping options that the payee or merchant offers to the payer to ship or pick up their items.
10Show child attributes
A unique ID that identifies a payer-selected shipping option.
1 - 127A description that the payer sees, which helps them choose an appropriate shipping option.
1 - 127If the API request sets selected = true, it represents the shipping option that the payee or merchant expects to be pre-selected for the payer when they first view the shipping.options in the PayPal Checkout experience. Only one shipping.option can be set to selected=true.
A classification for the method of purchase fulfillment.
SHIPPING, PICKUP, PICKUP_IN_STORE, PICKUP_FROM_PERSON "SHIPPING"
The shipping cost for the selected option.
Show child attributes
{
"options": [
{
"amount": { "currency_code": "USD", "value": "10.00" },
"id": "ship_1234",
"label": "Free Shipping",
"selected": true,
"type": "SHIPPING"
}
]
}Custom options to be passed to the paypal-paypalpaylater connector.
Show child attributes
Additional Set Transaction Context Values (STC) to be sent to PayPal as part of the transaction.
Show child attributes
{ "sender_account_id": "customer-1234" }Shipping information to be passed to the PayPal API.
Show child attributes
Shipping options that the payee or merchant offers to the payer to ship or pick up their items.
10Show child attributes
A unique ID that identifies a payer-selected shipping option.
1 - 127A description that the payer sees, which helps them choose an appropriate shipping option.
1 - 127If the API request sets selected = true, it represents the shipping option that the payee or merchant expects to be pre-selected for the payer when they first view the shipping.options in the PayPal Checkout experience. Only one shipping.option can be set to selected=true.
A classification for the method of purchase fulfillment.
SHIPPING, PICKUP, PICKUP_IN_STORE, PICKUP_FROM_PERSON "SHIPPING"
The shipping cost for the selected option.
Show child attributes
The three-character ISO currency code.
The amount value, which might include a decimal portion.
1 - 32{
"options": [
{
"amount": { "currency_code": "USD", "value": "10.00" },
"id": "ship_1234",
"label": "Free Shipping",
"selected": true,
"type": "SHIPPING"
}
]
}Custom options to be passed to the powertranz-card connector.
Show child attributes
Indicates to PowerTranz whether to skip the 3DS authentication for this transaction.
true
Custom options to be passed to the stripe-card connector.
Show child attributes
Passes the error_on_requires_action option to the Stripe API. Set to true to fail the payment attempt if it transitions into requires_action. Use this parameter for simpler integrations that don't handle customer actions, such as saving cards without authentication.
true
Stripe options to support Stripe Connect
Show child attributes
The Stripe Connect account to target using the Stripe-Account header.
"act_123456"
The fee to charge the connected account.
"123"
The Stripe Connect account to target using the on_behalf_of request parameter.
"act_123456"
The Stripe Connect account to target using the transfer_data.destination request parameter.
"act_123456"
A string that identifies the payment as part of a group.
"ORDER100"
Custom options to be passed to the travelhub-card connector.
Show child attributes
A list of customData to pass to the TravelHub API.
Show child attributes
Customer company name to pass to the TravelHub API.
Custom options to be passed to the trustly-trustly connector.
Custom options to be passed to the wpay-everydaypay connector.
Show child attributes
The customer ID for the Everyday Rewards account.
The access token for the Everyday Rewards account.
The ID of the device on which the payment is occuring.
Whether the transaction should redirect post-payment
true
Custom options to be passed to the wpay-payto connector.
Show child attributes
Options to pass to the instrument resource in the Wpay PayTo API.
Show child attributes
Simulate responses for this resource.
Show child attributes
The simulation being requested. Please refer to the developer guide for a list of all available simulations.
The delay in seconds before the requested simulation is executed.
5
Options to pass to the payment resource in the Wpay PayTo API.
Show child attributes
Simulate responses for this resource.
Show child attributes
The simulation being requested. Please refer to the developer guide for a list of all available simulations.
The delay in seconds before the requested simulation is executed.
5
Options to pass to the refund resource in the Wpay PayTo API.
Show child attributes
Simulate responses for this resource.
Show child attributes
The simulation being requested. Please refer to the developer guide for a list of all available simulations.
The delay in seconds before the requested simulation is executed.
5
The merchant reference for the payment link.
1 - 200"external-12345"
The statement descriptor for the payment link.
Show child attributes
Reflects your doing business as (DBA) name.
5 - 22"ACME"
A short description about the purchase.
5 - 22"ACME San Jose Electronics"
The merchant's city to be displayed in a statement descriptor.
1 - 50"San Jose"
The 2-letter ISO country code of the merchant to be displayed in a statement descriptor.
"US"
The value in the phone number field of a customer's statement which should be formatted according to the E164 number standard.
"+1234567890"
The merchant's URL to be displayed in a statement descriptor.
1 - 50"www.example.com"
The merchant's postal code or zip code.
1 - 50"94560"
The locale for the payment link.
1 - 50"en"
The merchant's display name.
1 - 100"ACME Inc."
The merchant's website URL.
"https://merchant.example.com"
The merchant's banner image URL.
"https://merchant.example.com/banner.png"
The merchant's brand color.
"#FF5733"
A message from the merchant.
1 - 255"Thank you for your purchase!"
URL to the merchant's terms and conditions.
"https://merchant.example.com/terms"
URL to the merchant's favicon.
"https://merchant.example.com/favicon.ico"
The transaction intent for the payment link.
authorize, capture The return URL after payment completion.
"https://merchant.example.com/return"
The cart items for the payment link.
Show child attributes
The name of the cart item. The value you set for this property may be truncated if the maximum length accepted by a payment service provider is less than 255 characters.
1 - 255The quantity of this item in the cart. This value cannot be negative or zero.
x <= 99999999The amount for an individual item represented as a monetary amount in the smallest currency unit for the given currency, for example 1299 USD cents represents $12.99. The amount sent through to the payment processor as unitary amount will be calculated to include the discount and tax values sent as part of this cart item.
0 <= x <= 99999999The amount discounted for this item represented as a monetary amount in the smallest currency unit for the given currency, for example 1299 USD cents represents $12.99.
0 <= x <= 999999990
The tax amount for this item represented as a monetary amount in the smallest currency unit for the given currency, for example 1299 USD cents represents $12.99.
0 <= x <= 999999990
An external identifier for the cart item. This can be set to any value and is not sent to the payment service.
1 - 200"goprohd"
The SKU or product code for the item.
1 - 200"GPHD1078"
The UPC for the item.
1 - 50"012345678905"
The product URL for the item.
"https://example.com/catalog/go-pro-hd"
The URL for the image of the item.
"https://example.com/images/go-pro-hd.jpg"
A list of strings containing product categories for the item.
1 - 50["camera", "travel", "gear"]The product type of the cart item.
physical, discount, shipping_fee, sales_tax, digital, gift_card, store_credit, surcharge "physical"
The seller country of the cart item.
"US"
Whether the item is exempt of tax.
false
The unit of measure or the unit of measure code.
1 - 50"feet"
Item commodity code. Generally a UNSPSC code.
1 - 50"43211503"
Brief item description.
1 - 255"A brief description of an interesting item."
Item import or export duties represented as a monetary amount in the smallest currency unit for the given currency, for example 1299 cents to create an authorization for $12.99
0 <= x <= 999999991299
Freight/shipping amount represented as a monetary amount in the smallest currency unit for the given currency, for example 1299 cents to create an authorization for $12.99
0 <= x <= 999999991299
Arbitrary metadata for the payment link.
{ "order_id": "ORD-12345" }The way payment method information made it to this transaction.
ecommerce, moto, recurring, installment, card_on_file Whether to store the payment method for future use.
The ID of the buyer to associate the payment method with. Note: When buyer_id is provided, the payment link should be treated as a secret as it will allow the user to manage payment methods for the associated buyer.
"a1b2c3d4-5678-90ab-cdef-1234567890ab"
Successful Response
The unique identifier for the payment link.
The URL for the payment link.
The amount for the payment link.
0 <= x <= 99999999The country code for the payment link.
The currency code for the payment link.
The transaction intent for the payment link.
authorize, capture The cart items for the payment link.
Show child attributes
The name of the cart item. The value you set for this property may be truncated if the maximum length accepted by a payment service provider is less than 255 characters.
1 - 255The quantity of this item in the cart. This value cannot be negative or zero.
x <= 99999999The amount for an individual item represented as a monetary amount in the smallest currency unit for the given currency, for example 1299 USD cents represents $12.99. The amount sent through to the payment processor as unitary amount will be calculated to include the discount and tax values sent as part of this cart item.
0 <= x <= 99999999The amount discounted for this item represented as a monetary amount in the smallest currency unit for the given currency, for example 1299 USD cents represents $12.99.
0 <= x <= 999999990
The tax amount for this item represented as a monetary amount in the smallest currency unit for the given currency, for example 1299 USD cents represents $12.99.
0 <= x <= 999999990
An external identifier for the cart item. This can be set to any value and is not sent to the payment service.
1 - 200"goprohd"
The SKU or product code for the item.
1 - 200"GPHD1078"
The UPC for the item.
1 - 50"012345678905"
The product URL for the item.
"https://example.com/catalog/go-pro-hd"
The URL for the image of the item.
"https://example.com/images/go-pro-hd.jpg"
A list of strings containing product categories for the item.
1 - 50["camera", "travel", "gear"]The product type of the cart item.
physical, discount, shipping_fee, sales_tax, digital, gift_card, store_credit, surcharge "physical"
The seller country of the cart item.
"US"
Whether the item is exempt of tax.
false
The unit of measure or the unit of measure code.
1 - 50"feet"
Item commodity code. Generally a UNSPSC code.
1 - 50"43211503"
Brief item description.
1 - 255"A brief description of an interesting item."
Item import or export duties represented as a monetary amount in the smallest currency unit for the given currency, for example 1299 cents to create an authorization for $12.99
0 <= x <= 999999991299
Freight/shipping amount represented as a monetary amount in the smallest currency unit for the given currency, for example 1299 cents to create an authorization for $12.99
0 <= x <= 999999991299
[
{
"amount": { "currency": "USD", "value": 500 },
"name": "Widget",
"quantity": 2
}
]The way payment method information made it to this transaction.
ecommerce, moto, recurring, installment, card_on_file The date and time the payment link was created.
The date and time the payment link was last updated.
The status of the payment link.
active, completed, expired, processing Always payment-link.
"payment-link"The expiration date and time for the payment link.
"2024-06-01T00:00:00.000Z"
The merchant reference for the payment link.
1 - 200"external-12345"
The statement descriptor for the payment link.
Show child attributes
Reflects your doing business as (DBA) name.
5 - 22"ACME"
A short description about the purchase.
5 - 22"ACME San Jose Electronics"
The merchant's city to be displayed in a statement descriptor.
1 - 50"San Jose"
The 2-letter ISO country code of the merchant to be displayed in a statement descriptor.
"US"
The value in the phone number field of a customer's statement which should be formatted according to the E164 number standard.
"+1234567890"
The merchant's URL to be displayed in a statement descriptor.
1 - 50"www.example.com"
The merchant's postal code or zip code.
1 - 50"94560"
The locale for the payment link.
"en"
The merchant's display name.
1 - 100"ACME Inc."
The merchant's website URL.
"https://merchant.example.com"
The merchant's banner image URL.
"https://merchant.example.com/banner.png"
The merchant's brand color.
1 - 100"#FF5733"
A message from the merchant.
1 - 255"Thank you for your purchase!"
URL to the merchant's terms and conditions.
"https://merchant.example.com/terms"
URL to the merchant's favicon.
"https://merchant.example.com/favicon.ico"
The return URL after payment completion.
"https://merchant.example.com/return"
Arbitrary metadata for the payment link.
{ "order_id": "ORD-12345" }The buyer associated with the payment link.
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 shipping details for the payment link.
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 ID for the shipping details.
"bf8c36ad-02d9-4904-b0f9-a230b149e341"
The ID for the buyer.
"fe26475d-ec3e-4884-9553-f7356683f7f9"
Always shipping-details.
"shipping-details"Whether the payment method was stored.
The ID of the buyer to associate with the stored payment method.
"a1b2c3d4-5678-90ab-cdef-1234567890ab"
Was this page helpful?