Customer Created Webhook
The CUSTOMER_CREATED webhook is sent when a customer is created.
Note
The endpoint for webhooks is unique for each client. To set up a webhook endpoint, see Defining a Webhook Endpoint.
Content-Type
Indicates that the data appears in JSON format. Set to application/json.
salt
Random string.
signature
Signature calculated for each webhook individually.
timestamp
Timestamp for the webhook, in Unix time (seconds).
created_at
Time that the webhook was created, in Unix time.
Note
Inside the
data
object, some webhooks have anothercreated_at
field that refers to a different event.
data
Contains the actual data of the webhook.
For details, see below.
id
ID of the webhook. String starting with wh_.
status
Status of the webhook. One of the following:
NEW
CLO - Closed.
ERR - Error.
RET - Re-sent.
Note
Inside the
data
object, some webhooks have anotherstatus
field that refers to a different event.
trigger_operation_id
ID of the operation that triggered the webhook. UUID.
type
Name of the webhook type.
Note
The name in the Client Portal is different.
addresses
Describes the addresses associated with this customer.
canton
Name of the canton administrative subdivision, as used in banking.
city
City portion of the address.
country
The two-letter ISO 3166-1 ALPHA-2 code for the country.
created_at
Time of creation of the object, in Unix time.
district
Name of the district administrative subdivision, as used in banking.
id
ID of the
address
object.
line_1
Line 1 of the address, such as a building number and street name.
line_2
Line 2 of the address, such as a suite or apartment number, or the name of a named building.
line_3
Line 3 of the address.
metadata
A JSON object defined by the client. See Metadata.
name
The name of a contact person or an "in care of" person at this address. For a personal wallet contact, alphabetic characters and spaces.
phone_number
Phone number associated with this specific address in E.164 format. Must be unique.
state
State or province portion of the address.
zip
Postal code portion of the address.
business_vat_id
The tax ID number of the customer. Relevant when the customer is a business.
category
Category of payment method. Possible values:
bank_redirect
bank_transfer
card
card_to_card
cash
ewallet
rapyd_ewallet
coupon
The ID of a discount coupon that is assigned to this customer. The coupon must use the same currency as the customer's default payment method.
created_at
Time of creation of this customer, in Unix time.
customer
ID of the customer profile, a string starting with cus_.
default_payment_method
The payment method that is used when the
payment
object or subscription does not specify a payment method. The value must also appear in thepayment_methods
list. The payment method is referenced by itsname
field.
delinquent
Indicates whether there is currently a failure of an automatic payment that is part of a subscription, or an invoice that was not paid when due.
description
A text description of the customer.
discount
Contains information about the coupon that applies to the customer.
To add a discount to a customer, see Update Customer.
email
Customer's email address. Maximum 512 characters.
ewallet
ID of the wallet that is linked to the customer. String starting with ewallet_.
Each wallet can be associated with only one customer.
fields
Contains the fields that are for the specific payment method.
To determine what fields are required for the payment method, see Get Payment Method Required Fields.
id
ID of the customer profile. String starting with cus_.
invoice_prefix
A custom string that is prefixed to all invoices for this customer.
metadata
A JSON object defined by the client. See Metadata.
name
The name of the customer.
next_action
Indicates the next action for completing the payment. One of the following values:
3d_verification - The next action is 3DS authentication. Relevant only to card payments.
pending_capture - The next action is pending the capture of the amount. Relevant only to card payments when the amount is not zero.
pending_confirmation - The next action is pending the confirmation for the payment. Relevant to all payment methods excluding card payment.
not_applicable - The payment has completed or the next action is not relevant.
payment_methods
An object containing the following fields:
data
A list of up to three payment methods.
acs_check
Results of the Access Control Server (ACS) check. Possible values:
pass
fail
unavailable
unchecked
Relevant to cards.
address
Address of the customer.
canton
Name of the canton administrative subdivision, as used in banking.
city
City portion of the address.
country
The two-letter ISO 3166-1 ALPHA-2 code for the country.
created_at
Time of creation of the object, in Unix time.
district
Name of the district administrative subdivision, as used in banking.
id
ID of the
address
object.
line_1
Line 1 of the address, such as a building number and street name.
line_2
Line 2 of the address, such as a suite or apartment number, or the name of a named building.
line_3
Line 3 of the address.
metadata
A JSON object defined by the client. See Metadata.
name
The name of a contact person or an "in care of" person at this address. For a personal wallet contact, alphabetic characters and spaces.
phone_number
Phone number associated with this specific address in E.164 format. Must be unique.
state
State or province portion of the address.
zip
Postal code portion of the address.
bin_details
Bank identification details. Includes the following fields:
bin_number
BIN number of the bank.
brand
The brand of the card. For example, Visa.
country
Country of the bank that issued the card.
type
The type of the card:
credit
debit
prepaid
category
Category of payment method. Possible values:
bank_redirect
bank_transfer
card
card_to_card
cash
ewallet
rapyd_ewallet
cvv_check
Verification of the card’s CVV. Valid values:
pass
fail
unavailable
unchecked
fingerprint_token
Hash of the card number, expiration date and CVV.
Relevant to cards.
id
ID of the Payment Method object. String starting with card_ or other_.
image
A URL to the image of the icon for the type of payment method.
last4
Last 4 digits of the card.
Relevant to card payment methods.
metadata
A JSON object defined by the client. See Metadata.
name
Full name of the customer.
next_action
Indicates the next action for completing the payment. One of the following values:
3d_verification - The next action is 3DS authentication. Relevant only to card payments.
pending_capture - The next action is pending the capture of the amount. Relevant only to card payments when the amount is not zero.
pending_confirmation - The next action is pending the confirmation for the payment. Relevant to all payment methods excluding card payment.
not_applicable - The payment has completed or the next action is not relevant.
supporting_documentation
Reserved.
type
Name of the payment method type. For example, us_mastercard_card.
To get a list of payment methods for a country, use List Payment Methods by Country.
webhook_url
Reserved.
has_more
Indicates whether there are more than three payment methods for this customer.
total_count
Total number of payment methods for this customer.
url
URL for requesting all of the payment methods for this customer.
phone_number
Customer's primary phone number in E.164 format. The merchant is responsible for verifying that the number is correct.
subscriptions
An object containing the following fields:
billing
Determines the method of billing at the end of the billing cycle. Set to pay_automatically - Rapyd generates a
payment
object, then attempts to pay it using the designated payment method.
billing_cycle_anchor
Determines the start of the next full billing cycle, as defined in the plan described in the
items
. One of the following values:now - The present day. The next billing cycle starts right now.
Timestamp in Unix time - A time in the future, at or after the end of the free trial period, not more than the length of the billing cycle. The current billing cycle will be shorter than all other billing cycles. Relevant to creating a subscription.
unchanged - The original billing cycle anchor is unchanged. Relevant to updating a subscription.
cancel_at_period_end
Determines the last date that charges accrue.
true - Charges accrue until the end of the current billing period, then the subscription is canceled.
When no trial period is set, after
cancel_at_period_end
is set to true the subscription will not be renewed at the next interval.When a trial period is set after
cancel_at_period_end
is set to true, the subscription will not begin.
false - When the subscription is created, no end is defined. When Cancel Subscription is run, charges stop immediately and the subscription is canceled.
cancel_checkout_url
URL where the customer is redirected after pressing Back to Website to exit the hosted page. This URL overrides the
merchant_website
URL. Does not support localhost URLs.
canceled_at
Date and time that the subscription is canceled by the customer or by the client. Unix time.
complete_checkout_url
URL where the customer is redirected after pressing Finish to exit the hosted page. This URL overrides the
merchant_website
URL. Does not support localhost URLs.
complete_payment_url
URL where the customer is redirected when payment is successful, after returning from an external page such as a 3DS page. Does not support localhost URLs.
coupon
The ID of a coupon that applies to all invoice lines associated with this subscription. String starting with coupon_.
created_at
Time of creation of this subscription, in Unix time.
current_period_end
End of the current billing cycle, in Unix time.
current_period_start
Start of the current billing cycle, in Unix time.
customer_token
ID of the customer who pays for this subscription. String starting with cus_.
days_until_due
Number of days the customer has for paying this invoice.
discount
Contains information about the coupon that applies to the subscription.
ended_at
Date that the subscription was canceled or otherwise terminated. Unix time.
error_payment_url
URL where the customer is redirected when payment is not successful, after returning from an external page, such as a 3DS page. Does not support localhost URLs.
id
ID of the Subscription object. String starting with sub_.
language
Determines the default language of the hosted page. For a list of values, see List Supported Languages.
When this parameter is null, the language of the user's browser is used.
If the language of the user's browser cannot be determined, the default language is English.
merchant_reference_id
Identifier defined by the client for reference purposes. Limit: 45 characters.
metadata
A JSON object defined by the client. See Metadata.
page_expiration
End of the time when the customer can use the hosted page, in Unix time. If
page_expiration
is not set, the hosted page expires 14 days after creation.Range: 1 minute to 30 days.
payment_fields
Additional
payment_options
fields.
payment_method
Payment method used for paying invoices generated by this subscription. The ID is a string starting with card_ or other_.
payout_fields
Reserved.
product
ID of a
product
object. String starting with product_ Relevant to List Subscriptions.
simultaneous_invoice
Determines when the subscription invoice is issued.
true - Payment is created when the invoice is issued.
false - Payment is created one hour after the invoice is issued.
status
Status of the subscription. One of the following:
active - The customer is currently paying for this subscription.
canceled - The customer has canceled this subscription, but it remains in the Rapyd database.
past_due - Payment for this subscription was not received by the end of the billing period.
trialing - The subscription is in its free trial period.
unpaid - An error occurred in the payment for this subscription.
subscription_items
An object or array of objects containing the following fields:
data
Array of objects that describe individual subscription items.
created
The time the subscription item was created, in Unix time. Response only.
id
ID of the Subscription Item object. String starting with subi_.
metadata
A JSON object defined by the client. See Metadata.
plan
The pricing plan that defines the product and pricing structure associated with this subscription item. Cannot be a plan that is already part of the subscription.
active
Indicates whether the plan is available to be added to a subscription.
aggregate_usage
Determines which quantity is used to calculate the pricing. One of the following:
max - The maximum reported usage within the billing cycle.
sum - The sum of all usage during a billing cycle.
last_during_period - The last usage reported within the billing cycle.
last_ever - The last usage ever reported, if the latest billing cycles contain no usage at all.
amount
The amount to charge, in units of the currency defined in
currency
.Relevant when
billing_scheme
is set to per_unit.
billing_scheme
Describes how to compute the price. One of the following:
per_unit - The amount specified in
amount
is charged for each unit.tiered - The unit pricing is computed using a tiering strategy as defined with the
tiers
andtiers_mode
fields.
created_at
Time the
plan
object was created, in Unix time.
currency_code
Three-letter ISO 4217 code for the currency used in fields that represent monetary amounts.
id
Unique ID for this plan.
interval
Specifies the units used in defining the billing cycle. One of the following:
day
week
month
year
interval_count
Number of time intervals in the billing cycle. Integer. See
interval
.
metadata
A JSON object defined by the client. See Metadata.
nickname
Brief description of the plan.
product
Describes this product in the plan.
active
Indicates whether the product is currently available for purchase.
attributes
Array of strings. Up to 5 unique alphanumeric strings defined by the merchant. Each string defines the key in a key-value pair in the
attributes
object in the correspondingsku
objects.
created_at
Time of creation of this product, in Unix time.
description
Full text description of the product.
id
Unique string for identification of the product.
metadata
A JSON object defined by the client. See Metadata.
name
The name of the product or service that appears in the line items in invoices.
package_dimensions
Physical attributes of the SKU item. Object containing the following fields. These fields are represented as numbers, but it is the responsibility of the merchant to define and interpret the relevant units of length and weight.
height
- Height of the package, in units defined by the client.length
- Length of the package, in units defined by the client.weight
- Weight of the package, in units defined by the client.width
- Width of the package, in units defined by the client.
shippable
Indicates whether the product can be shipped.
skus
Array of objects. An array of SKUs associated with this product. Relevant when
type
is goods.To add SKUs to a product, use Create SKU.
active
Indicates whether the product is currently being sold.
attributes
Up to 5 alphanumeric key-value pairs defined by the merchant. For example:
{ "size": 12, "color": "red", "arm_rest": true }
Each key must match a string in the
attributes
list of the correspondingproduct
object.
created_at
Time of creation of this SKU, in Unix time.
currency
Three-letter ISO 4217 code for the currency used in the
price
field.
id
ID of the SKU object. Alphanumeric characters and underscores (_). Defined by the merchant, or a string starting with sku_.
image
URL of image associated with the product.
inventory
Contains the following fields:
quantity
The number of units available in inventory. Integer. Relevant when
type
is finite.
type
One of the following values:
finite - Physical objects that can be counted.
infinite - Products such as downloadable software.
bucket - Products that are sold by measurable quantity.
value
The status of the product on hand in inventory. Relevant when
type
is bucket. One of the following:in_stock - A normal amount of product is available in inventory.
limited - There is enough product in inventory for small orders only.
out_of_stock - No product remains in inventory.
metadata
A JSON object defined by the client. See Metadata.
package_dimensions
Physical attributes of the SKU item. Object containing the following fields. These fields are represented as numbers, but it is the responsibility of the merchant to define and interpret the relevant units of length and weight.
height
- Height of the package, in units defined by the client.length
- Length of the package, in units defined by the client.weight
- Weight of the package, in units defined by the client.width
- Width of the package, in units defined by the client.
price
Price of one unit. Decimal.
product
ID of the product that this SKU relates to.
size
The size of the product.
updated_at
Time that this SKU was last updated, in Unix time.
statement_descriptor
Description that is suitable for a customer's statement. Limited to 22 characters.
Relevant when
type
is service. Must be null whentype
is goods.
type
One of the following:
services - Relevant to subscriptions and plans.
goods - Relevant to orders and SKUs.
unit_label
Determines what one unit of this product is called on customers’ receipts and invoices, such as minutes, viewings, kilometers or packages.
Relevant when
type
is service. Must be null whentype
is goods.
updated_at
Time that this product was last updated, in Unix time.
tiers
Defines a tiered pricing structure. Each tier object represents a pricing tier. Relevant when
billing_scheme
is set to tiered. Contains the following fields:amount
- The price for each item in this tier. Decimal number.up_to
- The upper volume limit for this tier. Valid values: inf (infinite) or an integer.flat_amount
- Extra amount added to the entire tier. Default is 0.
tiers_mode
Determines the mode for calculating the total tiered charge. One of the following values:
graduated - The total cost at each price tier is calculated separately, then all tier charges are added together.
volume - The total cost is calculated as the number of service units multiplied by the applicable tier price.
transform_usage
Defines the transformation that is applied to the reported usage before the billed price is computed. The transformation divides the quantity by the divisor specified in
divide_by
, then rounds up or down according to the setting inround
. Relevant whenbilling_scheme
is set to per_unit. Relevant whenbilling_scheme
is set to per_unit. For more information, see Transformation Pricing in Pricing Plans. Contains the following fields:divide_by
Indicates the divisor in the transformation calculation. Integer.
round
Indicates whether the reported number of units should be rounded up or down to the next whole quantity specified in
divide_by
.
trial_period_days
The number of days in the customer's free trial period. Integer. Range: 0-730.
usage_type
Determines whether the customer is billed when the service is not actually used. Relevant when
billing_scheme
is set to per_unit. One of the following:metered - The customer is billed only for actual usage.
licensed - The customer is billed even if the service is not used.
quantity
The number of units of the service defined in the plan. Integer. This number can be updated during the billing cycle using Update Subscription or Update Subscription Item.
has_more
Indicates that the number of
subscription_items
records is greater than the number of the returned records.
total_count
Number of
subscription_items
records.
url
URL for the record of all subscription items for this subscription.
tax_percent
The percentage tax rate that is applied to the subtotal of the invoice, after subtracting all discounts. Decimal.
trial_end
The date and time of the end of the customer's free trial period, in Unix time, or the string now. Relevant when
trial_period_days
is not defined.
trial_from_plan
Determines whether the subscription uses the free trial period defined in the plan.
true - Uses the trial period defined in the plans added to the subscription. When
trial_from_plan
is true, all plans in the subscription must have the same value fortrial_period_days
.false - Uses the trial period defined in the subscription.
trial_period_days
The number of days in the customer's free trial period. Integer. Range: 0-730.
Relevant when
trial_end
is not defined.
trial_start
Date and time of the start of the customer's free trial period, inUnix time.
type
The type of the subscription.
payment
CUSTOMER_CREATED Webhook
{ "id": "wh_035d46223922ca1c70f77c9ffcaf5d99", "type": "CUSTOMER_CREATED", "data": { "id": "cus_571ef03ba58cb493317b49dfea644bf1", "name": "John Doe", "email": "johndoe@rapyd.net", "ewallet": "ewallet_e16b6e751207d0a7f26cd228ef078b0b", "discount": null, "metadata": { "merchant_defined": true }, "addresses": [], "created_at": 1640536833, "delinquent": false, "description": "", "phone_number": "+14155556666", "subscriptions": null, "invoice_prefix": "JD-", "business_vat_id": "123456666", "payment_methods": { "url": "/v1/customers/cus_571ef03ba58cb493317b49dfea644bf1/payment_methods", "data": [{ "id": "card_b6a12fc24fe700c35a615da034e638dd", "name": "John Doe", "type": "ua_visa_card", "image": "https://iconslib.rapyd.net/checkout/ua_visa_card.png", "last4": "1111", "category": "card", "metadata": null, "acs_check": "unchecked", "cvv_check": "unchecked", "bin_details": { "type": null, "brand": null, "country": null, "bin_number": "411111" }, "next_action": "not_applicable", "webhook_url": "", "expiration_year": "23", "expiration_month": "10", "fingerprint_token": "ocfp_e599f990674473ce6283b245e9ad2467", "supporting_documentation": "" } ], "has_more": false, "total_count": 1 }, "default_payment_method": "card_b6a12fc24fe700c35a615da034e638dd" }, "trigger_operation_id": "62a6763b-255b-4f48-8960-79b6861891b1", "status": "NEW", "created_at": 1640536833 }
The number of seconds elapsed since the beginning of the Unix epoch, which was 00:00:00 GMT on January 1, 1970. 10-digit integer.
The number of seconds elapsed since the beginning of the Unix epoch, which was 00:00:00 GMT on January 1, 1970. 10-digit integer.
The number of seconds elapsed since the beginning of the Unix epoch, which was 00:00:00 GMT on January 1, 1970. 10-digit integer.
The number of seconds elapsed since the beginning of the Unix epoch, which was 00:00:00 GMT on January 1, 1970. 10-digit integer.
The number of seconds elapsed since the beginning of the Unix epoch, which was 00:00:00 GMT on January 1, 1970. 10-digit integer.
The number of seconds elapsed since the beginning of the Unix epoch, which was 00:00:00 GMT on January 1, 1970. 10-digit integer.
The number of seconds elapsed since the beginning of the Unix epoch, which was 00:00:00 GMT on January 1, 1970. 10-digit integer.
The number of seconds elapsed since the beginning of the Unix epoch, which was 00:00:00 GMT on January 1, 1970. 10-digit integer.
The number of seconds elapsed since the beginning of the Unix epoch, which was 00:00:00 GMT on January 1, 1970. 10-digit integer.
The number of seconds elapsed since the beginning of the Unix epoch, which was 00:00:00 GMT on January 1, 1970. 10-digit integer.
The number of seconds elapsed since the beginning of the Unix epoch, which was 00:00:00 GMT on January 1, 1970. 10-digit integer.
The number of seconds elapsed since the beginning of the Unix epoch, which was 00:00:00 GMT on January 1, 1970. 10-digit integer.
The number of seconds elapsed since the beginning of the Unix epoch, which was 00:00:00 GMT on January 1, 1970. 10-digit integer.
The number of seconds elapsed since the beginning of the Unix epoch, which was 00:00:00 GMT on January 1, 1970. 10-digit integer.
The number of seconds elapsed since the beginning of the Unix epoch, which was 00:00:00 GMT on January 1, 1970. 10-digit integer.
The number of seconds elapsed since the beginning of the Unix epoch, which was 00:00:00 GMT on January 1, 1970. 10-digit integer.
The number of seconds elapsed since the beginning of the Unix epoch, which was 00:00:00 GMT on January 1, 1970. 10-digit integer.
The number of seconds elapsed since the beginning of the Unix epoch, which was 00:00:00 GMT on January 1, 1970. 10-digit integer.
The number of seconds elapsed since the beginning of the Unix epoch, which was 00:00:00 GMT on January 1, 1970. 10-digit integer.
The number of seconds elapsed since the beginning of the Unix epoch, which was 00:00:00 GMT on January 1, 1970. 10-digit integer.