For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
HomeGuidesAPI Reference
HomeGuidesAPI Reference
  • Technical Guides
    • Onboarding
    • Capabilities
      • Overview
      • Set Up Default and Tier Rates
      • Set Up Custom Rates
LogoLogo
Technical GuidesRates

Set Up Custom Rates

Was this page helpful?
Previous

Overview

Next
Built with

Do the following to successfully approve a new custom rate and assign it to a specific merchant, or a series of merchants grouped together via the same brand:

  1. The Afterpay team creates a new custom rate. This outlines the buy rate and defines whether the custom rate is eligible for a specific merchant or multiple merchants via a brand identifier. A custom rate can contain one or more buy rates depending on the number of countries that require custom rates.

  2. Once the custom rate is created, you, the partner, must approve or reject the proposed custom rate via Approve Custom Rate. The customRateId for the pending custom rate is provided by the Afterpay team or you can listen to webhooks for custom rate creation events.

1curl --location 'https://agencyapi.afterpay.com/v1/custom-rate/{{customRateId}}/review' \
2--header 'X-Afterpay-Request-Signature: <Request Signature>' \
3--header 'X-Afterpay-Request-Date: <Request Date>' \
4--header 'X-Afterpay-Request-Apikey: <API Key>' \
5--header 'Content-Type: application/json' \
6--data-raw '{
7"customRateId": "UUID",
8"userDetails": {
9 "firstName": "John",
10 "lastName": "Doe",
11 "email": "john.doe@psp.com"
12},
13"comment": "Approved for xyz reason",
14"status": "APPROVED",
15"customRateType": "MERCHANT",
16"reference": "MerchantReference",
17"rateDetails": [ {
18 "countryCode": "US",
19 "rates": [
20 {
21 "variableRatePercentage": "1.5",
22 "fixedRate": "0.15", "fixedRateCurrencyCode": "USD",
23 "rateType": "INTRODUCTORY",
24 "durationInMonths": 1
25 },
26 {
27 "variableRatePercentage": "3.5",
28 "fixedRate": "0.3",
29 "fixedRateCurrencyCode": "USD",
30 "rateType": "ONGOING"
31 }
32] }, {
33 "countryCode": "CA",
34 "rates": [
35 {
36 "variableRatePercentage": "4.5",
37 "fixedRate": "0.45",
38 "fixedRateCurrencyCode": "CAD",
39 "rateType": "ONGOING" }
40 ] }
41] }'
  1. The custom rate is assigned to a specific merchant via the customRateType field and the reference field. The merchantReference field is unique and can only be associated with a single merchant. The brandReference field can be associated with multiple merchants and typically represents a platform.

a. If the customRateType field is set to MERCHANT, set the reference field to the same value as the merchant onboarding’s merchantReference field.

b. If the customRateType field is set to BRAND, set the reference field to the same value as the merchant onboarding’s business brandReference.

1curl --location 'https://agencyapi.afterpay.com/v1/onboardings/' \
2--header 'X-Afterpay-Request-Signature: <Request Signature>' \
3--header 'X-Afterpay-Request-Date: <Request Date>' \
4--header 'X-Afterpay-Request-Apikey: <API Key>' \
5--header 'Content-Type: application/json' \
6--data-raw '{
7 "merchantCountry": "US",
8 "merchantReference": "merchantId1234",
9 "settlementContractId": "1eR1bWHtIRdmyJNwEgqmlSI58sZ",
10 "parameters": {
11 "business":{
12 "address":{
13 "address1": "1 Market Street",
14 "city": "San Francisco",
15 "state": "CA",
16 "postCode": "94105",
17 "countryCode": "US"
18 }
19 ,"businessType":"sole_proprietorship",
20 "customerSupportPhoneNumber":"7700900077",
21 "email":"test@afterpay.com",
22 "legalBusinessName":"Test Merchant, LLC",
23 "merchantCategoryCode":"5072",
24 "tradingCountry":"US",
25 "tradingName":"Test Merchant",
26 "websiteUrl":"https://www.testmerchant.com",
27 "brandReference": "platformId1234"
28 },
29 "channels":{
30 online: true
31 },
32"owners":[
33 {
34 "firstName":"John",
35 "lastName":"Smith"
36 }
37 ]
38 }
39}'