← iOSIOS / REFERENCE
The following are details of the entry and output parameters of Alignet One SDK for affiliations flow:
Input Parameters
The objectPMEAffiliationRequest includes the following:
PMEAffiliationRequest
| Parameter | Type | Description | Mandatory |
|---|---|---|---|
| action | PAYMEAffiliationAction | The action to run. Can be CREATE or UPDATE: PAYMEAffiliationAction.CREATE / PAYMEAffiliationAction.UPDATE | Yes |
| affiliationCode | String | Merchant-generated Affiliation code | Yes |
| affiliation | PAYMEAffiliationData | It contains information about Affiliation. It’s obligatory when the action’s CREATE | No |
| setting | PAYMESettingData | Contains performance adjustment information from Affiliation Form | No |
PAYMEAffiliationData
| Parameter | Type | Long. | Description | Mandatory |
|---|---|---|---|---|
| type | PAYMEAffiliationType | - | Affiliation type: FIXED → NOT AVAILABLE / VARIABLE → NOT AVAILABLE / MANUAL → AVAILABLE | Yes |
| frequency | String | - | Frequency of Affiliation collection | No |
| amount | String | 11 | Amount to charge in minor currency units. Example: 0.50 → Send 50 / 10 → Send 1000 | No |
| maxAmount | String | 11 | Maximum amount for recurrent payments expressed as cents | No |
| currency | String | - | Currency code ISO-4217 | Yes |
| additionalFields | Dictionary | - | Contains additional information provided by the merchant | No |
| beneficiary | PAYMEAddressData | - | Affiliate information | Yes |
PAYMEAddressData
| Parameter | Type | Long. | Description | Mandatory |
|---|---|---|---|---|
| firstName | String | 30 | Names | Yes |
| lastName | String | 50 | Surname | Yes |
| String | 50 | Yes | ||
| phone | String | 15 | Country code and cell phone number (51-900000000) | Yes |
| identityDocument | PAYMEIdentityDocument | - | Object containing information about an identity document | No |
| line1 | String | 50 | Address | Yes |
| line2 | String | 50 | Additional address | No |
| city | String | 50 | City / Province | Yes |
| state | String | 15 | Status / Department | Yes |
| country | String | 2 | Country code in letter. ISO-3166 | Yes |
PAYMEIdentityDocument
| Parameter | Type | Long. | Description | Mandatory |
|---|---|---|---|---|
| country | String | 2 | Country code in letter. ISO3166. Example: Peru → PE | Yes |
| type | String | 20 | Type of document: DNI / CARNET_EXTRANJERIA / PASAPORTE / OTROS | Yes |
| identifier | String | 20 | Identification number | Yes |
PAYMESettingData
| Parameter | Type | Long. | Description | Mandatory |
|---|---|---|---|---|
| locale | String | 5 | Localization of the form’s language. Value: es_PE (Peru) | Yes |
| walletUserId | String | 15 | Identifier of the wallet user | No |
Output parameters
The objectPMEAffiliationResponse includes the following:
PMEAffiliationResponse
| Parameter | Type | Long. | Description | Mandatory |
|---|---|---|---|---|
| success | Boolean | - | true if the process was correct, false if a mistake happened. | Yes |
| resultCode | String | 2 | Processing result code. | Yes |
| resultMessage | String | 30 | Text describing the result of processing. | Yes |
| result | PAYMEAffiliationResult | - | Detail of the transaction result. | No |
PAYMEAffiliationResult
| Parameter | Type | Long. | Description | Mandatory |
|---|---|---|---|---|
| affiliationId | String | 36 | Unique identifier of transaction generated by Alignet One | Yes |
| affiliationCode | String | 36 | Operation number sent by merchant | Yes |
| type | String | - | Affiliation type: FIXED → NOT AVAILABLE / VARIABLE → NOT AVAILABLE / MANUAL → AVAILABLE | Yes |
| state | String | - | Current status of affiliation: ACTIVE / INACTIVE | Yes |
| frequency | String | - | Frequency of Affiliation collection | No |
| amount | String | 11 | A quarter. Example: 0.50 → Send 50 / 10 → Send 1000 | No |
| maxAmount | String | 11 | Maximum amount for recurrent payments expressed as cents | No |
| currency | String | - | Currency code ISO-4217 | Yes |
| additionalFields | Dictionary | - | Additional information provided by the merchant | No |
| card | PAYMEAffiliationCard | - | Information about the card used in Affiliation | Yes |
PAYMEAffiliationCard
| Parameter | Type | Long. | Description | Mandatory |
|---|---|---|---|---|
| brand | String | 4 | Card name: VISA / MSCD / AMEX / DINC | Yes |
| bin | String | 6 | Card bin | Yes |
| lastPan | String | 4 | Last four digits of the card | Yes |
| issuerName | String | 50 | Name of card issuer | No |
| cardholderName | String | 50 | Name and name of card holder | Yes |